1

I’m using Xamarin Forms 3.4 and VSTS to build and deploy to iTunes and Google Play.

During February (perhaps a bit earlier) I was getting a warning when I was trying to deploy to iTunes. The warning was the following

SDK Version Issue - This app was built with the iOS 11.4 SDK. 
Starting March 2019, all iOS apps submitted to the App Store must be built 
with the iOS 12.1 SDK or later, included in Xcode 10.1 or later

Everything that I tried so far didn’t work.

So I added a “Bash script” step before the build step and added the following 2 lines in the script

sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_16_0
echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_10.1.app;sudo xcode-select --switch /Applications/Xcode_10.1.app/Contents/Developer

I found the previous script and guideline in https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml&viewFallbackFrom=vsts#xcode The build is successful but the deployment to iTunes fails with the error

ERROR ITMS-90596: "Invalid Bundle. The asset catalog at 'Payload/MyApp.iOS.app/Assets.car' can't be processed. Rebuild your app, and all included extensions and frameworks, with the latest GM version of Xcode and resubmit."

Before adding the “Bash script” step, I didn’t have this problem in iTunes deployment.

So I guess that the question is obvious… what am I doing wrong?

Dimitris
  • 725
  • 1
  • 10
  • 28
  • Try updating your Xcode (and your SDK) to the latest version. (also use `xcode-select --install`) What are you getting as an output from `xcode-select -p`? Is it the default path: `/Applications/Xcode.app/Contents/Developer`? Or is Xamarin shipping their own version of the SDK? – Ramon Apr 02 '19 at 13:00
  • The reason this is happening is that you might not be targetting iOS SDK 12.1 which is shipped with Xcode 10.1, Are you sure that your projects are targetting the same? – FreakyAli Apr 02 '19 at 13:21
  • Ramon This is a VSTS build so updating XCode is not an option. – Dimitris Apr 02 '19 at 14:11
  • G.hakim, I didn't get it. How can I target the iOS SDK 12.1? – Dimitris Apr 02 '19 at 14:20

2 Answers2

0

Go to This Link And look at

Apple has indicated that starting in March 2019, all apps and updates submitted to the App Store must have been built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later. Apps should also support the iPhone XS and 12.9" iPad Pro screen sizes.

Ezz
  • 17
  • 2
  • 9
  • This is was I was getting as a message and I put it on my post! I establish the fact that this is a guideline from iTunes in my question. Repeating it, want make it go away! – Dimitris Apr 03 '19 at 00:08
0

I think in your case maybe updating Visual studio will solve your issue, Because updating VS will update your Xamarin.iOS sdk version to 12.1+ if it is lower than this.

And also if you have Xcode 9.4 installed then you will need to install Xcode 10.1 to provide support for iOS 12.0 and above for Visual Studio

You can download latest version of Xcode from following link How to download Xcode DMG or XIP file?

Akshay Jadhav
  • 145
  • 1
  • 12
  • It's a VSTS build! (Azure DevOps) I stated that in the first line of my post. It's not my machine. So updating my VS would not have any difference on the build. Do you mean something else? – Dimitris Apr 03 '19 at 07:37
  • Yes @Dimitris, please go through following link it may help you understand what I mean to say https://learn.microsoft.com/en-us/appcenter/build/ios/first-build – Akshay Jadhav Apr 03 '19 at 09:18
  • Sorry but I didn't read anything relevant on building the xamarin forms app for iOS in Azure DevOps. Perhaps you can share the specific detail rather than the entire link! – Dimitris Apr 03 '19 at 10:01