Xamarin.ios iCloud访问iCloud键值商店



我正在尝试将iCloud键值存储支持在Visual Studio 2013(Mac上的Xcode 7.2.1)中包含我的Xamarin.ios(v4.0.30319)应用程序,但不断开始:

错误mt1019:您的应用程序具有您的授权。 当前的配置配置文件,无法在设备上安装 "我的iPhone 4"。请检查iOS设备日志以获取更多详细信息 信息(错误:0xE8008016)。

顺便说一句,设备上没有日志,至少Xcode不会显示任何日志。

我有另一个用Xcode中的本机目标C编写的应用程序,它也具有iCloud的支持,并且可以正常工作。所以我做了同样的事情:

  1. 在developer.apple.com上创建了名称为" iCloud。[我的团队ID]。
  2. 在developer.apple.com上为[我的bundle ID]创建了应用程序ID,并启用了容器" iCloud。[我的团队ID]。[我的Bundle ID]
  3. 创建的开发配置资料
  4. 将其安装在Xcode中。
  5. 在" iOS捆绑签名"中的Visual Studio中选择它
  6. 按照此处编写的编辑权利:
    <?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-sidentifiers从权利中返回(始终删除所有供应配置文件,重新启用Xcode,重新启动Visual Studio,清洁解决方案,清洁解决方案,删除设备上的配置文件,在设备上删除现有的现有现有的现有现有的插图,请卸载现有的现有插图,请卸载现有的现有配置文件应用程序)。只有当我删除com.apple.developer.ubiquity-kvstore-endentifier和com.apple.developer.ubiquity-container-Identifiers jamarin xamarin installs installs apps app to设备。但是显然,nsubipiquitouskeyvaluestore不起作用。我的设置有什么问题?

我什至尝试从我的另一个Xcode项目中获得权利,之后设置功能 -> cloud"。它仅使用com.apple.developer.ubiquity-kvstore-endistifier value产生plist$(AppIdentifierPrefix)[我的捆绑ID]。

,当我几乎准备入睡时,应用程序就会启动!最终权利(没有" iCloud。" Previx,没有其他密钥):

<plist version="1.0">
<dict>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>[my team id].*</string>
    <key>com.apple.developer.ubiquity-container-identifiers</key>
    <array>
      <string>iCloud.[my team id].[my bundle id]</string>
    </array>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array>
      <string>iCloud.[my team id].[my bundle id]</string>
    </array> 
</dict>
</plist>

技巧只是打开myApp.mobileprovision文件,看看它的建议。

它确实有效,但nsfilemanager.defaultmanager.geturlforubiquitycontainer(null)返回null和nsfilemanager.defaultmanager.ubiquiquityidentitytoken也无效。因此,没有办法查看iCloud是打开还是关闭:它总是保存数据,甚至显示数据(直到重新安装应用程序)。但是,如果重新安装后,如果iCloud在数据上持续存在。

更新

重要注意:nsfilemanager.defaultmanager.geturlforubiquitycontainer(null)在调试中返回null,adhoc版本返回有效的令牌和路径。

苹果讨厌开发人员!我花了3天的时间来使云工作,所有这些都是由于缺乏文档,现有的过时了。

最新更新