Xamarin.iOS 模拟器使用SecureStorage

想要在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了。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容