It is the first time for me to build a release version for iOS.
I try follow this article http://ionicframework.com/docs/v1/guide/publishing.html
Everything in Apple website is fine, until the step to run ionic cordova build ios --release and reached error (attached at the end).
Troubleshooting actions:
I tried to open the project in xcode: go to signing -> untick “automatically manage signing” -> signing(release) -> select the team -> give “iOS Distribution” to Signing certificate.
But ionic cordova build ios --release still fails with the same error.
Note. I have just purchased the developer license. It is the first time to use it, there might be somewhere I misconfigured?
xxx has conflicting provisioning settings. xxx is automatically signed for development, but a
conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity
value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
afterwards, fastlane automatically handled my profile and certificates. then release build works without error.
However, the “You have to specify a new version number” appears when fastlane tries to upload to itune connect. the solution mentioned in internet didn’t help (because xcode cannot locate my info.plist file, i dont know why)
At this step, I switched back to xcode since release build works, and I manually create archive in xcode then upload to itune connect.
It would be nice to fix the fastlane version error thing and let everything go automatically. It is just too much tech debt that I cannot pay right now :).
although it is my fist time using fastlane, I do think all ionic developer should use it and create a good doc out.
It pays off and walked around all these painful manual certificate profile settings…
For anyone still struggling, I have found a solution. The problem is in the Cordova settings.
Note this:
iPhone Distribution has been manually specified
This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
It a simple thing, and the error message does make it clear that iPhone Distribution has been manually specified, but it doesn’t really say where unless you follow the path. I looked and fiddled with xcode for about three hours trying to figure this out. Hopes this helps anyone in the future.
Because the tools being used change. The docs are on Github, so if you want you can actually fix the instructions yourself and submit a Pull Request to Ionic.