MonoTouch - .NET 4.0 on an iPhone - xamarin.ios

We've upgraded to MonoTouch 4.0 and the new MonoDevelop.
In order to get .NET 4.0 , do we need to enable a setting, or does MonoTouch automatically compile against the newest Mono ?
Everything has been working perfectly, iTunes has accepted all our apps, all without issue. We've released now nearly 70 apps made with MonoTouch and have thousands of users.

MonoTouch 4 requires that you have previously installed Mono shared runtime 2.10.1 in order to install it.
Once you have installed Mono runtime, MonoDevelop and of course ios 4.3 sdk now you can install monotouch 4, once installed you are now able to get Net 4 love by creating a new iphone solution :) (yes you dont have to modify any settings)
Hope this helps
Alex

As far as I can tell from MonoTouch's website ( http://monotouch.net/Releases/MonoTouch_4/MonoTouch_4.0.0 ), it says "Core Mono Runtime upgraded to Mono 2.10" so it looks like dmcs ( http://www.mono-project.com/Release_Notes_Mono_2.10 ) is included. I don't have MonoDevelop installed, but I might be able to help you out with my suggestion:
Look in Project -> Options -> Build -> General -> Runtime Version (I couldn't post more than 2 links since I'm a new user.)
I hope this answers your question.

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.

install and execute cocos2dx project on windows 8

I am making a small basic game for multiple mobile platforms using cocos 2dx, I have done all the coding in c++ on xcode and the project is running fine for iOS and android.
But when porting to windows phone I am facing a lot of hurdles. I am using cocos2dx 2.1.3 on visual studio 2012 express on 64 bit windows 8 with windows 8 phone SDK.
Firstly i don't get templates for cocos2dx, then there is no option to run the project in simulator or device. I have been digging the internet alot for this and have found some tutorials but all of them have one or the other limitations.
can somebody guide me with this windows part or a totally new way round to implement cocos2dx on multiple platforms ?
Option 1
Your going to have to open a new Direct3D project and follow the directions from here
Option 2
There are a couple build scripts available to generate project types for all platforms in python, as seen here.
(this works with 2.1.2 or later)
Option 3
Newer versions of cocos2d-x have build scripts for all platforms that come with the latest git repos. Not sure if there are a lot of breaking changes but the newer versions also have build projects.(build-win32.bat)
About the project template.
The templates for windows 8, at least in the last stable release I looked at a month ago, still had some issues with the html in the c++ project wizard but, the current development branch should have that fixed for the windows 8 visual studio browser. If they haven't then there are a couple of html meta-data tags that will need to be removed as they are depreciated in order for the project wizard to be usable.

Can I reference .NET 4.0.3 runtime in MonoDevelop on a Mac?

In my question about using .NET 4.0.3 in a Portable Class Library I spoke a little too soon: I got the PCL working on my Windows machine, but now I can't get it working on the Mac. If the library is set to use .NET 4.03, I get compiler errors in MonoDevelop, saying that the framework is not supported. So I'm stuck on PCL for .NET 4.0, which is annoying because I need some features from 4.0.3.
So, is there a way to target .NET 4.0.3 in MonoTouch/MonoDevelop on the mac?
MonoDevelop (up through 3.0.6) is/was hard-coded to only work with PCL Profile1 (I think it was Profile1, anyway). As a workaround, you can try changing over to Profile1 and building that.
On MacOS, MonoDevelop simply links with MonoTouch (or Mono4Android) system assemblies and ignores the PCL profile constraints (other than verifying that the profile is Profile1). If MonoTouch has the 4.0.3 APIs that you are trying to use, then things will build fine.

Monotouch 5.0 and iOS 4.3 compatibility

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.

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