Code Sign Error on Xcode 8 and iOS 10 Cordova Project

34,323

Solution 1

As dpogue pointed out, cordova fixed this issue with the commit

92a62997adb3c8512328d5a0ae42fe5d156291f1

which is in the master branch of their iOS platform repository.

To benefit from this fix, you'll have to install the latest dev version like this

cordova platform remove ios && cordova platform add https://github.com/apache/cordova-ios.git

And you need to add a build.json file to your project root that looks like this

{
  "ios": {
    "debug": {
      "developmentTeam": "YOURTEAMID"
    },
    "release": {
      "developmentTeam": "YOURTEAMID"
    }
  }
}

You can get your Team ID here: https://developer.apple.com/account/#/membership

Now run your build

cordova run ios --device 

... or specifying your build.json

cordova run --buildConfig=build.json ios --device

and it should work!

Solution 2

I wrote about the workaround I used to resolve this:
https://dpogue.ca/articles/cordova-xcode8.html

To recap, you need to specify your developer team ID. In the next version of Cordova-iOS, you can do this with developerTeam in your build.json file. I have a hook available in the meantime.

You also need to set your code signing identity to "iPhone Developer", even for release builds. Do this with codeSignIdentity in your build.json.

You should not need to specify a provisioning profile, Xcode will automatically handle that when it has the team ID.

Hope that helps!

Solution 3

I had the same problem with xCode 8 on an Apache Cordova build for iOS, tried every solution i could find with no results, the only thing that worked was to specify the development team, package type and provisioning file in the build.son file like this:

{
  "ios": {
    "release": {
      "developmentTeam": "yourdevteamid",
      "packageType": "app-store",
      "provisioningProfile": "yourprovfileUUID"
    }
  }
}

Many postst suggest specyfing the "codeSignIdentity": "iPhone Developer", but that gave another error, only this configuration worked for me (maybe something with how the development certificates were created?), hope it helps someone.

Solution 4

This works for me

 "ios": {
    "release": {
      "developmentTeam": "yourdevteamid",
      "packageType": "app-store",
      "provisioningProfile": "yourprovfileUUID"
    }
  }
}

If I add "codeSignIdentity": "iPhone Development", it doesn't work , so remove codeSignIdentity in the build.json file. I also had to add all icon to config.xml

 <icon src="res/ios/[email protected]" width="180" height="180" />
        <!-- iOS 7.0+ -->
        <!-- iPhone / iPod Touch  -->
        <icon src="res/ios/icon-60.png" width="60" height="60" />
        <icon src="res/ios/[email protected]" width="120" height="120" />
        <!-- iPad -->
        <icon src="res/ios/icon-76.png" width="76" height="76" />
        <icon src="res/ios/[email protected]" width="152" height="152" />
        <!-- Spotlight Icon -->
        <icon src="res/ios/icon-40.png" width="40" height="40" />
        <icon src="res/ios/[email protected]" width="80" height="80" />
        <!-- iOS 6.1 -->
        <!-- iPhone / iPod Touch -->
        <icon src="res/ios/icon.png" width="57" height="57" />
        <icon src="res/ios/[email protected]" width="114" height="114" />
        <!-- iPad -->
        <icon src="res/ios/icon-72.png" width="72" height="72" />
        <icon src="res/ios/[email protected]" width="144" height="144" />
        <!-- iPhone Spotlight and Settings Icon -->
        <icon src="res/ios/icon-small.png" width="29" height="29" />
        <icon src="res/ios/[email protected]" width="58" height="58" />
        <!-- iPad Spotlight and Settings Icon -->
        <icon src="res/ios/icon-50.png" width="50" height="50" />
        <icon src="res/ios/[email protected]" width="100" height="100" />
        <!-- iPad Pro -->
        <icon src="res/ios/[email protected]" width="167" height="167" />
Share:
34,323
Vijay
Author by

Vijay

Updated on March 14, 2020

Comments

  • Vijay
    Vijay over 4 years

    I have a cordova project which I build and run locally deploying it on my iPhone and android device.

    However after i have upgraded to Xcode 8 and my iPhone iOS to iOS 10, I cant build ipas locally. It fails with the following error.

    === BUILD TARGET * OF PROJECT * WITH CONFIGURATION Debug ===

    Check dependencies Signing for "*" requires a development team. Select a development team in the project editor. **Code signing is required for product type 'Application' in SDK 'iOS 10.0'

    This was working perfectly before the update. After the update the build for iOS fails.

    The relevant version numbers for the project are

    ios-deploy -V - 1.8.6
    xcodebuild -version - Xcode 8.0 Build version 8A218a
    

    I have got my Xcode setup with proper certificates and provisioning profiles.