ContactManager.RequestStoreAsync() throws System.UnauthorizedAccessException

非 Y 不嫁゛ 提交于 2019-11-29 15:47:50

Alright, I think I discovered the answer on my own. Looks like if you add the "contacts" capability to the Package.appxmanifest file manually, it will fix the issue.

There is no UI option for this capability. You have to somehow know it exists, edit the file in a text editor instead of in the UI, and add:

<uap:Capability Name="contacts" />

As of 2018, there is such capability listed on Capabilities tab when visually editing the Package.appxmanifest, at least in VS2017. Anyway, the

<uap:Capability Name="contacts" />

is the crucial thing required in manifest.

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