I've used async storage to persist data in my IOS app built using react-native. I have used functions like AsyncStorage.setItem() etc to set, read, delete data. The async storage in my app is used to store the downloaded songs of a playlist.
Some users have reported that the songs stored in the cache gets deleted automatically in IOS. The data is there for some time but after 3-4 hours the cache is cleared automatically. Hence, they've to download the playlist again after sometime. The async storage works fine in Android, the data is persisting. I checked the official documentation but they have not mentioned this problem of automatic cache clearing for IOS.
I wanted to understand is this some kind of memory optimisation feature of IOS where the async storage is cleared by itself ? and Can we disable this kind of automatic deletion of async storage in IOS?
This is the async storage version I've been using.. "@react-native-community/async-storage": "1.9.0"
Can anyone please help with what the problem might be and suggest me some solutions.