iOS8 crash when try to use UIDocumentMenuViewController

匿名 (未验证) 提交于 2019-12-03 01:10:02

问题:

I use Xamarin.Forms to create iOS app and I use UIDocumentMenuViewController to Access iCloud file.

When I run program on iOS9+ program is run normally, But when I try my program with iOS8 emulator program is crash on

new UIDocumentMenuViewController(allowedUTIs, UIDocumentPickerMode.Import); 

and message is saying

'Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?' 

What wrong with my app and how can I fix this?

Thank you in advance.

回答1:

You need to make sure that you have enabled the iCloud Entitlements as described here.

This is even mentioned in the official iOS documentation:

Before your app can use the document picker, you must turn on the iCloud Documents capabilities

If you haven't done so already, simply create a new Entitlements.plist file in the root of your project. Then simply enable the iCloud option.



回答2:

Check that you have linked Entitlements.plist to your project...

I dont know why, but by default Entitlements.plist is not linked, you can do the same by going to option of project and assign custom Entitlement like this!



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!