1

iCloud からのキー/値の保存/取得に問題があります。私の問題は基本的に、キーをiCloudに保存し、別のデバイスで同じキーを読み取ろうとするとnilを取得することです。

この問題を調査したところ、デバイス コンソールでこれが見つかりました。

Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: Dec  3 18:11:16  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
Dec  3 18:11:16 iPhone-4S amfid[641] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile

すべてのプロビジョニング プロファイルを削除して再作成し、Xcode から削除して再インストールし、デバイスを再起動しましたが、エラーが続きます。

これは私の資格ファイルの内容です (ファイルは Xcode によって自動的に作成されました)

<?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-container-identifiers</key>
    <array>
        <string>$(TeamIdentifierPrefix)com.myCompany.myApp</string>
    </array>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>$(TeamIdentifierPrefix)com.myCompany.myApp</string>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)com.myCompany.myApp</string>
    </array>
</dict>
</plist>

これを解決するにはどうすればよいですか?

4

1 に答える 1

0

ついに!この解決策を見つけて、うまくいきました!!!! この問題の解決策は、アプリをテストしているすべてのデバイスからすべての iCloud アカウントを削除し、再度作成することです!

于 2012-12-07T13:07:47.787 に答える