Ionic how to check the app is installed for the first time - capacitor

I am using Capacitor to build ios app, I am looking for a way to detect whether this app is installed for the first time (not deleted and re-installed again).
I didn't find any relevant capacitor/cordova plugin for this. Any advice would appreciate.
Reason why I am asking:
I want to implement a feature for in-app-purchase, where some "special discount" is only applied for the users who downloaded this app for the first time.

Related

How can flutter app gets the new version update from the play store or the Apple Store automatically

How can we make the flutter app to make automatic update whenever we release a new version of the app into the store. but I don't want to use the pop up to alert the user to update I want to update automatically without letting the user even know we update it.
As said in the comment, if you publish to Google Playstore or iOs AppStore, they will handle the updates for you. You just have to upload the new version (just set the release number correctly) and, when the validation is done, their system will notify/update the app. I don't know how other stores behave, but I'm guessing that's the standard behaviour now.
Instead, if you need to bypass the store functionality and perform the update "by yourself", I don't think that is gonna be a simple task. Apple simply doesn't allow installation from other sources than their store, so I fear it may be simply impossible. On Android, on the other hand, I know that's possible, but it will require some user interaction beforehand, since the "installation from unknown source" authorization must be provided to the app that downloads/opens your .apk file, and the procedure may vary from a device to another, so I fear there won't be a single mechanism that will work everywhere.
In any case, the base mechanism will probably require some HTTP GET by your app towards some webserver that will reply with the latest version: the app should then compare the received version number with its own, and then proceed to the download of the package (the URL for the download can be provided along with the latest version number). After that, you have to manage somehow to install/update the downloaded file.
I personally used this approach with Flutter on Windows 7 and newer, where there are no store constraints and I can simply run and download the .msi or .exe file for the latest version, and works just fine.
I think you are looking for the concept of codepush which was loved by many React Native developers.
In Flutter, I think you might want to check out flutter_code_push if this fits your needs.

How do I distribute apps created using ARCore in the store?

I am trying to create an app using arcore-unity-sdk-preview, which is supported by Google.
However, in order to use this ARCore, arcore-preview.apk must be installed. Otherwise, ARCore will stop working.
If I distribute the app I created in the store, the user will not be able to use the app unless I receive the arcore-preview.apk. Is there a solution to this problem?
Or are still experiencing this issue because it's not fully released yet?
If know about this, please help me.
As you said, distribution is still an issue because it's not fully released.
To work around this issue, you could upload the apk somewhere / ship it in your app's files and install it programmatically but the user has to allow installation of apps from unknown sources (Settings > Security > Unknown Sources)

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 :).

Distinguishing between iPhone app upgrade and app new install?

There is a situation that I am faced with which seems like it has no solution. Here it is:
I have an app on App Store. I didn't write any piece of code for this app keeping the upgrade scenario in mind. For all I could imagine, I never that I would be giving out more versions apart from the one I already have on app store. Now, the situation is that I am required to give an upgrade of my app and with in the new code, I am to identify if it is a new install of the latest version or if it is an upgrade from the older version. I don't know how to approach this as I have not coded my first version appropriately for upgrades? Anybody willing to enlighten me.
See previous thread here iPhone: How do I detect when an app is launched for the first time? I use this in just your scenario and it's fine to introduce it with the update - it copes with the previous version doing none of this.

Check whether app updates work without submitting to App Store

I have an application already on the store and would like to release an update. Since my app deals with databases and I've had to change some parts of it, I would like to ensure that the update does not affect the existing functionality in any way once the user updates from the App Store.
What I did was this - install the first version of my app on my device. Changed the update's version in info.plist to 1.1 and run it via xcode (and install on my device). But what happens by doing this is some of the changes I made to the XIBs do not show up. It looks as if the app was only half-updated (if you know what I mean)
Is there any way to update an existing app programmatically without having to go through the app store and then find out it could lead to a disaster?!
Thanks for any help!
I would double check your build configuration. Between building the two versions of the app, I would recommend a "Clean All" just to be safe. The process you described works to verify updates. The only other alternative I can come up with is to create Ad-hoc distributions of both versions of your app, and install those.