Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify "development team" in Xcode

Tags:

cordova

I'm trying to do a release build for ios using the following command:

cordova build --device --release ios

(As per the docs, I've provided a build.json.)

However, I get the following error:

Check dependencies Signing for "MyApp" 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'

When I open the MyApp.xcodeproj file in platforms/ios using Xcode, there is not a "General" tab where I can specify "developement team" under "Identity". Cordova apparently does not provide a complete project for Xcode.

I am totally flummoxed. How do I create a release build with signing for the App Store?

(MyApp works fine in the ios simulator using debug build and no signing.)

like image 504
Richard Eng Avatar asked Nov 07 '16 21:11

Richard Eng


People also ask

How do I change my team in Xcode?

Click Xcode > Preferences > Accounts. In the resulting dialog, click the small plus sign under the left side list of accounts and servers. Complete the resulting form, providing your Apple ID and password. Close Preferences, and then change the Team list box entry from None to the team associated with the Apple ID.

Why team is not showing in Xcode?

If the team is missing in one of the menus, let the account owner remove your membership in App Store Connect and re-invite you. After accepting your new invitation, the missing team should be displayed on both App Store Connect and the Developer portal. Now you can also use it in Xcode.


2 Answers

In the project navigator, click on your project, then go to Build Settings, then choose "All" to show all available settings. (It should be next to Basic and Customized buttons, these filter the settings shown). Then scroll down to "Signings", and there should be an option titled "Development Team".

like image 127
Rocklan Avatar answered Oct 17 '22 08:10

Rocklan


If using Xcode 8 or newer you can use automatic signing feature, to use it, your build.json has to be like this:

{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "FG35JLLMXX4A",
            "packageType": "development"
        },
        "release": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "FG35JLLMXX4A",
            "packageType": "app-store"
        }
    }
}

Notice that even for release you use iPhone Developer as codeSignIdentity

Old answer:

First you have to update to Cordova CLI 6.4.0 Then update your iOS platform to 4.3.0

And the build.json should be something like this

{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Development",
            "provisioningProfile": "926c2bd6-8de9-4c2f-8407-1016d2d12954",
            "developmentTeam": "FG35JLLMXX4A",
            "packageType": "development"
        },
        "release": {
            "codeSignIdentity": "iPhone Distribution",
            "provisioningProfile": "70f699ad-faf1-4adE-8fea-9d84738fb306",
            "developmentTeam": "FG35JLLMXX4A",
            "packageType": "app-store"
        }
    }
}
like image 20
jcesarmobile Avatar answered Oct 17 '22 09:10

jcesarmobile