Xaml IOS中的AppDelegate在导航到包含SfDataGrid的页面时失败
当我尝试导航到一个名为“Hovedside”的页面时,我发现iOS上的SfDataGrid在Android上运行得很好,而iOS上的SfDataGrid有问题 它进入iOS部分的Xaml IOS中的AppDelegate在导航到包含SfDataGrid的页面时失败,xaml,xamarin,prism,syncfusion,Xaml,Xamarin,Prism,Syncfusion,当我尝试导航到一个名为“Hovedside”的页面时,我发现iOS上的SfDataGrid在Android上运行得很好,而iOS上的SfDataGrid有问题 它进入iOS部分的Main.cs,并在 UIApplication.Main(args,null,“AppDelegate”) 使用此输出: System.NullReferenceException: Object reference not set to an instance of an object at Syncfusion.
Main.cs
,并在
UIApplication.Main(args,null,“AppDelegate”)代码>
使用此输出:
System.NullReferenceException: Object reference not set to an instance of an object
at Syncfusion.SfDataGrid.XForms.iOS.ExtendedScrollViewRenderer.WillMoveToWindow (UIKit.UIWindow window) [0x0000b] in <eee3a5d11e6d415a9b8017bfe242a045>:0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at PrismUnityApp2.iOS.Application.Main (System.String[] args) [0x00002] in C:\Users\asr\Desktop\GBS APP bakups\PrismUnityApp2 b4 scanner\PrismUnityApp2\PrismUnityApp2.iOS\Main.cs:20
im使用visual studio 2015社区、xamarin、prism v6.2.0 Xam.Plugin.Geologitor v3.0.4和Syncfusion 14.3451.0.49。
主要在sony xperia z3上运行,Android版本为6.0.1,使用
API 23
我也在虚拟iphone6s和ios10.0上测试它
非常感谢您的帮助我们已经解决了这个问题。该修复程序将在我们即将发布的第4卷主版本中提供,该版本计划在本周推出
问候,
Divakar.非常感谢Divakar,我终于更新了它,效果非常好
System.NullReferenceException: Object reference not set to an instance of an object
at Syncfusion.SfDataGrid.XForms.iOS.ExtendedScrollViewRenderer.WillMoveToWindow (UIKit.UIWindow window) [0x0000b] in <eee3a5d11e6d415a9b8017bfe242a045>:0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at PrismUnityApp2.iOS.Application.Main (System.String[] args) [0x00002] in C:\Users\asr\Desktop\GBS APP bakups\PrismUnityApp2 b4 scanner\PrismUnityApp2\PrismUnityApp2.iOS\Main.cs:20
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using Prism.Unity;
using Microsoft.Practices.Unity;
using Syncfusion.SfDataGrid.XForms.iOS;
namespace PrismUnityApp2.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
ZXing.Net.Mobile.Forms.iOS.Platform.Init();
global::Xamarin.Forms.Forms.Init();
SfDataGridRenderer.Init();
LoadApplication(new App(new iOSInitializer()));
return base.FinishedLaunching(app, options);
}
}
public class iOSInitializer : IPlatformInitializer
{
public void RegisterTypes(IUnityContainer container)
{
}
}
}