We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfNavigationDrawer crash with "Object Reference not set to an instance of an object"

Hi, I've been trying to test the SfNavigationDrawer control, but I can't get to make it work. The Form Previewer says that the native class "Syncfusion.SFNavigationDrawer.iOS.SFNavigationDrawer"  hasn't been loaded.And when running on the iOS Simulator (iPhone 7 iOS 10.2), it crashes with a "Object Reference not set to an instance of an object", pointing to the Main.cs's UIApplication.Main(args, null, "AppDelegate");I'm currently working with Visual Studio (7.0 build 1659) for Mac under macOS SierraHere's the AppDelegate just as the online doc says:using System;using System.Collections.Generic;using System.Linq;using Foundation;using UIKit;using Syncfusion.ListView.XForms.iOS;using Syncfusion.SfNavigationDrawer.XForms.iOS;namespace Eterna.iOS{ [Register("AppDelegate")] public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); SfListViewRenderer.Init(); LoadApplication(new App()); new SfNavigationDrawerRenderer(); return base.FinishedLaunching(app, options); } }}And my Page.xaml:          And the code-behind:using System;using System.Collections.Generic;using System.Collections.ObjectModel;using Xamarin.Forms;namespace Eterna{ public partial class MasterPage : ContentPage { public MasterPage() { InitializeComponent(); ObservableCollection list = new ObservableCollection(); list.Add("Mis Propiedades"); list.Add("Mis Clientes"); list.Add("Perfil"); listView.ItemsSource = list; } }}

4 Replies

CE Chris Erickson March 26, 2017 01:52 PM UTC

Jose,Try replacing the listview with another view type such as the syncfusion lv or a label, tableview, etc for testing purposes. If they all work you have the same issue as me. It seems to be something with the sf drawer and the xamarin forms listview.Also, I am testing on Android with the same problem.

VA Vanaja  Annasamy Syncfusion Team March 27, 2017 12:49 PM UTC

 Hi Jose,

Thank you for contacting Syncfusion support.

We were unable to reproduce the reported issue "Crash occurs while using SfListView in iOS". We have created a working sample of NavigationDrawer using Syncfusion ListView. Please download the same from below link.

Link: http://www.syncfusion.com/downloads/support/forum/129617/ze/NavigationDrawer146984506

Please run the sample and check whether the issue is reproducing at your end, if not modify your changes and revert with the sample.

Please provide the following details to reproduce the issue at our end.
1. Product version which you are using.
2. Sample with the issue reproducing at your end.

Vanaja R.A.

JG Jose Guggiari March 27, 2017 01:59 PM UTC

Thanks for the support! It's loading on the iOS Simulator  now, but still cannot load the xaml previewer. It says that  it couldn't create an instance of SFNavigation drawer because the native class hasn't been loaded. 

I'm using Visual Studio 7.0 build 1659 for macOS Sierra 10.12.3 

Xamarin.Forms  PCL 4.5 - Profile111

VA Vanaja  Annasamy Syncfusion Team March 28, 2017 01:59 AM UTC

Hi Chris,

Thank you for contacting Syncfusion Support.

We have already fixed the reported issue "Crash occurs while using Xamarin.Forms.ListView in NavigationDrawer" and the patch for the fix will be available in 2017 Volume 1 SP2 release which is expected to be rolled out by the end of March 2017.

Vanaja R.A. 

Live Chat Icon For mobile
Up arrow icon