When is "storage almost full" triggered on IOS - ios

I have an app which uses a lot of the sandbox cache temporarily. I would like to prevent the OS from triggering the "storage almost full" warning by not filling up the disk beyond the trigger point.
I cannot find documentation on how this level is set.
Is it configurable for the user ? Is it unique to the device or IOS version ?

Update:
There is a solution available for this in Apple Developer Forum.
log out of itunes store in settings, wait 10 minutes, then log back
in. your storage should go back to what it should have been all
along. there is an itunes media caching bug / storage leak in ios 8
(all versions so far)
Original answer:
As far as I know there is no warning like that in iOS.
You can use as much as space available in the device, there is no limitation for that. Also those cache files are temporary, it'll be automatically cleaned.

Related

iOS Safari/WebKit current state of PWA persistence as of version 15.2

I am reevaluating PWA feasibility for mostly offline based, occasionally used applications.
So far I had experience that PWAs on iOS does not have permanent storage as the website allocated space is often subject to cleanup either due to lack of space on a device or after N (I guess 7) days of application/website inactivity. I am aiming for fully installed PWA's (homepage).
According to mozilla docs Safari should from version 15.2 fully implement the StorageManager persist API.
On the other hand I have not found such a statement in Safari release notes.
Can someone confirm or disconfirm the persistence of PWA's on iOS?
Without full persistence occasionally used offline ready PWA applications on iOS are no go zone. The only remaining alternative remains cordova or capacitor then. Or other more exotic solutions then (like React Native).
Thanks.
I have not seen a definitive source, but this rather wordy article about PWA's on IOS says:
"There is a 50MB service worker cache limit, but that does not mean you cannot persist more data. IndexedDB allows you to store a few GBs of data. It really depends, like other platforms, on the available space.
There is no native add to homescreen prompt, but other than Chrome and Edge no one else does either.Unused web apps that have not been added to the homescreen will have their cached assets purged after 7 days. This is less of a problem than most think."
The key is "added to the home screen" for iOS Safari - per this.
But I don't see a definitive answer from Apple.
/https://love2dev.com/pwa/ios/

How often does iOS Safari clear its cache?

I use mobile Safari cache to store some data that I want to be persistent, so I would prefer that they would survive both Safari restarts and iOS restarts.
(Please don't suggest me to use cookies or Local Storage here - that's not what I am asking about.)
However I have read some new and some old reports that Safari clears its cache on Safari restart. But my non-scientific tests on Safari 8.3 showed me that sometimes this cache can in fact not only survive application restart but even the iOS reboot (!).
So I am a bit confused at this point.
Are the rules of iOS Safari cache clearing documented somewhere?
Does any of you know them and can explain them to me (and the world ;)?
Hope someone find that I'm wrong but..
I searched a lot and I guess there are no resources about how the automatic cleaning policy works in Safari. And knowing Apple policy I guess that it's simply because this information is not necessary both for users and developers.
If you want to ask to Safari to protect your cache, you can use the Manifest File as described there:
https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html#//apple_ref/doc/uid/TP40002051-CH4-SW1
I'm not sure about ios safari, but in general the browser reserves some storage space for cached items. When that space fills up, it starts deleting the cache.
Another factor that may trigger the cache deletion may be when the operating system tries to clear the temporary files.
So, a short answer would be: you don't know. That depends from user to user of how often it is deleted.

ios read sms and call logs as mspy does

I went though lot of questions about tracking sms and call logs in non-jailbroken ios device. I came to conclusion that it is not possible.
But then I came across this
So I wonder how mspy does this. I am looking to built this functionality for enterprise app, so no problem of itunes rejection.
Can some one please help.
Thanks.
Please check these features description notes:
mSpy runs on jailbroken/non-jailbroken iOS devices. In the former
case, you need physical access for installation. In the latter case,
you need no access if you have iCloud credentials, but you get fewer
monitoring features. Still, the access may become necessary if iCloud
backup isn’t activated on the device.
I guess they are getting info from iCloud account but not the device itself. Moreover they have said fewer monitoring features , i dont know what they exactly mean by fewer and what info do they actually gets in that case. But they are sure getting info from already synced data over iCloud.

iOS deleting all app sandbox data automatically

I have a very strange issue that has been occurring to a few users of my app. One of the users actually described the issue to me.
My app downloads magazine data to the device to allow for offline reading. This means that users can sometimes have around 10 gigs+ downloaded to the device.
The problem this user experienced (and a few others have too) is that randomly all sandbox data gets deleted from the app (included core data files). The user told me that he was downloading something in a different app and got the "Storage Almost Full - You can manage your storage in Settings" popup message.
He went to the settings app and went to General > Usage. He then saw the app was using around 13 gigs of data. While he was in that list he said every time he went out of the Usage tab, then back in the app's data was getting smaller and smaller. Until eventually the app said it was using 0mb.
When he logged back into the app all his data was deleted and core data was also removed which lead the app to think he was a completely new user with no data downloaded.
I then ran some tests on my own where I made sure my device only had 100mb of space available. I then started downloading in the app. The warning message popped up alerting me I was running out of space and I ignored it and continued downloading. I have now downloaded about 1.5 gigs of data and am still downloading and the device seems like it is freeing up space somewhere else to make room for my downloads.
I've searched far and wide and have found no one else ever experiencing a problem like this. So my questions are:
Has anyone else every experienced this issue before?
Does Apple have a policy that will remove app data from the app that uses the most space if the device is running out of space?
Is there an algorythm that decides which app will get cleared when space is running out?
Is there a way to tell the OS not to remove data when running out of space?
Any help would be appreciated!
Assuming you're storing the data in the caches subdirectory:
On iOS 5.0 and later, the system may delete the Caches directory on
rare occasions when the system is very low on disk space. This will
never occur while an app is running. However, you should be aware that
iTunes restore is not necessarily the only condition under which the
Caches directory can be erased.
Documentation here

When does iPad clear library/caches?

In response to Apple's changes in iOS data storage guidelines I recently reconfigured an iPad app to store its documents (50MB+) in the library/caches folder.
During testing in the iOS simulator I didn't see any problems with this cache when I simulated an update (following Brad Larsson's suggestion). I also tried deleting all of the contents of the library/caches folder to make sure that my app could recover.
However, when I released the app upgrade I found that my users complained of problems that were traced back to the iPad partially deleting this cache. It seemed like sub-folder structure was at least partially left intact, but sub-folder contents were deleted.
I've redesigned the app to deal with this situation during an upgrade, but I'm worried about what will happen when the iPad decides to clear the library/caches.
Does anyone have any experience or insight into the time when the iPad would try and delete items in this cache?
Thanks
There is no 100% clear answer to this question, because Apples iOS Data Storage Guidelines are very vague … They don't explain in which cases iOS 5 will delete data inside the cache dir …
In most cases iOS starts to kill files when it's getting low on disc space, but sometimes my app lost data for no good reason. So I had do implement some kind of recovery modus to redownload/-generate files the app needs.
This article is interesting: http://iphoneincubator.com/blog/data-management/local-file-storage-in-ios-5
The documentation states the following:
On iOS 5.0 and later, the system may delete the Caches directory on
rare occasions when the system is very low on disk space. This will
never occur while an app is running. However, you should be aware that
iTunes restore is not necessarily the only condition under which the
Caches directory can be erased.
The part about it never occuring while the app is running is crucial for our app, and is a really good insurance that we won't get unexpected behaviour.

Resources