Xamarin.iOS 模拟器使用SecureStorage

2020-03-31  本文已影响0人  Devin_Zhou

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

上一篇 下一篇

猜你喜欢

热点阅读