New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/mobile/cmd/gomobile: unsealed contents present in the root directory of an embedded framework #66406
Comments
@hyangah, any clues? |
Sorry I have no clue. Does codesign ... --verbose give more hints any chance? |
Not much that tells me anything. But maybe you it'll inform you. I'm using
|
XCFramework file tree, for ref (I've included ios, iossimulator as targets as well):
|
@ianmcfall @hyangah @dr2chase I guess the issue is due to Pleases refer: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle |
@Simon-Zeng Good call, thanks!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
codesign -vvv --deep --strict MyApp.app
--prepared:MyApp.app/Contents/Frameworks/Vault_mobile.framework/Versions/Current/.
--validated:MyApp.app/Contents/Frameworks/Vault_mobile.framework/Versions/Current/.
MyApp.app: valid on disk
MyApp.app: satisfies its Designated Requirement Questions
|
@ianmcfall iOS requires an |
My fix for another issues seems to fix this as well: https://go-review.googlesource.com/c/mobile/+/574055 I can repo a code signing issue before, but not after. Different error message though. @ianmcfall want to verify? @Simon-Zeng the suggested symlink will fix this issue, but will cause other issues. Good call on cause! |
Change https://go.dev/cl/574055 mentions this issue: |
Thanks for the help, everyone. Closing. |
Apologies @scosman, not sure how I can help to verify that update. Might you share what steps I can take to try it out? |
@ianmcfall Steps would be:
|
…orm, fixing Xcode 15.3 compatibility issues This patch updates the framework generation code to follow the Apple spec for placing content: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle Previously, we setup the framework in MacOS format, and used symlinks to make it compatible with iOS format. This approach no longer works (it works locally in simulator, but causes signing issues when attempting to upload apps for distribution, or running on real hardware). We now setup the expected bundle format for each platform. Other benefits: - Thirds the size of the xcframework and resulting app binary when distributing the xcframework by zip (common for SPM and other formats). The symlinks resulted in duplicate files after zipping, which made it into the final app. - Set MinimumOSVersion, fixing SPM compatibility issue - Eliminates the blank Info.plist - Initial testing shows this also fixes golang/go#66406 (code signing issues) as a side effect of using the proper format Testing: - Tested all 4 platforms (iOS, simulator, macOS, Catalyst) on Xcode 15.3 Fixes golang/go#66406 Fixes golang/go#66500 Change-Id: I8538989efe67cb0d2d0496087dcbeca923c3dffe GitHub-Last-Rev: 28dca85 GitHub-Pull-Request: #98 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/574055 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
…orm, fixing Xcode 15.3 compatibility issues This patch updates the framework generation code to follow the Apple spec for placing content: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle Previously, we setup the framework in MacOS format, and used symlinks to make it compatible with iOS format. This approach no longer works (it works locally in simulator, but causes signing issues when attempting to upload apps for distribution, or running on real hardware). We now setup the expected bundle format for each platform. Other benefits: - Thirds the size of the xcframework and resulting app binary when distributing the xcframework by zip (common for SPM and other formats). The symlinks resulted in duplicate files after zipping, which made it into the final app. - Set MinimumOSVersion, fixing SPM compatibility issue - Eliminates the blank Info.plist - Initial testing shows this also fixes golang/go#66406 (code signing issues) as a side effect of using the proper format Testing: - Tested all 4 platforms (iOS, simulator, macOS, Catalyst) on Xcode 15.3 Fixes golang/go#66406 Fixes golang/go#66500 Change-Id: I8538989efe67cb0d2d0496087dcbeca923c3dffe GitHub-Last-Rev: 28dca85 GitHub-Pull-Request: golang#98 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/574055 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@scosman I just confirmed your |
Go version
go version go1.21.5 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
gomobile init
go get golang.org/x/mobile
Create XCFramework
gomobile bind -target=macos .
Attempt codesign .framework
codesign --force --sign "Developer ID Application: Comp (TeamID)" --timestamp --options runtime /path/Vault_mobile.xcframework/macos-arm64_x86_64/Vault_mobile.framework
What did you see happen?
unsealed contents present in the root directory of an embedded framework
What did you expect to see?
Expected contents to be sealed in the root directory of an embedded framework.
I realize this might be just an XCode issue, but considering the posts I've read about info.plists and bundling problems with the lastest XCode I figured I'd give it a shot. Any insights appreciated.
The text was updated successfully, but these errors were encountered: