Xamarin.Forms 1.3.2 Stable Released

TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

I am VERY pleased to announce the release of 1.3.2 stable to nuget.org. Thank you all for your patience!

This package is identical in every way to 1.3.2-pre3 except for the backport of the fix to iOS labels.

Important Note For Upgrading

This release updates several of the nuget packages referenced by Xamarin.Forms to support the latest GooglePlayServices. To ensure your projects are compatible, make sure your AndroidSDK is fully up to date (API 21 must be installed, as well as latest build tools), GooglePlayServices is up to date in the SDK manager, and that the Compile and TargetFramework of your android application is set to either Latest or 21 (if you use VS, 21 is probably better as you wont get nuget package errors, but both will work once the packages are installed).

So to wrap up, the following things are required:

  • Latest Android SDK installed. (Might take several runs of SDK Manager to get fully up to date)
  • Latest verison of GooglePlayServices installed
  • Android App Project set to TargetFramework 21, Minimum 15, Compile 21.
  • Nuget packages updated (should happen automatically when updating Forms)

Enhancements

  • Add implicit Xaml conversion for System.DateTime
  • Nuget package deps updated to latest version. This update is mandatory to maintain compatibility with GooglePlayServices 22.
  • Android now uses the correctly styled AlertDialog to display an ActionSheet
  • Minor performance improvements

Bugs Fixed

  • Bug 26147 - NullReferenceException when swiping over Context Actions
  • Bug 26036 - Android databound label FormattedText not updating when property changes
  • Bug 25954 - Build fails targeting iOS 6.1
  • Bug 25951 - Android FrameRenderer leaks background image.
  • Bug 25869 - CarouselPage flicker when it moves to current page on iOS
  • Bug 25809 - Scrolling view causes timer to stop incrementing
  • Bug 25791 - Windows Phone: Focus() method of DatePicker is not working properly. (Also fixed for TimePicker)
  • Bug 25752 - TextCell IsEnabled property not disabling element in TableView
  • Bug 25734 - NavigationBar.ToolbarItems.Add() crashes / breaks app in iOS7. works fine in iOS8
  • Bug 25661 - ToolbarItem not showing as disabled when CanExecute is set to false
  • Bug 25639 - ListView ItemTapped issue on Windows Phone
  • Bug 25638 - Unable to use Style Setters for BindableProperties that have defaultValueCreator
  • Bug 25611 - In WindowsPhone, an exception occurs in ScrollTo of ListView.
  • Bug 25592 - Memory Leak when using Custom Renderer in conjunction with RaiseChild/LowerChild
  • Bug 25591 - RaiseChild/LowerChild appear reversed on Android
  • Bug 25545 - CarouselPage rotation on iOS on iPad leaves page in half shown state.
  • Bug 25396 - NSInternalConsistencyException when binding a ListView to an ObservableCollection.
  • Bug 25320 - MasterDetail Master/Menu fails after MasterDetail has been reused
  • Bug 25319 - Setting a different Detail page from a MasterDetailPage after 2nd time on MainPage causes an exception
  • Bug 25259 - Two Way Binding to Leaf Property that is get/set, via a Property that is get only will not work
  • Bug 24824 - [XF 1.3-Pre, all platforms] "Can not create more than one Application instance"
  • Bug 24705 - ScrollView does not scroll until after device is rotated
  • Bug 24681 - Removing items from ListView in Windows Phone cases Argument Out Of Range Exception
  • Bug 24580 - Custom DurationPicker makes built-in DatePicker misbehave.
  • Bug 24445 - Assertion failure in UITableView when viewmodel bound to ListView changes.
  • Bug 23365 - Image fails loading from long URL
  • Bug 22327 - Windows Phone button Clicked event still fires when IsVisible=false
  • Bug 21064 - Entry.Completed does not fire on Android softkeyboard
  • Bug 20903 - BoxView: Differences between iOS / WP and Android

Other Fixes

  • [Core] Calling ClearValue for BindableProperty with DefaultValueCreator gives wrong data in property change callbacks
  • [Core] Deserializer methods for Properties dictionary now check for empty file rather than throw.
  • [Core] FontSizeConverter now parses with invariant culture
  • [Core] FontTypeConverter now parses with invariant culture
  • [Core] ThicknessTypeConverter now parses with invariant culture
  • [Core] ListView no longer leaks HeaderCells when assigning a new ItemsSource
  • [Core] StackLayout contents now correctly re-arrange when items are removed.
  • [Android] Picker no longer crashes when dismissed with no items set.
  • [Android] Resolve potential crash in Android FormsApplicationActivity during dispose.
  • [iOS] ModalWrapper dispose no longer crashes in some cases.
  • [iOS] NavigationRenderer no longer eats exception when packing initial views.
  • [iOS] OnResume not called sometimes when app resumes from sleep.
  • [iOS] ViewCell no longer leaks every UIView it created.
  • [iOS] Fix minor memory leak in iOS ListView
  • [WP] ToolbarItem no longer crashes if it doesn't have a name set. It will use the icon name instead.

Posts

  • KarimJouiniKarimJouini FRMember

    You guys rock

  • OSDMobileOSDMobile NLUniversity ✭✭

    @TheRealJasonSmith is Android API level 14 not supported anymore?

  • 2BitNerd2BitNerd USMember ✭✭

    Outstanding work! Forms is saving us so much time!

  • FredrikHaglundFredrikHaglund SEUniversity, Developer Group Leader ✭✭

    @OSDMobile FYI: Less than 0.1% of devices are on 4.0, 4.0.1, or 4.0.2 (API level 14) so it is quite safe to use API level 15 as minimum.

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    Sorry 14/15 is the same thing in my head. 15 was a mandatory update to 14 more or less. So nobody is on 14, its a dead API level.

  • kenenthbkenenthb USMember
    edited February 2015

    I have a problem removing the first page in the navigation stack. The RemovePage method is invoked from the second page and clicking the back button does return me to the home screen. But accessing the application again through the task switcher (or the application icon) results in the initial (now deleted) page being shown.

    The issue can be created using the following code:

    `public class App : Application
    {
    public App()
    {
    MainPage = new NavigationPage(new Page1());
    }

    }
    
    public class Page1 : ContentPage
    {
        public Page1()
        {
            this.Title = "Page 1"; 
            this.Content = new Button()
            {
                Text = "Go to page 2",
                Command = new Command(async () => await this.Navigation.PushAsync(new Page2()))
            };
        }
    }
    
    public class Page2 : ContentPage
    {
        public Page2()
        {
            this.Title = "Page 2"; 
            this.Content = new Button()
            {
                Text = "Remove first page",
                Command = new Command(() => this.Navigation.RemovePage(this.Navigation.NavigationStack[0]))
            };
        }
    }`
    
  • kenenthbkenenthb USMember
    edited February 2015

    And a small question. I get an ArgumentException (IntPtr cannot be zero) when attempting to remove a page from the OnApperaing method in another page. I have not been able to recreate this issue in a simple project.

    Have anybody else experienced this?

    Using Device.StartTimer to delay the remove action one second appera to resolve the issue.

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    1.3.4 contains some fixes around RemovePage. Hopefully they will resolve your crash (we did some stuff to handle queuing better)

  • kenenthbkenenthb USMember

    Roger that. Great work guys :)

  • TareghJasemianTareghJasemian DKUniversity
    edited February 2015

    Great work, Xamarin.Forms and Team rock!

    After updating, I am getting ArgumentNull exception when using BackgroundImage = Device.OnPlatform ("bg.png", "", "");

    Commenting out that line everything works as before?

  • NicholasRogoffNicholasRogoff GBUniversity ✭✭

    Please help!! I am going nuts trying to get this working on my Xamarin Forms solution. Running well in WindowsPhone. Some reflection issue in Android that I am chasing, but iOS does not build.

    I am getting using Microsoft Azure Mobile Services and an updated ( see http://blog.galasoft.ch/posts/2015/01/porting-mvvmlight-to-the-xamarin-ios-unified-api-64-bits/ ) MVVMLight library.

    I am getting

    Error 105 The type 'MonoTouch.UIKit.UIApplicationDelegate' is defined in an assembly that is not referenced. You must add a reference to assembly 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
    File: D:\GitRepos\MyApp\Code\hms.MyApp\hms.MyApp\hms.MyApp.iOS\AppDelegate.cs
    Line: 18
    Column: 26
    Project: hms.MyApp.iOS

    which is the highlighted on the 'FormsApplicationDelegate' on the class definintion

    and my AppDelegate looks like:

    using GalaSoft.MvvmLight.Ioc;
    using hms.MyApp.iOS.Services;
    using hms.MyApp.Xform;
    using hms.Xam.Forms.Common.Interfaces;
    using Microsoft.WindowsAzure.MobileServices.SQLiteStore;
    using Foundation;
    using UIKit;
    using Xamarin;
    using Xamarin.Forms;
    using Xamarin.Forms.Platform.iOS;
    
    namespace hms.MyApp.iOS
    {
        [Register("AppDelegate")]
        public partial class AppDelegate : FormsApplicationDelegate 
        {
            public override bool FinishedLaunching(UIApplication app, NSDictionary options)
            {
                Forms.Init();
    
                Insights.Initialize("<removed for security>");
    
                // === Setup IOC for PLatform specific services
                SimpleIoc.Default.Register<IPreferenceService, PreferenceService>();
    
                //Setup local sync store
                SimpleIoc.Default.Register(() => new MobileServiceSQLiteStore("localhmscoresync.db"));
    
                //May need to init mobile services
                //Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
    
                LoadApplication(new App());
                return base.FinishedLaunching(app, options);
            }
        }
    }
    
  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @NicholasRogoff You are using incompatible libraries between Xamarin.iOS and MonoTouch (64-bit vs non-64-bit). You need to make sure you are all one or the other. If you send me your project files I can look at it for you.

    @TareghJasemian A stack trace would really be needed...

  • TareghJasemianTareghJasemian DKUniversity

    @TheRealJasonSmith here it is:

    Message:
    Argument cannot be null. Parameter name: image
    Stack Trace:
    UIKit.UIColor.FromPatternImage(UIKit.UIImage image)
    Xamarin.Forms.Platform.iOS.PageRenderer.UpdateBackground()
    Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad()
    ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)..
    UIKit.UIViewController.get_View()

  • NicholasRogoffNicholasRogoff GBUniversity ✭✭

    @TheRealJasonSmith That would be great. You will probably spot something super quick. What's the best way to get my solution over to you?

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @TareghJasemian can you please verify your image is actually ending up in your app bundle?

  • RuddyMukwamuRuddyMukwamu ZAUniversity

    Hi @TheRealJasonSmith , since upgrading to this I keep getting this error. what can i do to fix it.
    I even updgraded to 1.3.3 but still get the same error when building for release.

    Error 251 The "LinkAssemblies" task failed unexpectedly.
    Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.3.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.3.3.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)
    at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    --- End of inner exception stack trace ---
    at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() Spartner.Android

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    You need to set your TargetFramework and CompileVersion to 21

    Make sure your android SDK is up to date too

  • TareghJasemianTareghJasemian DKUniversity

    @TheRealJasonSmith the strange thing is that, if I run my app on my device it works, but on the simulator it doesn't work.

    Where/how can I view/verify the content of my app bundle?

  • TheRealJasonSmithTheRealJasonSmith USXamarin Team Xamurai

    @TareghJasemian its in your build output directory. If it works on device though Im not sure what to tell you :/

  • FredrikHaglundFredrikHaglund SEUniversity, Developer Group Leader ✭✭

    @kenenthb An option to use RemovePage might be to swap out your MainPage with a new one. Have a look at Morgan's blog post to see if it fits your needs or not.

  • Hi @TheRealJasonSmith, I'm working on Xamarin.Forms.1.2.3.6257, I still see the this error

    • Calling PopToRootAsync throwing NullReferenceException (Bugzilla 23234).
      After upgrade version 1.3.2.6316, I keep getting this error.
      Below is my code
      async void btnSyncData_Clicked(object sender, EventArgs e) { if (!ShowMenu) { AnimatePage(this.Width - WBGStyle.WidthColumnOne, 0, 200); } stkltTopics.IsVisible = false; btnSubTopics.Source = Device.OnPlatform("downarrow.png", "downarrow.png", "Images/downarrow.png"); if (stkltTopics.Children.Count > 0) { stkltTopics.Children.Clear(); } await this.Navigation.PopToRootAsync(); bool hasUpdates = await SyncData(); if (hasUpdates) { ContextInfo.Reload = true; } }
      Can you help me to fix it?
  • kenenthbkenenthb USMember
    edited February 2015

    Found something that I believe is a bug.

    Setting MainPage in OnStart() (instead of the constructor) will result in a System.InvalidOperationException being thrown on WP. It works fine in Android

    public class App : Application
    {
    public App()
    {
    }

        protected override void OnStart()
        {
            MainPage = new NavigationPage(new Page1());
            base.OnStart();
        }
    }
    
Sign In or Register to comment.