[
https://issues.apache.org/jira/browse/CB-13457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210768#comment-16210768
]
Felix Schauerte commented on CB-13457:
--------------------------------------
I am now able to reproduce it again, And I have a clue why...
- Created new cordova project...
- cordova build ios --release --device --> FAIL
- open the project in xcode
- Product/Archive
- xcode asks for permission tos use key "access" from Local Items keystore
- I click on "allow once"
- xcode asks for the keystore password, I enter it.
- xcode asks again for permission tos use key "access" from Local Items keystore
- I click on "allow once"
- xcode asks for the keystore password, I enter it.
- archive sucess
- quit xcode
- cordova build ios --release --device --> FAIL
- open the project in xcode
- Product/Archive
- xcode asks for permission tos use key "access" from Local Items keystore
- I click on "allow always"
- xcode asks for the keystore password, I enter it.
- archive sucess
- quit xcode
- cordova build ios --release --device --> SUCCESS
I think my command to unlock the keychain (security unlock-keychain
~/Library/Keychains/login.keychain-db) doesn't unlock everything that is needed
for the archive process. It unlocks the Login keychain but not the Local Items
keychain. Once i have clicked on "Allow always" in xcode, the formerly locked
key is unchained and the command line release process is able to access all the
resources it needs. This unlocking even survives a reboot of he mac.
I cannot find a command line command to unlock the Local Items keychain.
I guess one could unlock the Local Items keychain in the KeychainTool via mouse
click and then the release command would succeed.
May be, this as good addition for the docs:
always unlock the following keychains if you want to create ios releases via
command line:
- Login
- Local Items
May be, you could also add this advice to the error message when the release
command fails. That could save tons of time for other cordova developers.
Finally the root cause of this issue is just a missing privilege. It's so sad
that apple won't state that in the error message?
Thx.
> cordova build ios --release --device fails for packageType 'app-store'
> ----------------------------------------------------------------------
>
> Key: CB-13457
> URL: https://issues.apache.org/jira/browse/CB-13457
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-ios
> Environment: {code}
> Mac OS Sierra (10.12.6)
> Xcode 9
> Cordova CLI 7.1.0
> cordova-ios:
> [email protected]
> or https://github.com/jrryhrtn/cordova-ios.git
> or https://github.com/apache/cordova-ios.git
> {code}
> Reporter: Felix Schauerte
> Assignee: Suraj Pindoria
>
> build.json:
> {code}
> "release": {
> "codeSignIdentity": "iPhone Distribution",
> "developmentTeam": "OUR-TEAM-ID",
> "packageType": "app-store",
> "provisioningProfile": "VALID NAME OF A PROV-PROFILE",
> "buildFlag": [
> "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
> "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
> "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
> ]
> }
> {code}
> When using packageType=enterprise and a corresponding provisioningProfile
> the release is finished successfully as expected, but with
> packageType=app-store we receive the following messages:
> {code}
> [cordova] Entitlements:
> [cordova]
> [cordova] {
> [cordova] "application-identifier" = "OUR-TEAM-ID.BUNDLE-ID";
> [cordova] "beta-reports-active" = 1;
> [cordova] "com.apple.developer.team-identifier" = OUR-TEAM-ID;
> [cordova] "get-task-allow" = 0;
> [cordova] }
> [cordova]
> [cordova]
> [cordova] builtin-productPackagingUtility -entitlements -format xml -o
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/IntermediateBuildFilesPath/FINSTRAL.build/Release-iphoneos/FINSTRAL.build/FINSTRAL.app.xcent
> [cordova]
> [cordova] CodeSign
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/InstallationBuildProductsLocation/Applications/FINSTRAL.app
> [cordova] cd
> /Users/schauerte/tatakoto/dev/schauerte/cleverdox/build/fis.productive/local/ios/platforms/ios
> [cordova] export
> CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
> [cordova] export
> PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/schauerte/shared/ant-1.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
> [cordova]
> [cordova] Signing Identity: "iPhone Distribution: FINSTRAL SPA
> (OUR-TEAM-ID)"
> [cordova] Provisioning Profile: "FINSTRAL (AppStore)"
> [cordova] (PROV-PROFILE-UID)
> [cordova]
> [cordova] /usr/bin/codesign --force --sign
> 70F84903046CDD6B734A987E4CB044FE5E18C5EA --entitlements
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/IntermediateBuildFilesPath/FINSTRAL.build/Release-iphoneos/FINSTRAL.build/FINSTRAL.app.xcent
> --timestamp=none
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/InstallationBuildProductsLocation/Applications/FINSTRAL.app
> [cordova]
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/InstallationBuildProductsLocation/Applications/FINSTRAL.app:
> unknown error -1=ffffffffffffffff
> [cordova] Command /usr/bin/codesign failed with exit code 1
> [cordova]
> [cordova] ** ARCHIVE FAILED **
> [cordova]
> [cordova]
> [cordova] The following build commands failed:
> [cordova] CodeSign
> /Users/schauerte/Library/Developer/Xcode/DerivedData/FINSTRAL-bsnohhydgksblzfcqjeuvibucnhv/Build/Intermediates.noindex/ArchiveIntermediates/FINSTRAL/InstallationBuildProductsLocation/Applications/FINSTRAL.app
> [cordova] (1 failure)
> [cordova] Error: Error code 65 for command: xcodebuild with args:
> -xcconfig,/Users/schauerte/tatakoto/dev/schauerte/cleverdox/build/fis.productive/local/ios/platforms/ios/cordova/build-release.xcconfig,-workspace,FINSTRAL.xcworkspace,-scheme,FINSTRAL,-configuration,Release,-destination,generic/platform=iOS,-archivePath,FINSTRAL.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/schauerte/tatakoto/dev/schauerte/cleverdox/build/fis.productive/local/ios/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/schauerte/tatakoto/dev/schauerte/cleverdox/build/fis.productive/local/ios/platforms/ios/build/sharedpch,EMBEDDED_CONTENT_CONTAINS_SWIFT
> = YES,ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO,LD_RUNPATH_SEARCH_PATHS =
> "@executable_path/Frameworks"
> {code}
> This happens during Archiving and before Exporting.
> As the messages say, the PROV-PROFILE etc. are resolved correctly. All
> certificates are locally available in the login keychain. All profiles are
> downloaded by xcode 9.
> there are no outdated/old certificates or profiles on the mac system. we
> deleted even old private keys.
> We tried the same setup with different TEAM-IDS (and their corresponding
> PROV-PROFILES). The error always occurrs.
> We unlock the keychain immediatly before we run the release command:
> {code}security unlock-keychain ~/Library/Keychains/login.keychain-db{code}
> Without the bugfix provided by https://github.com/jrryhrtn/cordova-ios.git
> (creation of exportOptions.plist) the release command failed even for
> packageType=enterprise. But with the bugfix applied it still fails for
> packageType=app-store.
> After the release command fails I can open the xcode project in xcode 9 an
> export the app without any problems. I don't have to manually modify any
> setting in xcode.
> I tried a lot of coinfiguration variants, cleaned up keychain on the mac
> computer, installed various patches, and so on (for two days). Finally I have
> to state that I can't get it running. So I ended up here with posting an
> issue ticket.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]