Xamarin.iOS 6.3

The Xamarin.iOS 6.3 series contains the upgrade of the Mono runtime engine to the Mono 3.0 system, and includes advanced features like C# and async programming.

First-class support for asynchronicity is a powerful and brilliantly simple language tool.

It makes it easy to write responsive user interfaces, which in turn makes for delighted users It makes complex workflows, with their error handling, natural to write. This translates into proper error messages and proper program recovery; and finally By letting the compiler do the work for you, it eliminates bugs from your code, and enables you to enjoy your work and to focus on what really matters for your application. This is best seen by watching it in action. See how this piece of old C# code turns into a piece of beauty. Error handling and dealing with the UI thread go from painful to trivial. To learn more about how to use async start from this article.

While asynchronicity is the main theme of this release, we also pack two years of improvements to the Mono runtime spread over more than 7,000 individual commits that are now available to Android, Mac and iOS users.

Among the new features:

  • New .NET 4.5 APIs
  • iOS generic compiler improvements, fewer "Attempting to JIT compile method” errors.
  • Async-friendly System.Net.Http
  • Improved debugging stack
  • Variant and contravariant interfaces

New .NET 4.5 APIs: We’re bringing in a huge refresh to the class libraries. Our current products have historically been an extension of the Silverlight API. Now our class libraries are based on the .NET 4.5 profile.

iOS Batch Compiler Improvements: On iOS we now generate "shareable code” for value types, a truly revolutionary innovation in code generation technology. In practical terms this means that a whole range of code that previously crashed with a "Attempting to JIT compile method” now works. While we still provide the high-performance, and fine-tuned generic code that we can infer –for example direct calls to a method Foo<T>(T x)– we generate a value-type shared version of Foo<T>(T x) that can be used in dynamic cases that previously failed. What was once a dream, is now a reality.

We call this "Generic Value Type Sharing" and it is an option enabled by default. If you do not need this functionality, you can reduce your executable size by disabling this optimization by passing the "-O=-gsharedvt" option to the "extra mtouch arguments" in the IDE.

New System.Net.Http: This is such a delightful async API that it deserves to be called out on its own. This is an async-friendly HTTP stack, and makes building clients apps trivial We now ship System.Net.Http, a new, async ready, HTTP stack that have been designed from the bottom up to work well with the new version of the language.

Debugging Upgrades: Our debugger has received a lots of small improvements and fixes, they add up and you will notice how all the small details now work more smoothly than before.

Variance and Contravariance: With the upgrade to our class libraries, we have introduced support for variance and contravariance in the core types. While this change enables a whole class of new code to be written, it also means that some old code that was not covariant/contravariance friendly will have to be adjusted.

Xamarin.iOS 6.3.8

New features

  • Add support for dispatch_set_target_queue [#12591]

Bug fixes

  • Properly install and update MonoTouchActivation.app [#10565]
  • Always use OldDynamic for simulator [#11934]
  • Avoid passing class pointers to some marshal icalls since its not AOT compatible [#12595]
  • Fix encoding (Windows) file paths so gcc can process them [#13050]
  • Fix implicit Uri to NSUrl conversion and add unit tests [#13069]
  • Fix for natively linking large applications [#13097]
  • Fix case where Subviews can be null [#13119]
  • Add back arm-darwin-mono since MD, XS and VS depends on its presence [#13172]
  • Fix LLVM not to assert on an assembly without methods [#13178]
  • Fix Touch.Unit execution duration scale

Xamarin iOS 6.3.7

This release contains many improvements and bug fixes:

New Features

New in this release:

  • Revamped Build System: Major improvements to the build process in mtouch. Every partial build product is now cached in order to rebuild as little as possible. This results in significant speed gains when doing rebuilds - depending on what has been modified in a project, a build/deploy/run cycle on device can be over twice as fast as previously.
  • Incremental Builds/Uploads: When using the mtouch argument --fastdev and turning off linking, we will now only compile the assemblies that were modified, and only upload the delta. Notice that when using incremental builds, the resulting binary must be connected to your Mac. Binaries compiled with the incremental support are not able to run when your device is unplugged.
  • Added PCL support and facade assemblies: This means that MonoTouch can now consume any PCL libraries that you created elsewhere (modulo the usual iOS and Mono limitations: no dynamic code generation, and limited WCF support).
  • Generic Code Sharing Improvements: no longer has a limit on the size of value types. Now, in addition to the type-specific generic methods, the general purpose fallback generic code will work with any value type size. Generic sharing now supports Nullable.Box and Unbox to be compiled.
  • Position Independent Executables (PIE): Native executable are now Position Independent Executable by default.
  • F#: FSharpCode.dll is now "blessed" and does not count on the 64KB limit for the Starter edition.
  • Updated Touch.Unit: Now with support for testing async methods:
    • Add back the device UDID inside the logs
    • Add the locale identifier inside the logs
    • Updated to NUnitLite 0.9

    Optimizations

    Size optimizations, reducing your binary size:

    • Using SSL/TLS requires much less code than before, leading to smaller native executables
    • The use of StartWWAN (implicit for System.Net.WebConnection) does not require reflection anymore

    Bug fixes

    The most notable bug fixes in this release include:

    • Make WebClient report an error when the download aborted prematurely [#3904]
    • Do not construct a Selector directly if we want it to return null when unassigned [#10876]
    • Improve InvalidCastException to include the ObjC type name and the name of the managed method [#12518]
    • Properly fetch handle from INativeObject instances [#12531]
    • Fix empty BigInteger with more than one 0x0 byte [#12579]
    • Fix proxy issue switching from 3G and Wifi [#12640]
    • Fix to avoid using SlowGetIntPtr for events and use __Internal when producing 3rd party bindings [#12707]
    • Fix pinvoke symbol name for CGPath.EllipseFromRect [#12712]
    • Fix synchronized wrappers of generic methods [#12727]
    • Emit DWARF line numbers info using .file/.loc assembler directives on OS X [#12731]
    • Fix register allocation for hw remainder opcodes on armv7s [#12741]
    • Remove methods from UIImage that don't actually exist on UIImage [#12803]
    • Fix an issue where LLVM and clang could not compile a project [#12805]
    • Override RespondsToSelector instead of registering the selector another time [#12833]
    • Disable the parameter type check when marshalling from ObjC to managed [#12834][#13006]
    • Do not enable PIE automatically when deployment target < 4.2 [#12840]
    • Do not retain retained result of CopyPixelBuffer [#12846]
    • Fixed AVPlayerItem.Options return type [#12847]
    • Fixes to use the clang compiler [#12941][#12723c2]
    • AOT compiler moved read-only data into a separate section [#13005]
    • Add missing NSUserDefaults fields as requested in http://forums.xamarin.com/discussion/comment/18488
    • and several other bug fixes filled against Mono 3.0

    Xamarin iOS 6.3.6

    The 6.3.6 beta release contains all enhancements and bug fixes released with 6.2.7 (stable).

    New features

    • ARMV7S support for hardware division with LLVM
      When building for ARMv7s, MonoTouch will now generate the code necessary to use the hardware instructions for division and remainder operations. This feature is only enabled when compiling with LLVM.
    • Support for Position Independent Executables (PIE)
    • Smaller executables - Partial Sharing Support
      Usually our compiler shares the code for generic instantiations of reference types (List<object> and List<string> share the same code), and now it is able to do this when value types are involved (Dictionary<object,int> and Dictionary<string,int>) this helps reduce the size of executables.
      Since our new Generic Value Type Sharing code increased the size of executables compared to the 6.2.xx series, this optimization reduces the code generated by 30%-40% on those cases.
    • New bindings for the Foundation types NSOrderedSet and NSMutableOrderedSet
    • More strongly typed dictionaries for CoreBluetooth's CBCentralManager [#11743]
    • X509Certificate now supports SHA2 and RIPEMD160 [#12303][#11703]
    • mtouch now supports --listapps to list apps installed on a device
    • Touch.Unit server now supports --devname to select a specific device
    • UIDevice.UniqueIdentifier now returns String.Empty since the selector is now blacklisted by Apple

    Bug fixes

    • Fix disposal of EAGLContext and GraphicsContext to avoid exceptions [#12212]
    • Fix SetLineDash to allow null values [#12291]
    • Add a specific error message if no SDK version is specified when using mtouch on the command-line [#12305]
    • Avoid the class name check in is_async_state_machine_class (), csc seems to generate a different name [#12329]
    • Add missing [NullAllowed] on AVAssetReaderVideoCompositionOutput constructors [#12360]
    • OpenTK's GL.DeleteTexture missing uint overload [#12401]
    • Use a different function for emitting write barriers for gsharedvt types which can handle reference types too [#12429]
    • Do not use the /usr/bin/mono-cil-strip script [#12459]
    • UIImage.AsJPEG and AsPNG are thread-safe [#12472]
    • Keep the exception object alive during debugger suspensions [#12494]
    • Multiple bug reports for AOT limitations were closed
    • Fix VS.NET support for Xcode 4.6.2 with non-English locale
    • Fix AddressBook constants to work without authorization (iOS6+)
    • Fix removal of static libraries and resources from assemblies (too large IPA sizes)

    Xamarin iOS 6.3.5

    Improved the new Generic ValueType Sharing (#11933).

    New MonoTouch.Dialog copes with C# upgrade to support covariance and contravariance.

    Changes that reduce binary sizes:

    • Runtime dead code elimination, 4-8k in savings.
    • The linker now removes all serialization constructors if the application does not create any SerializationInfo instances. This reduces an application like "Hello World" by about 110kb.

    Fixes since the last release:

    • Multiple debugger fixes.
    • Fixes linking of assemblies with resources or static libraries. (#11676, #11700).
    • Fixes issues related to thread cleanup and shutdown.
    • Fixed LLVM support on Lion.
    • Resolved an SGen/threading interaction bug that prevented AVCaptureVideoDataOutputSampleBufferDelegate and CoreBluetooth from working (#11732, #11836).
    • Fixed CAKeyFrameAnimation.FromKeyPath and CFRelease pinvoke signatures.

    Xamarin.iOS 6.3.4

    CFNetwork handler for HttpClient

    Multiple issues fixed in the AOT compiler with LLVM

    Multiple issues fixed in the linker

    Xamarin.iOS assemblies are now built with optimization enabled.

    Fixed compatibility issue between MonoTouch.Dialog and the new 4.5 based BCL. It previously would fail to compile existing code due to changes in IEnumerable.

    Xamarin.iOS 6.3.3

    Major performance improvement on AudioToolbox. Previously it was not fast enough to use on the iPhone4 and now it should work just fine.

    Multiple fixes to the AOT compiler involving generics and async.

    Fixed a few bugs in the C# compiler regarding async.

    Multiple performance improvements in genetics code involving delegates or array allocation.

    Add more generic overloads for subclasses of UICollectionViewLayoutAttributes

    Reduced the number of thread roundtrips that HttpClientHandler does in some cases.

    Optimized integer division and modulus by some constants under LLVM.

    Optimized Marshal code that read/write from native memory.

    Fixed multiple bugs in culture handling and date parsing.

    Introduced async versions of multiple iOS APIs.

    Xamarin.iOS 6.3.2

    Optimized LINQ with arrays.

    Multiple fixes for mscorlib linking.

    Sgen can now return memory to the OS on 32bits systems.

    Multiple improvements in the linker to produce smaller binaries.

    Fix multiple crashers in the AOT compiler.

    Fix AOT compilation of async generic methods.

    Xamarin.iOS 6.3.1

    Improve performance of some string copying, object cloning and boxing.

    Removed internal code for unsupported capabilities of the framework. This further reduces binary sizes.

    Fixed some culture related bugs.

    Xamarin.iOS 6.3.0

    First release of the Mono 3.0-based stack.

    The product is now based on mono 3.0. This includes C# 5 with async, two years of improvements in the runtime and class libs.

    The class libs are now based on top of .NET 4.5 bringing in a lot of improvements. Some core generic interfaces are now using covariance.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.