Instance Method インスタンスメソッド

beginAccessingResources(completionHandler:)

Requests access to the resources marked with the managed tags. If any of the resources are not on the device, they are requested from the App Store. 管理タグで印されるリソースに対するアクセスをリクエストする。何らかのリソースがデバイス上にないならば、それらはApp Storeにリクエストされます。

Declaration 宣言

func beginAccessingResources(completionHandler: @escaping (Error?) -> Void)

Parameters パラメータ

completionHandler

A block called when the resources have finished downloading or if an error occurs. The resources are not available until the completion handler is called with error set to nil. リソースがダウンロードを終えた時にまたはエラーが発生するならば呼び出されるブロック。リソースは利用可能ではありません、完了ハンドラがerrornilに設定されることで呼び出されるまでは。

The block takes the following parameter: ブロックは、以下のパラメータをとります。

error

Set to nil if the resources are downloaded successfully; otherwise this parameter holds an NSError object describing the problem that occurred. Errors are usually due to a lack of free space or problems connecting with the App Store. nilに設定されます、もしリソースがうまくダウンロードされるならば;そうでなければこのパラメータは発生した問題を記述しているNSErrorオブジェクトを保持します。エラーは、通常は空き容量の不足またはApp Storeとの接続の問題が原因です。

Discussion 議論

After calling this method, the resource request downloads any on-demand resources not already on the device. When all the resources are downloaded, they are marked as non-purgeable. The resources are not available to the app until the completion handler is called with no error. このメソッドを呼び出す後に、リソースリクエストはまだデバイス上にないあらゆるオンデマンドリソースをダウンロードします。すべてのリソースがダウンロードされる時、それらは除去可能でないとして印されます。リソースはアプリに利用可能ではありません、完了ハンドラがエラーなしで呼び出されるまでは。

See Also 参照

Requesting Resources リソースをリクエストする