How to use NSBundleResourceRequest for iOS9 app thinning?
I am trying to implement new iOS9 feature app thinning, I understood how tag an image and enable on demand resource in Xcode 7 but I don't understand how to implement NSBundleResourceRequest in my app, can someone help me, that would greatly appreciated
If you want to implement a new iOS9 feature app thinning then you can take the help of 'NSBundleResourceRequest'. It includes several steps to follow which are following:-
Step 1: Requesting the resources:
In it, you will create an instance of 'NSBundleResourceRequest' to request the resources. You will create this instance when you need it. This step will allow you to load the resources when it is running.
Step 2: Loading The Resources:
In the very second step, you will need to load the resources. You can use the 'begin Accessing Resources With Completion Handler' method to start this. This method will assist you in accessing the resources that you requested in the first phase. Your completion handler will be called at some point after you load your resources.
One thing you should remember is to ensure that you replace “tag_of_your_resource” with the tag you have used for the resources.
Therefore applying these short tricks you can ensure that resources are only accessing and downloading when they should be need of it.