Apps must follow the iOS Data Storage Guidelines or they will be rejected

前端 未结 7 1612
栀梦
栀梦 2021-02-04 21:40

i have developed an app that can download mp3 files (nearly 6 to 8 mb of size) from online and stored in NSDocumentDirectory. my app get rejected today and says that

         


        
7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-04 21:50

    my app also got rejected because of same reason - (2.3)

    try this -

    NSString *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);

    The advantage of this whenever your device will Sync with cloud , at that time the application data will not synch because its in NSCachesDirectory instead of NSDocumentDirectory.

    And Disadvantage is that whenever you will use your device and if you have less memory in your device. then CPU will might be clear cache for getting free space. so if you have any data for offline use, you might be loss.

    2) If you can't use NSCachesDirectory (may be because your data is too important) then you can go with this way -

    use this method and give your database path - 'addskipbackupattributetoitematurl'

    go through this link - How to use addSkipBackupAttributeToItemAtURL API?

提交回复
热议问题