-
Notifications
You must be signed in to change notification settings - Fork 787
cmd/gomobile: support macOS and Catalyst #65
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
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
This PR (HEAD: fb6ffaf) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/mobile/+/310949 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
This is a pretty exciting and important PR, any idea when it will get merged? Thank you for your contributions. |
cc @hyangah |
Bump :-) |
Thanks for the contributions. Seems like gopherbot has not assigned any reviewers here and no activity is seen at https://go-review.googlesource.com/c/mobile/+/310949. I know gomobile is experimental and all, but still this is a pretty important change (With Catalyst and SPM being around for 2+ years for public) and no way for us to bump up the priority for someone from google to take a look at. 😿 . Will pinging @gopherbot in the thread help? Just trying out here. |
cc. @hajimehoshi maybe? |
Happy to work with whomever wants to review this. I’d love to see this merged. 👍 |
Message from Hajime Hoshi: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Hajime Hoshi: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
create one framework for all targets: ios, simulator and catalyst, every framework contains at least one arch library, and combine all framework into one xcframework
Adds macosx on amd64 and arm64 targets to the fat xcframework. This enables the generated xcframework to be used as a binary dependency in Swift Package Manager: https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages and used or tested using the SwiftPM command-line tools on macOS, e.g. 'swift test'
This PR (HEAD: b678ba0) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/mobile/+/310949 to see it. Tip: You can toggle comments from me using the |
Message from Hajime Hoshi: Patch Set 16: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
This PR (HEAD: 221210c) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/mobile/+/310949 to see it. Tip: You can toggle comments from me using the |
Message from Hajime Hoshi: Patch Set 17: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Go Bot: Patch Set 17: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Randy Reddig: Patch Set 16: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Go Bot: Patch Set 17: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Hajime Hoshi: Patch Set 17: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Hyang-Ah Hana Kim: Patch Set 17: (6 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
...instead of string concatenation. CL feedback.
Just use append.
This PR (HEAD: 623f8f3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/mobile/+/310949 to see it. Tip: You can toggle comments from me using the |
Message from Randy Reddig: Patch Set 17: (7 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Hyang-Ah Hana Kim: Patch Set 18: Run-TryBot+1 Code-Review+2 Trust+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Go Bot: Patch Set 18: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Go Bot: Patch Set 18: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Message from Randy Reddig: Patch Set 18: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/310949. |
Add support for macOS (non-Catalyst) and Catalyst targets. The compiled library is packaged into a "fat" XCFramework file (as opposed to a Framework), which includes binaries for iOS, macOS, MacCatalyst (iOS on macOS), and iOS Simulator targets, for amd64 and arm64 architectures. The generated XCFramework file is suitable for distribution as a binary Swift Package Manager package: https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages This change is based on earlier work: #45 #63 Fixes golang/go#36856 Change-Id: Iabe535183c7215c68838d6c8f31618d8bceefdcf GitHub-Last-Rev: 623f8f3 GitHub-Pull-Request: #65 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/310949 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Hajime Hoshi <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Hajime Hoshi <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: Go Bot <[email protected]>
This PR is being closed because golang.org/cl/310949 has been merged. |
Thank you so much! |
This is is a follow-up from my previous PR (#65). It makes gomobile aware of GOOS=ios and adds support for specifying specific Apple platforms, instead of overloading the "ios" platform. Supported platforms: ios, iossimulator, macos, and maccatalyst These can now be specified the -target argument to gomobile, e.g.: gomobile build -target=ios,iossimulator,macos,maccatalyst It preserves the current behavior of -target=ios, which will build for ios and iossimulator on supported architectures (arm64 and amd64). It adds platform-specific build tags so Go code can discriminate between different Apple platforms like maccatalyst (UIKit on macOS). This PR also fixes a number of broken tests. TODO: cgo has a bug where c-archive builds targeting Catalyst will fail unless -tags=ios is supplied. See https://golang.org/issues/47228 Fixes https://golang.org/issues/47212 Updates https://golang.org/issues/47228 Change-Id: Ib1a2f5302c5edd0704c13ffbe8f4061211f50d4e GitHub-Last-Rev: 01ab28e GitHub-Pull-Request: #70 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/334689 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Hajime Hoshi <[email protected]>
Add support for macOS (non-Catalyst) and Catalyst targets.
The compiled library is packaged into a "fat" XCFramework file (as
opposed to a Framework), which includes binaries for iOS, macOS,
MacCatalyst (iOS on macOS), and iOS Simulator targets, for amd64 and
arm64 architectures.
The generated XCFramework file is suitable for distribution as a binary
Swift Package Manager package:
https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages
This change is based on earlier work:
#45
#63
Fixes golang/go#36856