EDIT:
The answer below from H2CO3 makes me almost happy. But it does not explain one thing: why do I get a runtime exception when building the app against SDK6 (UIPageViewController requires one child controller before adding it to a parent controller) but not when building against SDK5? The answer from Rolf explains what is going on: the device knows the SDK an app was built with and behaves differently to ensure maximum compatibility.
While fighting with iOS SDK versions, MonoTouch versions and different iOS Versions, I started wondering: What IS an iOS SDK after all?
I mean, I install Xcode 4.4 and I get iOS SDK 5. If I install Xcode 4.5, I get iOS SDK 6. So far no problem.
- Now assume I build an app that
targets iOS 5
and doesnot use any iOS 6 specific
things. I but build this appusing iOS SDK 6
. - Then I build the
same app
but useiOS SDK 5
.
Then I run both versions of the app on an iOS 6 device.
Why do they behave differently? There are small differences, for instance UIPageViewController throws an exception if no child controller is set before adding the page view controller as a child to a parent controller.
To my understanding, the callbacks, the features and everything is coming from the iOS Operating System and not from the SDK. But the OS is the same in both cases.
I totally understand that if I want to user an iOS 6 specific feature, I need to use iOS SDK 6 because a UICollectionView just doesn't exist in SDK 5. But the UI code for this view is obviously not getting included in my app, otherwise it would work on iOS5 too. So the collection view is coming from a shared library provided by the OS.
On top of that there is then MonoTouch. If we assume that each MonoTouch version is nothing but an extension of the bindings without fixing any bugs, it should not matter what MT version I use.
A short recap of my question would be: how do iOS version, iOS SDK version, MonoTouch version and application's target version play together?