我正在尝试在 Visual Studio 2013(Mac 上的 Xcode 7.2.1)中为我的 Xamarin.iOS(v4.0.30319)应用程序包含 iCloud 键值存储支持,但不断得到:
错误 MT1019:您的应用程序具有当前配置文件不支持的权利,并且无法安装在设备“我的 iPhone 4”上。请查看 iOS 设备日志以获取更多详细信息(错误:0xe8008016)。
顺便说一句,设备上没有日志,至少 xCode 不会显示任何日志。
我在 Xcode 中有另一个用本机目标 C 编写的应用程序,它也支持 iCloud,而且工作正常。所以我做了同样的事情:
- 在 developer.apple.com 上创建了名为“iCloud.[my team id].[my bundle id]”的 iCloud 容器(我使用了准确的值,没有宏)
- 在 developer.apple.com 上为 [my bundle id] 创建了应用程序 ID,并为容器“iCloud.[my team id].[my bundle id]”启用了 iCloud
- 创建了开发配置文件
- 在 Xcode 中安装它。
- 在“iOS Bundle Signing”中的 Visual Studio 中选择它
- 此处编写的已编辑权利:
<?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.ubiquity-kvstore-identifier</key>
<string>iCloud.[my team id].[my bundle id]</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.[my team id].[my bundle id]</string>
</array>
</dict>
</plist>
之后 Xamarin 不想在设备上安装我的应用程序。我更改了容器的名称,从权利中删除了 com.apple.developer.ubiquity-container-identifiers 并将其返回(始终删除所有配置文件,重新下载到 xcode,重新启动 Visual Studio,清理解决方案,删除设备上的配置文件,卸载现有应用程序)。只有当我从权利中删除 com.apple.developer.ubiquity-kvstore-identifier 和 com.apple.developer.ubiquity-container-identifiers 时,Xamarin 才会将应用程序安装到设备。但显然 NSUbiquitousKeyValueStore 不起作用。我的设置有什么问题?