Flutter iOS delete cache when reinstall or update the app - flutter

I developed an app on Flutter. There is registration on the app.
When I install the app on iOS Phone. I logged in on the app, then I directly deleted the app from the iPhone for the test. Then I reinstall the app to the same phone. But app shows that I already logged in even though I am not logged on the second installation.
I think the phone is caching the first-time login and even if I delete the app, the cache is not deleting. Could it be the case?
I want to delete all data when the app is deleted or updated.
P.S. There is no such kind of problem on Android. When I delete the app from Android phone, everything is deleted and after reinstalling it, I need to log in.

I think this is duplicated from this.
Thanks to shared_preferences you can exploit NSUserDefaults, which is deleted every time you uninstall the app, to check if the app is running for the first time.

Related

Can't test iPhone app update as an update

I have been working on an iOS app update and am ready to submit it, however I am having a small issue I am concerned about. I create an ad-Hoc version for testing and when I try to synch the update over to my phone via iTunes it won't give me the 'update' option next to the app. The buttons in iTunes says 'remove'. iTunes actually forces me to first remove the old version of the app and only after it is removed, iTunes gives me the option to install the new version and then the app works fine. The only problem is that this is not really testing the update process and I am concerned that once I release the app to the app store my users will have the same issue where they will not be able to just update the app, they will have to remove the old app first and then install the new version. Any idea what might be going wrong here?
iOS takes care of updating Apps, as far as bundle identifier in your info-plist is the same, any newer version will show as an update in iOS. But in iTunes things work differently. You don't have to worry about these things.
If you want to test effects of updating an App, Install the old version from AppStore. Connect your device and Run the project from Xcode. Now this will work the same way as updating your app.
There is no problem from your part. Maybe this time iTunes is not smart enough to know that your ad-hoc version is an update one or maybe the version of the app on iTunes and on your phone is the same. I've made a lot of update to my apps, when you submit a new one to AppStore your user won't face this problem. They will find an update button for your app :).

In App Purchase: Application is Live and still showing [Environment: Sandbox]

My Application is live on app store and working In App Purchase. In App purchase dialog show environment sandbox. When can i get the environment live for in app purchase? Can anybody having same issue.. ?
Thanks
Do you see this in the app, that you have downloaded from the App Store or from your Xcode build? In the second case, it is OK, because when building from Xcode,you'll be sandboxed.
If you download it from App Store, it will be in normal mode.
Finally, I resolve this issue.
Solution: Remove app from device. Restart Device and Downloaded App From App Store.
Problem occurred, I was using the same device for testing. and before downloading app from app
from i forget to restart device.
well, Its working for me now... :)

App is "Developer Rejected",but previously downloaded from the App Store, will it work?

I'am wondering what will happen if my App which was previously available on the AppStore and has been downloaded by some users, but now I REJECT MY APP and put it down from the AppStore.
My Question is, Will the previous users who have the app on their devices will work or not???
Yes, every user who downloaded the app will be able to keep using it.
There is no way to pull it from there devices.

Re-Installing IPhone App From Inside The App

I want to find a way if it's possible to re-install an IPhone app from inside it?
Let's say my users have the app already installed in their phones and now new version is released, can I make my app such that it will check over internet if new version is available and if it is, download it and ask the user to install it. If user says yes, it will first un-install the current version and will install downloaded version.
Is it possible anyhow?
Apple wont allow this.
For one reason, un-installing the app removes all the user documents (if applicable), so theres no way to preserve user data.
Apple already has a medium for updating (iTunes App Store).
If you want to be able to check if there is a newer version of your app, you can do that simply by checking a text file (for example) on your server, and notifying (by UIAlertView possibly) the user that there is a newer version of your app. But again, Apple already has a standard system in place. (Badges on the App Store icon)
probably not because to uninstall an app it requires the app to be closed
You don't have to do that. If you upload a new version to the app store, a notification badge will appear on the app store icon on your users' phones. You aren't allowed to install apps any other way than through the app store, anyway.
It depends on your app and what you want to update. It's not possible to reinstall the native app, but you can download data and update your app using that data. For example, we have an app in the store which is mainly a webview inside the native app. The first time it launches, it uses the internal data, but checks our server if there is an update. If there is an update, it downloads remote data and replaces the internal. It's what most magazines do for updating their libraries.

auto upgrading iOS apps

Is there some way to implement an auto-upgrade for an iPad app.
I would like to be able to have my app check for updates, and then upgrade itself.
As far as I am concerned the app can retrieve the update from the app-store, but:
I would like the interface to be app internal: User should just have to press an OK button for the upgrade to start (all this time staying within the app)
Is this possible at all?
It is possible to have display a notification to inform an update is available on you app and you can redirect the user to the AppStore, but an update can only be download from the AppStore.
This will reinstall the new version of your app. So you can't stay in the app to update (You need to go to the appStore and qui the app during the update).
Internally, you can only update some content for you app (not add new native code) but not with a real AppStore update.
Apple does not allow apps to download, install, or execute code that is not included in the original app submitted to Apple. The App store upgrade cannot be automatically started.
the best you can do is determine if the app store has a newer update, then prompt the user to install it by linking directly to the app page in the app store. They will still have to click the correct buttons to start the process.
Even if it were possible, it's not allowed by Apple. Your app will be rejected.
Unless you only update contents of your app, e.g. cooking receipts.