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
Imported signing certificate can't be found #64
Comments
I'm wondering because gradle should create the keychain file in the project directory, but it was use this one: /Users/username/Library/Keychains/gradle.keychain What does your build.gradle file look like? |
The weird thing is that this project used to build fine just a couple of weeks ago. If the signing certificate is imported into the login.keychain manually it works. So the certificate and provisioning profile is not the problem.
|
You are using the gradle plugin version 0.6 that is very very old. You are using Xcode 5.1.1 and only the plugin version 0.9.x supports Xcode 5.x. Also some other configuration has changed, so you can try this config:
or see https://github.com/openbakery/gradle-xcodePlugin/blob/master/example/ |
Thank you very much. It didn't occur to me that there would be so many changes. However it now fails differently.
After adding
I also tried running the provided xcodebuild command myself. It complains Any ideas? |
I need two things to identify the error
If you want to post this here in the issue you can send me this via mail. You find the address on my profile page. |
gradle file
--debug output https://gist.github.com/orkoden/48ee2c85300a4a047490 Thank you so much for taking the time. |
The xcodeproject is not found. The build.gradle file must be in the root of the xcodeproject. Error message in the debug output is
|
Thank you. It now builds but singing still fails. The correct certificate and provisioning profile are correctly moved to their subfolders in the build directory.
My guess was gradle-xcodeplugin does no longer override the settings in the xcode project file for the provisioning profile to use. I tried changing it there. Is my guess correct, that gradle-xcodeplugin does no longer override the settings in the xcode project file for the provisioning profile to use? |
I think the identity is wrong: "iPhone Developer: Developer Name (8QHJB72JPC)" Run the following command in the Terminal and you see valid values:
|
The identity is set to Automatic in Xcode and to
Something else I noticed. There's still a grade keychain hanging around in my Keychain.app. Should that not be cleaned up? |
In the build.gradle file you should specify the correct signIdentity with
This must match exactly the identity form the *.p12 file, and the The gradle build ignores the signing settings from the xcode project. The gradle build cleans up old keychains, but when a build has failed, the cleanup is not perform, so it can be that some items remain in the keychain. |
The only thing that worked for me was setting the provisioning profiles in Xcode for the appropriate configurations. That means it is not related to the identity. In any case for distribution signing I don't have to set the identity to
|
I do not have the distribution key in my keychain either. The plugin overrides the settings specified in the xcodeproject file, if they are specified properly. Take a look in the build.gradle in the example. Here you seen that multiple signing identities are specified for different targets. e.g the integration target uses the development identity, the appstore target uses the distribution target: This build file is nearly the same as I in all my projects (only the targets and identities must be changed) |
Here my comment for rbang1's pull request #78: I have test your fix by changing the path of the project to have spaces and it hasn't work. The only solution by now is to make sure that your path does not contain spaces! |
Actually in my case there are no spaces in path, the build breaks down on space between --keychain and path to keychain for the OTHER_CODE_SIGN_FLAGS argument |
I don't think this is you problem. Quotes are not needed here, because this parameters is passed as one parameter to the xcodebuild command using the java ProcessBuilder (http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html) A space is only a problem in the path, because the xcodebuild command parses the parameter and extracted the path of the keychain and pass it to the codesign command. Here the path is not escaped by the xcodebuild command. Nevertheless at my point of view, I think that the identity, mobile provision and certificate does not match in your case. The signing part works fine for me for quite I time.
|
I'm using different certificates for different builds. So I configure my .gradle file accordingly.
However builds have been failing
I think the reason for failure is here:
It seems like keychain creation and certificate import succeeds, but then 'security list' does not find gradle.keychain.
It used to work.
gradle 1.12
OS X 10.9.2
Xcode 5.1.1
The text was updated successfully, but these errors were encountered: