Xamarin.forms 为iOS Xamarin窗体执行远程生成时出现Prism导航错误

Xamarin.forms 为iOS Xamarin窗体执行远程生成时出现Prism导航错误,xamarin.forms,xamarin.ios,prism,remote-debugging,Xamarin.forms,Xamarin.ios,Prism,Remote Debugging,我已经将我的visual studio与虚拟MAC计算机配对,创建了所需的密钥链,并将其添加到我的项目中。我不断地发现这个错误: Prism.Navigation.NavigationException: An error occurred while resolving the page. This is most likely the result of invalid XAML or other type initialization exception ---> System.Re

我已经将我的visual studio与虚拟MAC计算机配对,创建了所需的密钥链,并将其添加到我的项目中。我不断地发现这个错误:

Prism.Navigation.NavigationException: An error occurred while resolving the page. This is most likely the result of invalid XAML or other type initialization exception --->
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: 
Exception has been thrown by the target of an invocation. ---> Microsoft.Identity.Client.MsalClientException: The application cannot access the iOS keychain for the application publisher (the TeamId is null). This is needed to enable Single Sign-On between applications of the same publisher.
我还尝试过在
授权中禁用钥匙链。plist
-不起作用。不知何故,这看起来像是一个棱镜导航问题,因为当我消除这个问题并简单地导航到一个示例页面时,它就起作用了

我还尝试在物理Mac上运行我的项目,我得到以下结果:

2020-06-01 01:45:29.879475-0700 NatWest.KeepSafe.MobileApp.iOS[6277:128192] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=6277
2020-06-01 01:45:29.880109-0700 NatWest.KeepSafe.MobileApp.iOS[6277:128192] SecTaskCopyDebugDescription: NatWest.KeepSafe[6277]/0#-1 LF=0
2020-06-01 01:45:29.897634-0700 NatWest.KeepSafe.MobileApp.iOS[6277:128192] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=6277
2020-06-01 01:45:29.897992-0700 NatWest.KeepSafe.MobileApp.iOS[6277:128192] SecTaskCopyDebugDescription: NatWest.KeepSafe[6277]/0#-1 LF=0

注:该代码在物理iPhone上运行非常完美,但在模拟器上运行时会出现问题。

这与Prism完全无关。。MSAL实际上与Prism配合使用效果很好,您可以看到模块示例

您发布的错误实际上告诉您问题的确切内容。您的权限有问题,无法在iOS模拟器上运行

有关更多信息,请查看此处的文档:

var builder=PublicClientApplicationBuilder
.Create(ClientId)
.WithIosKeychainSecurityGroup(“com.microsoft.adalcache”)
.Build();
在您的
权益.plist
中,您需要更新到以下内容:


密钥链访问组
$(AppIdentifierPrefix)com.microsoft.adalcache

这与Prism毫无关系。。MSAL实际上与Prism配合使用效果很好,您可以看到模块示例

您发布的错误实际上告诉您问题的确切内容。您的权限有问题,无法在iOS模拟器上运行

有关更多信息,请查看此处的文档:

var builder=PublicClientApplicationBuilder
.Create(ClientId)
.WithIosKeychainSecurityGroup(“com.microsoft.adalcache”)
.Build();
在您的
权益.plist
中,您需要更新到以下内容:


密钥链访问组
$(AppIdentifierPrefix)com.microsoft.adalcache