美文网首页
Xamarin.iOS 模拟器使用SecureStorage

Xamarin.iOS 模拟器使用SecureStorage

作者: Devin_Zhou | 来源:发表于2020-03-31 22:39 被阅读0次

想要在Xamarin.iOS 模拟器使用SecureStorage,需要在Entitlements.plist中进行如下配置:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.developer.default-data-protection</key>
    <string>NSFileProtectionComplete</string>
  </dict>
</plist>

然后,选中Xamarin.iOS项目,右键属性,选中iOS Bundle Signing,将Custom Entitlements 设置为上面配置好的Entitlements。
如下图所示:


670145-20190902155105607-483427134.jpg

即可在模拟器中正常使用SecureStorage了。

相关文章

网友评论

      本文标题:Xamarin.iOS 模拟器使用SecureStorage

      本文链接:https://www.haomeiwen.com/subject/bdlnuhtx.html