ALAssetPropertyAssetURL property is a handy way to store a reference to an ALAsset but during system restore (or upgrade) some assets might change this property. While there might be some workarounds to update the assets reference url, how do I detect when this is needed? System updgrade is easy, but how do I detect when an app has been restored from a backup, also if this happened in the same device?
When your app launches, look in the documents for a file of a known name (DidLaunch.txt, say), and if its not there, create it, and set its metadata "Do Not Backup". On every launch, look for that file - if its there, you previously launched on this device. If its not there, this is a fresh launch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With