Monotouch 5.0 and iOS 4.3 compatibility - xamarin.ios

I have got an application developed with Monotouch 4.0.7. This app is running on iPads with iOS 4.3.
Now, I want to migrate to the latest Monotouch version is 5.0. Will I be able to deploy my app on iPads with iOS 4.3? Or Monotouch 5.0 only for iOS 5.0?

Yes, it is possible to develop for iOS 4.3 (or even earlier iOS versions) with MonoTouch 5.0.
To set the minimum iOS version your app needs, go to the project's options, and in the iPhone Application page set Deployment Target to the minimum version.
Have in mind that MonoTouch will not tell you if you use iOS 5.0 API in your app. You can add iOS 5.0 features to your app, but you must not try to use those features on a lower version (here you can see how to accomplish this).

You can upgrade to Monotouch 5.x without any problems. In Monodevelop, change your SDK to 5.x
Just make sure your deployment target remains 4.3, if you still want to target that platform.
You will have to pay attention to not calling any methods that don't exist in 4.3.
If you want to have different/extended behavior on iOS 5 devices, you can check the OS version and use a different code branch.
Another small thing to be prepared for: iOS5 behaves differently in some situations. For instance if you are having hierarchical UIViewControllers, iOS5 will automatically call all UI events like ViewWillAppear(), even if you don't use the new UIViewControllery hierachy API.
What I want to say: test your app thoroughly on both iOS versions.

Related

Does MtouchSdkVersion setting affect what version of iOS we can run on?

When deploying an existing Xamarin forms proj from Visual Studio I was getting errors like "Failed to load AOT module ‘System.Net.Http’ while running in aot-only mode". This had worked in the past, it seemed Xcode had recently updated before I hit the problem. I found I was able to get the project deploying by changing the csproj entry 10.0 to 10.3. It looks like I could change this setting and everyone would be ok if they also had updated xcode.
My concern is: Does this change what versions of iOS the application can support? Would it have any other surprises when deployed to the apple store?
One thing I don't understand is I am the only person seeing this issue. Another developer is able to deploy to an iOS device (iPad instead of an iPhone) that also has the latest version of iOS without problems. Running “xcodebuild -version” shows we have the same version of xcode installed (8.3.1) and running “xcodebuild -showsdks” shows we have the same iOS sdk available (iOS 10.3).
There is some good documentation on the iOS SDK version: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Overview/overview.html#//apple_ref/doc/uid/20002001-BABEBGCF
You can build against a higher version of the SDK and run against lower versions of iOS.
Building against different versions of the iOS SDK can cause differences in behavior, these may show as regressions in your application.

Javame sdk 8.3 doesn't work on Netbeans

I've faced a problem with configuring Netbeans 8.1 to develop javame application with Javame SDK 8.3. When a javame project is created, Platform property remains grayed, compilation produced the message:
Platform home (platform.home property) is not set. Platform home (platform.home property) is not set. Value of this property should be <space> emulator home directory location.
When I try to fix project property on the platform tab, I see that:
No CLDC platform available
An old Javame SDK 3.4 works.
Any ideas could be helpful.
The confusion comes from the fact that JavaME is so much more than just MIDP/CLDC. It is used for so many other things, like e.g. Blu-ray players and other embedded devices.
MIDP and CLDC are merely JSR API's - which for some reason has been excluded from the SDK 8.x versions. This is why it can't find a CLDC platform, unless you install SDK 3.4
No other way around it than to use SDK 3.4
MIDP2.0 = JSR118
CLDC1.1 = JSR139
No where to be found in the list of SDK 8.x supported APIs: http://docs.oracle.com/javame/8.3/javame-apis.htm

Async/Await in portable class library targeting Windows Store, iOS and Droid

Developping an MvvmCross application targeting Android and iOS (Xamarin/Mono) and Windows Store (because it's so easy/fast to debug compared to iOS/Android).
The Core of the app is PCL based.
Is it possible to use Async/Await in the Core library?
Xamarin mono supports Async/Await, and Windows Store supports it.
However, when selecting only Net4.5, Windows Store, Mono Android and MonoTouch as the PCL targets, SL4 and WP7.5 get automatically selected and Async/Await is not availlable anymore.
The latest I have is: TPL on PCL of mvvmcross
But PCL support from Xamarin has officially launched in the last week - so the latest I have is be out of date. Miguel has promised a blog post on the current status when he returns from Build.
Also, I have seen user comments like "I'm using asyncbridge and profile47 with heavily usage of async inside PCL. Works perfect on iOs and Android, with MvvmCross events it looks like a magic" from http://forums.xamarin.com/discussion/comment/18872/#Comment_18872 - would love to see this more fully blogged, explained, documented by those who have it working.

System.IO.MemoryMappedFiles on MonoTouch?

I wanted to convert a small test application from Windows .NET 4 to MonoTouch but I am missing System.IO.MemoryMappedFiles.
Then I tried it with a plain Mono console app and the namespace isn't there either.
I tried Mono 2.10 in combination with MonoDevelop 2.4.
Is it supposed to be there or not? I'm kind of confused, as .NET4 compatibility was announced with Mono, as far as I know.
Mono 2.10 has some support for memory mapped file. However it is not 100% complete (and Windows-specific things like security are not likely to be ever included) so YMMV.
You can browser what's available from the GIT repository:
https://github.com/mono/mono/tree/mono-2-10/mcs/class/System.Core/System.IO.MemoryMappedFiles
Since this is a .NET 4.0 feature you'll need to use the 'dmcs' compiler to get your code to compile (and also reference System.Core.dll where the types resides).
As for MonoTouch it provides a subset of Mono (originally based on the 2.1 profile from Silverlight and extra, even some 4.0, features). Currently (for MonoTouch 4.x) this does not include any type from System.IO.MemoryMappedFile.* namespace. Future versions will offer more .NET 4.0 features (if they are available from iOS).

XCode 4 - Base SDK == Latest iOS (iOS 4.3)

To continue in my post-XCode 4 upgrade confusion, i came across this....
My Build Settings has Base SDK as iOS 4.3.
Now back in XCode 3.x days I remember 2 things:
The Base SDK was always set to iOS 4.0.
The target device was set to iphone 3.0 (to ensure greatest iphone audience).
What consequence is there for this Base SDK?
I mean, if SDK 4.0 provides support for features that only iOS4/iPhone4) provides, then why are these two separate build settings?
You can choose iOS 4.0 as your base SDK, but as long as you do not use APi's that are 4.0 and up your code should run on 3.x unless you used apis that were only in 3.2 and so on =)
Always a good thing to check the availability of methods when you look in the class reference.
I recommend using 4.x stuff.. because the people that use 3.0 are not worth supporting ( Only the really old devices are still running that, iPhone 1 -- most users have upgraded by now to an iPhone 3Gs or 4 ), the features you get in 4.x, including GCD are awesome.

Resources