現在、Mac App Store に 1.0 リリースとしてある収入追跡アプリ myIncome に iCloud サポートを追加する作業を行っており、1.0 バージョンでは正常に動作します。
ユビキタス コンテナーを取得し、選択したファイルを iCloud にアップロードするためのコードを追加しただけです。現在、ブロックを使用して、ファイルを送信するメニュー項目を検証するために iCloud が利用できるかどうかを確認しています。
if ([[NSFileManager defaultManager] URLForUbiquityContainerIdentifier: container] == nil) return NO;
return YES;
キーを資格ファイルに追加し、iCloud がアクティブなアプリの開発用プロビジョニング プロファイルを作成しました。
コード署名がオンの場合、これらのメッセージが Console.app に表示され、デバッガーが停止しruntime_init
ますEXC_BAD_INSTRUCTION
11/4/11 6:52:49.952 PM taskgated: none of the 2 applicable provisioning profile(s) apply
11/4/11 6:52:49.952 PM taskgated: killed com.themikeswan.myIncome[pid 13532] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed
コード署名をオフにする (そしてプロジェクトを消去する) と、ユビキタス コンテナーを取得しようとすると nil が返され、Console.app に次のメッセージが表示されます。
11/4/11 10:38:03.549 PM librariand: client process 13863 does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
11/4/11 10:38:03.550 PM librariand: error in handle_container_path_request: LibrarianErrorDomain/9/The client process does not have a valid com.apple.developer.ubiquity-container-identifiers entitlement
Core Data アプリであり、iCloud 対応のアプリ ID を持ち、同じコードを使用してすべてが機能する小さなテスト アプリを作成しました。
他の誰かが同様の問題に遭遇したか、どこを見ればよいか考えていますか?
iCloud が myIncome で機能するようになったら、iCloud を Mac アプリに追加する方法に関する情報がほとんどないため、この知識を活用するためのチュートリアルを作成する予定です。