One Bad Apple Can Ruin The Deployment Process
Recently, I was updating an older iOS app that I had built in Xamarin to the latest version of iOS (iOS9) and I was once again reminded of how much I truly dread the App Store development and deployment process. This post will cover a few of the issues that I encountered during this upgrade to iOS9.
Code Signing Error
After updating my application to take advantage of Xamarin's Unified API and making the countless changes necessary for that - I was ready to test the app using a local device only to be encountered with a message I had seen many, many times before.
Code Signing Error ... codesign failed with exit code 1
That's right. If you have seen this error before, you know how frustrating this process can be. Settings up Provisioning Profiles, ensuring the proper devices are included within these same profiles and then actually going about generating the certificates so that you can use the profiles. It's a nightmare.
However, in my troubleshooting of this issue, I did come across a piece of advice that did help the process a bit. If you are encountering issues with provisioning or deployment, try building a sample application in XCode and running it.
What this will do is generate the necessary profiles (assuming you have your Apple Developer Account credentials within XCode) for this example application. You can then go back into Xamarin Studio and use these same provisioning profiles to run and deploy your existing application.
Invalid resource specification rule(s)
This was another issue that popped up a few times during the build process that required a bit of head scratching. I couldn't see anything out of the ordinary, no major issues when building the application, but when I went to deploy it onto a device -cue explosion-.
Eventually, I came across this related discussion from the Xamarin forums that actually mention that the issue is a known problem with the latest release and thankfully provided a work-around. To stop this issue from popping up when building the application and deploying it, ensure that you are using MSBuild to build it.
To do this, follow these steps :
- Choose Project Options for the affected Project.
- Select the General tab.
- Check the Use MSBuild build engine (unsupported for this project type) checkbox that appears.
- Clean and Rebuild your Project.
You may see hundreds or thousands of "warning" messages appear in the log, however the application should build and work as expected.
Orientation Errors during Deployment
The last hurdle that I encountered during the deployment process when submitting the app to the App Store via Application Loader. I received an error that mentioned something to the extent of :
All interface orientations must be supported unless the app requires
full screen. A launch storyboard or xib must be provided unless the app requires
full screen.
This one wasn't too bad and the easiest fix I found was simply to open up the Info.plist
and add an attribute called UIRequiresFullScreen
set to Yes
:
Adding this will prevent your application from being used in multitasking-related scenarios. This may not work for all applications (based on your needs), but it should fix the issue if yours doesn't require that.