LearneriOS
LearneriOS

Reputation: 437

How to asssociate iOS 9.0 SDK with Xamarin to compile the default application?

I am facing a problem while executing the default application that has been given by Xamarin which is "XamarinCRM". When i try to compile I face the following errors which I can easily understand.

"/Users/admin/app-crm/src/MobileApp/XamarinCRM.iOS/MTOUCH: Error MT4134: Your application is using the 'Contacts' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS 9.0, while you're building with the iOS 8.4 SDK.) This configuration is only supported with the legacy registrar (pass --registrar:legacy as an additional mtouch argument in your project's iOS Build option to select). Alternatively select a newer SDK in your app's iOS Build options. (MT4134) (XamarinCRM.iOS)"

Clearly it states that I need to change the iOS SDK against which I need to compile should be iOS 9.0 . I have tried to change the SDK version against which I have to compile as shown in the following figure:

enter image description here

But as shown in the figure I have no option for iOS SDK 9.0 inspite of Xcode 7.3 beta been installed on my Mac. To prove that I have iOS 9.0 SDK I am also attaching the xcodebuild output as well:

enter image description here

I want to know how can I can I associate the iOS 9.0 SDK with the Xamarin so that it uses it to compile my project ?

MORE INFORMATION : I have Xcode 7.3 beta installed. This problem is faced only on device not on the simulator. The device has iOS 9.1.1 in it. I have latest version of Xamarin on my Mac . I just want to run the iOS part of the app.

Upvotes: 2

Views: 1613

Answers (2)

Igor Jakovljevic
Igor Jakovljevic

Reputation: 84

If you are facing the same issue with the new iOS SDK 10 issue. How I Solved it was to copy the SDK from xcode7 to the new xcode8.

SDK Location 1: applications/Xcode/Contents/Developer/Platforms/iphoneos.platform/developer

SDK Location 2: applications/Xcode/Contents/Developer/Platforms/iphonesimulator.platform/Developer

Just copy the desired SDK to the same folder in the new Xcode Version.

Restart Xamarin/VisualStudio.

Upvotes: 0

Rolf Bjarne Kvinge
Rolf Bjarne Kvinge

Reputation: 19335

By default Xamarin Studio will use /Applications/Xcode.app.

My guess is that this is Xcode 6.4, and you have Xcode 7.3 beta installed in /Applications/Xcode-beta.app.

This means that you need to tell Xamarin Studio to use a different Xcode in Xamarin Studio's Preferences (Projects/SDK Locations/Apple - Apple SDK - see also this answer: https://stackoverflow.com/a/20049875/183422)

In any case the final release of Xcode 7.3 has been published, so the easiest would probably be to just upgrade your /Applications/Xcode.app.

Have in mind that you'll need to close and re-open the solution if you change the default Apple SDK location in Xamarin Studio's Preferences for the change to take effect.

Upvotes: 4

Related Questions