I save a boolean flag in sharedpreferences which I need to get at the very start of app. What happens if I uninstall, install the app again and then get the flag? For me, it doesn't throw an exception and instead sends me the value before uninstalling. I wonder how is that possible..
In android there is a property called allowBackup. I think by default it is true. You can read more about this here. Also for iOS, this package uses NSUserDefaults and that is also backed up to iCloud.
Related
I am trying to develop an iOS 14 Widget in Simulator but each time I run the app I get the below warning.
MobileGestaltCache.c:38: No persisted cache on this platform.
This however breaks nothing but not sure how to fix this.
In my case, the full log reads
libMobileGestalt MobileGestaltCache.c:38: No persisted cache on this
platform.
The interesting thing is libMobileGestalt.
In this post, a lot of infos are given about it. It says e.g.:
/usr/lib/libMobileGestalt.dylib is a private Apple library describing
the capabilities of the iOS device, as well as some runtime
information: system version, build version, device type, current
status of the airplane mode, …
The implementation is similar to a
key-value database and the library exposes a simple function to
retrieve the value for a specified key:
id MGCopyAnswer(NSString
*inKey);
When calling this method with a key, it returns the associated value stored in the database, or nil if the key does not
exist.
I don’t know if one can read out this way interesting information, at least one shouldn’t, since the contents of this private database can change any time.
Obviously, this library writes also logs, and in this case some info about the device used.
One can surely ignore it.
We're developing an app using Ionic/Cordova that saves items to using the SecureStorage plugin. Items are saving fine, but when we uninstall the app reinstall, the items we've saved before are still there. We would like to stop this behaviour.
We found out about the BackupWebStorage property (link) and have set this to none, however the data still persists despite this being set.
Is there anything else we can check, turn off, set in Xcode that we have to do at this point to get this to work?
Thank you,
bengrah
This is possible on Andriod. I wonder if it is possible on iOS. I have explored it, found no information. If you have any source/information, please direct me.
Thanks.
No, There is no notification triggered when an app is updated from the store, whether your app is running or not.
Previously I have stored a property in UserDefaults of the current version running and each time the app starts or is opened I check to see if the actual version is different from my last known in UserDefaults. Then if needed run any migrations or whatever are needed.
Sadly, when my App is updated there is some saved data or left over logic that was already implemented. This can cause some bugs to occur. Is there a way to tell if an App was updated so I can make the user relogin? Any tips or suggestions are appreciated.
You can save the installed version in the NSUserDefaults. They will persist during app updates, so whenever your app launches you check for the saved version, compare it with the current version and do your migration if necessary. At the end, save the new version to the same key.
i have noticed that my ipad application remains in previous state (state when i closed the app) when it coming from background. i have checked the plist and delegate methods fro this problem. actually i have a web app that uses UIWebView . i cant figure out wot the actual problem is. i dont want my app to work in background and it should start from the initial each time it opens.
is this problem related to cache memory? do we need to delete the cache memory when the app closes?
need some help
Try adding this to the Info.plist file.
UIApplicationExitsOnSuspend=YES
As a boolean value. It does not allow the application to run in background.
In fact users expect apps to return to the place where they left it. On iOS there's no real (user) distinction between apps that in memory but not in the foreground and apps that have exited.
Having said that, there are two ways of doing what you want:
Try adding the UIApplicationExitsOnSuspend flag to your Info.plist
Reset your UI either in the send to background or bring to foreground notifications
OKAY, SORRY.. I FOUND THE SOLUTION MYSELF.
i just put this field "application does not run on background" on info.plist
now the application will start from its initial state each time it opens.
thank you,