Code point error does not detect command id during Cordova ios build

After reading all the previous code error messages, I reached a dead end. When building a cordova project (version 4.3.0) with ios platform (version 3.8.0) and using the Bamboo server for continuous integration. I cannot get my app to sign an iOS app for release. This is the order of my build tasks:

  • unlock keychain (I have verified that my iPhone developer and distribution certificates are valid and not expired. I have also verified that there are no permission windows on the Bamboo server, such as asking permission to unlock the keyring.)
  • cordova platform remove ios (clear directory and start fresh)
  • add plugins for ios
  • cordova platform add ios
  • cordova build ios --release --device (create a device version to eventually upload to the app store)
  • xcrun for embedding mobileprovision

Then I get this error while doing task # 5 above:

    === BUILD TARGET Abczyx OF PROJECT Abczyx WITH CONFIGURATION Release ===
    Check dependencies
    Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID "(null)" were found.
    CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

    The following build commands failed:
    Check dependencies
    (1 failure)
    Error code 65 for command: xcodebuild with args: -xcconfig,/usr/local/Bamboo/Abczyx/platforms/ios/cordova/build-debug.xcconfig,-project,Abczyx.xcodeproj,ARCHS=armv7 armv7s arm64,-target,Abczyx,-configuration,Release,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/usr/local/Bamboo/Abczyx/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/usr/local/Bamboo/Abczyx/platforms/ios/build/sharedpch

ERROR building one of the platforms: Error: /usr/local/Bamboo/Abczyx/platforms/ios/cordova/build: Command failed with exit code 2

      

Here is mine build-release.xcconfig

:

   #include "build.xcconfig"

   CODE_SIGN_IDENTITY = iPhone Distribution
   CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution

   #include "build-extras.xcconfig"

      

Here is mine build.xcconfig

:

   // Type of signing identity used for codesigning, resolves to first match of given type.
   // "iPhone Developer": Development builds (default, local only; iOS Development certificate) or "iPhone Distribution": Distribution builds (Adhoc/In-House/AppStore; iOS Distribution certificate)
  CODE_SIGN_IDENTITY = iPhone Developer
  CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer

  // (CB-7872) Solution for XCode 6.1 signing errors related to resource envelope format deprecation 
  CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist

      

The Bamboo server runs Xcode 6.1.1 Build version 6A2008a on OS X 10.9.4. And I clicked update for xcode settings> Accounts> User> Identity and Profile Signatures.

I am using Xcode 6.2, Build version 6C131e for OS X 10.9.4 mac book pro for my local machine and I am still getting this same error. However, one of the weird things is that on my local machine I sometimes run cordova build ios --device

without a flag --release

and I can create an .ipa in my platform / ios / build / device folder that is signed for debug, but that doesn't work on the remote Bamboo server (although it worked a few days ago).

I've looked into the releases for Cordova iOS v.3.8.0 here and haven't found anything useful to try outside of CB-7872 CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist

, which is already fixed: https://github.com/apache/cordova-ios/blob/master/RELEASENOTES. md

I have verified that the Bamboo server contains the iphoneos8.1 sdk which it checks.

I have verified that the profile positions are up to date and no one has worked on my repo.

I have verified that my CODE_SIGN_IDENTITY is good with this post and script: Xcode fails with Code Signing signatures "Error

I tried to add a post-build delay, but I can no longer complete the build step before I can do it: Failed to build build version of cordova ios app

I tried to consider removing the autocomplete / control feature, but not sure if this is just another bunny hole: xcodebuild says it does not contain schema

I tried looking at the source here: https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/lib/build.js But I don't see anything obvious to confirm or test ..

Two questions:

  • Why is there "null" for teamID? How to check where it is checked?

  • What else am I missing? What else can I check? Specifically in the source of the cord-based assembly ios script?

+3


source to share


1 answer


TL; DR

  • Why is there "null" for teamID? How can I check where this check is?

Most likely incorrect keychain setup for iPhone distribution. Check and make sure you have a certificate with an attached key.

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


Make sure flags and options are set if you are using command line tools. If not, try using various wrapper tools such as the Fastlane ruby โ€‹โ€‹gem.

Long version

We figured it out by using a wrapper tool around Apple Developer Console and Code Signing and making sure the p12 file (cert + key) is set correctly.

  • Install the KrauseFx Fastlane gem: https://github.com/KrauseFx/fastlane
  • Export the Keychain Access iPhone distribution p12 file from our Bamboo build server to your local machine (for easier troubleshooting). The p12 file basically includes a certificate with an attached key icon, which is needed since Rich Tolley mentioned above in the comments.
  • Double click the p12 file to set it to the login keychain. Make sure you see the structure of the nested certificates.
  • Open Xcode> Preferences and make sure the iOS distribution is added as part of the Signature IDs (both iOS Development and iOS Distribution are shown).
  • Clean up your cordova / project directory by starting a new one (no frameworks or plugins, or using cordova platform rm ios

    etc.). Then add plugins and then add platforms.
  • We launched cordova build ios --device --release

    that built our "Abczy.app".
  • Move to the correct directory of the cord platform, as the relative path may not work correctly: ~ /.../ platform / ios / build / device (check if the file is there .app

    )
  • Run this command to convert .app

    to .ipa

    : xcrun -sdk iphoneos PackageApplication -v Abczyx.app -o /Users/myname/Desktop

    (I moved the resulting one .ipa

    to my desktop for easier management).
  • Go to the folder containing yours .ipa

    and make sure you have a mobileprovision file from an Apple developer included in the same directory.
  • The Run:   sigh resign ./Abczyx.ipa -p "Abczyx-dist.mobileprovision"

    . Copy and paste the name of the certificate / key you will be using and then it will sign the app with the mobileprovision distribution. If you are using a developer's mobile app, it will receive a fatal error, but the app will be signed anyway.
  • Alternatively, you can enter: sigh resign ./Abczyx.ipa -i "iPhone Developer: Joey Jojobuttafucco (123FTR12PAC)" -p "Abczyx-dist.mobileprovision"

+5


source







All Articles