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.)
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.
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.
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".
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"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With