Bug 14889 - There is no way to select iOS SDK 6.1 in project / build options in some cases
Summary: There is no way to select iOS SDK 6.1 in project / build options in some cases
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2013-09-20 15:08 UTC by Ievgen
Modified: 2013-09-20 20:36 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Ievgen 2013-09-20 15:08:34 UTC
I've recently updated my environment to the latest stable MonoTouch and Studio updates. Figured that everything got broken and decided to download SDK 6.1 for XCode 5.0. So I got two SDKs for iPhone Simulator and I was able to select the 6.1 for debugging purposes. But when I tried to compile my project and deploy it to my iOS 7 bases iPhone, I couldn't do this.

I got this error:

Xamarin.iOS 6.4.5 Indie Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
error MT4103: The registrar found an invalid type `MonoTouch.UIKit.IUIBarPositioning` in signature for method `MonoTouch.UIKit.UISearchBar/_UISearchBarDelegate.GetPositionForBar`: The type implements INativeObject, but does not have a constructor that takes two (IntPtr, bool) arguments.

When I went to the project options I noticed that if I choose build configuration for iPhone simulator I have an option of choosing SDK 6.1 as default but if I switch to iPhone this option disappears. Also if I choose Ad-Hoc there is no way to choose SDK 6.1 either.

This seems like a bug since I would like to publish my app targeted to SDK 6.1 into the TestFlight.
Comment 1 Jeffrey Stedfast 2013-09-20 17:40:08 UTC
I think what you are looking for is the "Deployment Target" in the Info.plist editor.
Comment 2 Ievgen 2013-09-20 17:59:56 UTC
Well, Deployment Target is set to 6.0 and I've noticed it doesn't affect building process anyhow. It seems it's just a metadata for a compiled app.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-09-20 18:46:50 UTC
> Xamarin.iOS 6.4.5 Indie Edition using framework:

This is not the latest stable version of Xamarin.iOS (7.0 is).

Now the strange part is that MonoTouch.UIKit.IUIBarPositioning was introduced in Xamarin.iOS 7.0 - so it looks like somehow you have monotouch.dll from Xamarin.iOS 7.0, but you're building with Xamarin.iOS 6.4.5.

Can you try reinstalling Xamarin.iOS 7.0?
Comment 4 Ievgen 2013-09-20 19:00:49 UTC
Well, indeed it's interesting. Maybe some all binaries were left in bin/Debug or bin/Release folders in my solution, so when I was switching SDKs and recompiling the project the dlls mixed all together (which is a target for improvement to make sure that all bin and obj folders are cleaned before building for a higher version of SDK). 

Anyways, I had to revert to XCode 4.5, so I am working on SDK 6.1 with Xamarin latest Stable update. 

The reason why I created the bug is that I believe there is a mis-design in Project Options UI where you can't select previous SDK 6.1 if you build for iPhone on iOS 7 or for Ad-Hoc publishing.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2013-09-20 19:27:54 UTC
How did you install the 6.1 SDK for Xcode 5? Xcode doesn't give an option of downloading it.

Xamarin Studio should offer the SDKs you have installed, but maybe there's a detection problem (does Xcode offer you to use the 6.1 SDK?)

Anyways, reassigning to Xamarin Studio since this is related to the XS's UI.
Comment 6 Ievgen 2013-09-20 19:40:54 UTC
Well, it's pretty simple. You just go to "XCode / Preferences / Downloads" and choose there to download iOS 6.1 Simulator. By doing this you're getting SDK 6.1 installed on your local machine as well. 

Eventually you can see the list of two SDKs 6.1 and 7.0 in Xamarin Studio as well. I though it's expected behavior.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2013-09-20 19:47:23 UTC
Downloading the iOS 6.1 simulator will not install the 6.1 SDK, those are two separate things. Even if you use the iOS 6.1 simulator in Xcode, you'll build using the 7.0 SDK.

In order to use a different SDK in an Xcode project you must open the Build Settings in the project configuration, and change "Base SDK" to something else.
Comment 8 Ievgen 2013-09-20 19:51:11 UTC
Oh, thanks for the info, I didn't know! This is what I noticed too, that changing SDK in Xamarin doesn't affect the builded app, this is why I downgraded back to XCode 4.6.

But I could say for sure that the option of selecting iOS SDK 6.1 in Xamarin Studio appeared after I downloaded iOS 6.1 iPhone Simulator in XCode (I hope I am not missing something though...)
Comment 9 Jeffrey Stedfast 2013-09-20 20:36:24 UTC
Oh, then what you want to set is the SDK setting in the "iOS Build" panel in the Project Options, not the Deployment Target in the "iOS Application" panel.

The Deployment Target is, like you said, just metadata on what the minimum OS version your app is expected to run on.

Sorry about the confusion before, I misunderstood what you were looking for.