Code Sign Error not finding team ID during Cordova build ios

前端 未结 1 1093
终归单人心
终归单人心 2021-02-06 18:32

After reading through all of the previous posts on code sign errors, I have reached a cul-de-sac. While building a cordova project (version 4.3.0) with ios platform (version 3.8

1条回答
  •  广开言路
    2021-02-06 19:01

    TL;DR

    1. Why is there a "null" for teamID? How can I check where it's checking?

    Most likely improper keychain setup for iPhone distribution. Check and make sure you have the cert with the nested key.

    1. What else am I missing? What else can I check? Specifically in the source of cordova build ios script?

    Ensure proper flags and options are set if you using command line tools. Otherwise, try different wrapper tools like Fastlane ruby gem.

    Long version

    We figured it out using a wrapper tool around Apple developer console and code signing and making sure the p12 file (cert+key) file was set correctly.

    1. Install KrauseFx's Fastlane gem: https://github.com/KrauseFx/fastlane
    2. Export the iPhone distribution p12 file from Keychain Access from our Bamboo build server to a local computer (for easier troubleshooting). The p12 file basically includes a cert with a nested key icon, which is necessary as Rich Tolley mentioned above in the comments.
    3. Double-click on the p12 file to install it in the "login" keychain. Make sure you can see the nested cert-key structure.
    4. Open Xcode>Preferences and ensure that iOS Distribution is added as part of the Signing Identities (both iOS Development and iOS Distribution is shown)
    5. Clean your cordova/project directory by starting fresh (no platforms or plugins or using cordova platform rm ios etc.). Then add the plugins, then add the platforms.
    6. We ran cordova build ios --device --release, which build our "Abczy.app".
    7. Move into the correct cordova platforms directory since relative path may not work correctly: ~/.../platforms/ios/build/device (check that the .app file is there)
    8. Run this command to convert the .app into an .ipa: xcrun -sdk iphoneos PackageApplication -v Abczyx.app -o /Users/myname/Desktop (I've moved the resulting .ipa onto my desktop to make it easier to manipulate).
    9. Go to the folder containing your .ipa and ensure you have the mobileprovision file from apple developer included in the same directory.
    10. Run: sigh resign ./Abczyx.ipa -p "Abczyx-dist.mobileprovision". Copy and paste the name of the cert/key you will use and then it will sign the app with the distribution mobileprovision. If you use a developer mobileprovision, it will get a fatal error but the app will be signed anyway.
    11. Alternatively, you can type: sigh resign ./Abczyx.ipa -i "iPhone Developer: Joey Jojobuttafucco (123FTR12PAC)" -p "Abczyx-dist.mobileprovision"

    0 讨论(0)
提交回复
热议问题