-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: support Xcode 7 #12660
Comments
Is there any CL to review? I'd love to try something out, since I still can't build for iOS as is due to #12028 (comment). |
I've tried that now. Plugging in an iOS device did not help on its own, but when I tried running a sample iOS app on it, Xcode told me that my provisioning profiles were missing and it could try to fix it by resetting to default recommended settings. Letting it do that added a single provisioning profile. After that, I was able to deploy that sample iOS app to my iOS device. However, $ gomobile build -target=ios golang.org/x/mobile/example/basic
gomobile: xcrun xcodebuild -configuration Release -project /var/folders/tw/kgz4v2kn4n7d7ryg5k_z3dk40000gn/T/gomobile-work-449284111/main.xcodeproj failed: exit status 65
=== BUILD TARGET main OF PROJECT main WITH CONFIGURATION Release ===
Check dependencies
Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “org.golang.todo.basic” were found.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
|
Just to see if I could get it to work, I modified |
It's more accurate to say I've learned more about why/how it works and what it would take to resolve the issue, but I don't know much about the specifics of generating certificates programmatically (without spending time researching this). In the original post, @crawshaw said he had a change that appeared to work, but needed more testing. I'd be happy to help review if it were to be made into a CL (even if marked as "do not review" because it's not ready yet). |
CL https://golang.org/cl/16634 mentions this issue. |
The existing go_darwin_arm_exec.go script does not work with Xcode 7, not due to any significant changes, but just ordering and timing of statements from lldb. Unfortunately the current design of go_darwin_arm_exec.go makes it not obvious what gets stuck where, so this moves from a moving buffer window to a complete buffer of the lldb output. The result is easier code to follow, and it works with Xcode 7. Updates #12660. Change-Id: I3b8b890b0bf4474119482e95d84e821a86d1eaed Reviewed-on: https://go-review.googlesource.com/16634 Reviewed-by: Michael Matloob <matloob@golang.org>
In the meantime do you think we can update the documentation to reflect that certificates are still necessary? |
CL https://golang.org/cl/17146 mentions this issue. |
The existing go_darwin_arm_exec.go script does not work with Xcode 7, not due to any significant changes, but just ordering and timing of statements from lldb. Unfortunately the current design of go_darwin_arm_exec.go makes it not obvious what gets stuck where, so this moves from a moving buffer window to a complete buffer of the lldb output. The result is easier code to follow, and it works with Xcode 7. Updates #12660. Change-Id: I3b8b890b0bf4474119482e95d84e821a86d1eaed Reviewed-on: https://go-review.googlesource.com/16634 Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-on: https://go-review.googlesource.com/17146
As a workaround you can create a new, empty project in Xcode7 with the same namespace as your Go app, deploy it to your device and then you'll be able to set Trust level on the device. |
@vIRu: I get the following error:
In XCode I try to set the dummy-project's Bundle Identifier to be equal to the expected one ( How do I set the gomobile build (or the basic go-project even) to use a different bundle identifier? Edit: see below. AnswerI figured out how to fix it for my case (edit: and found out even later, that @shurcooL had already posted how to resolve this issue):
|
@egonelbre Thanks for picking this up. |
I'm looking into fixing this. I think the first solution should be to allow specifying the BundleID (and Android package ID) manually and direct people to create an application in XCode with the specified identifier. This would make gomobile easier to use now, with little effort. PS: Currently when I tried to use an existing profile then xcodebuild also required to specify DEVELOPMENT_TEAM (that can be detected from the provisioning profile). Then as a next step there are few ideas:
Currently 3. seems the most promising and least likely to break in the future. Any thoughts? |
I believe this issue is a duplicate of #20241, which is about the ability to configure the app id and signing parameters. I'm going to close this because 20241 is more specific. @egonelbre it's been a while, but I believe the way forward on this issue is making gomobile build produce an artifact that the user then signs and uploads somehow (through Xcode). It's a nice goal to be able to run gomobile build and then have a final app ready to deploy, but I don't think it's realistic to expect gomobile be able to do that by itself, effectively copying Xcode. In particular, it is not scalable to larger projects where you want to customize permissions, icons and so on. gomobile bind produces a .framework ready to be included in Xcode. Is there something similar for complete programs? Perhaps the unsigned .app folder structure? |
I have a change to the gomobile tool that appears to make .app bundles produced with Xcode 7. It needs a bit more testing.
The gist of it is that the DevelopmentTeam ID needs to be in the project file. Unfortunately this requires a bit of machinery to detect, and I fear on complex setups we will have to guess which is the correct ID. We probably already were taking the first team ID, so that's not a new problem.
The text was updated successfully, but these errors were encountered: