当导航到带有SfDataGrid的页面时,IOS中的AppDelegate失败

时间:2016-11-16 10:49:30

标签: xaml xamarin prism syncfusion

我遇到iOS上的SfDataGrid问题,当我尝试导航到名为“Hovedside”且具有SfDataGrid的页面时,在Android上工作正常 它进入iOS部分的Main.cs并失败 UIApplication.Main(args, null, "AppDelegate");

using System;
using System.Collections.Generic;
using System.Linq;

using Foundation;
using UIKit;

namespace PrismUnityApp2.iOS
{
    public class Application
    {
        // This is the main entry point of the application.
        static void Main(string[] args)
        {

            try
            {
                UIApplication.Main(args, null, "AppDelegate");
            }
            catch (Exception e)
            {

                throw;
            }
        }
    }
    }

使用此输出:

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 

错误列表中没有任何内容

如果我删除了SfDataGrid,那么它可以很好地导航到页面

我有显示syncfusion显示的必需程序集 https://help.syncfusion.com/xamarin/sfdatagrid/getting-started

我觉得我在AppDelegate中遗漏了一些东西但却找不到它可能是什么

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)
        {

        }
    }

}

https://github.com/ZarpGitHub/PrismUnityApp-gbs

即时通讯使用visual studio 2015社区,xamarin,prism v6.2.0 Xam.Plugin.Geolocator v3.0.4和Syncfusion 14.3451.0.49。 主要在Android版6.0.1和使用的sony xperia z3上运行它 API 23 我也在虚拟iphone 6s和IOS 10.0上使用它进行测试

非常感谢任何帮助

1 个答案:

答案 0 :(得分:1)

这个问题已经从我们这边修好了。该修复程序将在我们即将发布的第4卷主要版本中提供,该版本将于本周推出。

此致

Divakar。