Detect if user has installed app previously even if deleted - ios

I wonder if somebody can come up with a solution for the following problem.
I have created an iOS app of which for the first x amount of days the unknown user (guest) will have access to the full version of the app.
Then after the "trial" period i want to then put them on the free version of the app which will be ad supported if they don't want to pay a fee.
one issue i can for see is that the user could simply delete the app and reinstall to then restart the trial period.
One solution i can possibly imagine is that a file is uploaded to a "secure" section of the users iCloud account and check against that?
Has anybody come up against this issue before and what was the best solution you discovered without the need of a registration signup?
Thanks
Thomas

Your iCloud solution should work. You can also consider storing a similar flag in the device keychain as that isn't cleared when the app is deleted. Note that the user can still restore the device or disable iCloud integration on the device to 'work around' these things, but that's relatively uncommon.

Related

iOS app crashed even after reinstalled, but not for the new users

Some of my old app users are experiencing app crashes for a certain step after I updated the app. Even when they tried to delete the app and reinstalled it, it's still crashing. However, the app doesn't crash for new users.
How does that happen? When a user completely deletes the app and reinstalls it from the AppStore, the user should be like a new user, right? How come the new users don't crash while the users who re-install the app keep crashing?
Is there something remaining in the device even after the user deletes the app?
If you use keychain functionality that may persist across uninstalls and reinstalls. That, in theory, is the only data that should persist with that behavior.
Without more code or details it's hard to know what the problem might be, but to your question "Is there something remained in the device...": yes, keychain information.
One thing that does remain in the device after uninstalling an app is privacy settings (Relevant SO post).
Perhaps you're trying to access something incorrectly with your update?
Are you using any database in your project?
If yes we need to take care of version migration.

Delete Existing iPhone App

I have an iPhone app that now needs to be removed. I can do this by following the steps in iTunes connect:
Untick all territories in pricing and availability
Then in Additional Information : Delete App
I have completed step 1 and am about to follow step 2 but I have a question that I cannot find answered on any of their help/docs nor online elsewhere. Once I delete the app - it will get removed from the app store, but will it still stay on all users iPhones that have already got the app downloaded and installed on their phone? Or will it automatically be deleted/removed from all phones?
Ideally I need to remove the app completely so that it can no longer be used be new or existing users even if they already have it on their phone.
It will stay on the user's phones.
In your case even worse for you: If they backed up/synchronized the application LOCALLY via iTunes, they got a local .ipa-file (an instance of your app), which they could even restore, after they setup the device once again.
For the users this is a pretty convenient way. So, if you want to delete your application. Inform users about that step and if you have a good exit strategy, users will adopt this and will delete it on their own.
The app will stay on the users IPhones. There is no way to remove it remotely.
The only thing you could do would be to release new version with a lock but then you will probably get trouble with Apple.

MobileGestalt no access to InverseDeviceID

This happens with every app when I try to use OpenGLES on my iPhone7+ with iOS10.3. But it works without any problems on my iPhone7 iOS10.1.
This is the message I get:
libMobileGestalt MobileGestaltSupport.m:153: pid 304 (OpenGLES_Ch4_1) does not have sandbox access for ... and IS NOT appropriately entitled
libMobileGestalt MobileGestalt.c:549: no access to InverseDeviceID
Does anyone have an idea about these messages?
I wonder if it is bugs or something else in iOS10.3? Because when I run the app on iPhone5s iOS10.2, those messages did not shown on the screen. While I upgraded the phone to iOS10.3.1, the massages shown again.
The reason why I ask this question is that some animation effects perform quite stuck on my iPhone7+, but it is completely smooth on iPhone5s. But now it seems it is no relationship between the message above and the stuck, and I have to check my iPhone7+...
I had the same issue. It turns out to be multiple thread accessing the same OpenGLES related resource, EAGLContext to be specific. I guess it is possible that OpenGLES related codes are not thread-safe, and it behaves differently in different OS versions / iPhone 7 / 7+, sometimes it messes up the memory.
After making sure data accesses are synchronised across threads, the problem is gone.
For those of you who are maybe using Ionic and getting this error, please just make sure that in case you've cloned a new fresh copy of the project from your repository that you did both npm install and bower install.
I was missing bower install and this was torturing me for like two days, so hope this helps someone. Sad thing is that I'm by all means not a beginner with Ionic (top #3 answerer on SO) but was still able to miss this fact so I hope that in case someone else runs into this problem it will help you.
Google Map display and functionality works fine with this warning
Check my answer here:
https://stackoverflow.com/a/44970665/3378076
I can see where the setting up of a sandbox account might do the trick, but if the device you are using is also connected to your normal icloud account, you can't create a sandbox with the same AppleID.
You then have to log out of your existing icloud account, and log in with the new icloud (sandbox) useid. Which screws up your existing icloud device settings.
So you are unable to use your Developer ID, only your Sandbox ID.
This worked for me:
Create a new sandbox user in iTunesConnect. YES, you have to create a new iCloud user with a new email.
Log OUT your current iCloud user on your mac AND on the device you are testing on.
Log IN with your new iCloud user on your mac AND on the device you are testing on.
Run your app on your device again. This time it should work.
Hopefully Apple will come around and simplify this issue since this is a real pain in the ...
I had the same issue, and this point me in the right direction:
I've managed to solve the same problem for MKMapView. Apparently, that happens when your app's current permissions state doesn't correspond to entitled (declared in Info.plist) one. That effecively means that you need to call APIs to gather user's permissions explicitly and preemptively. (E.g. LocationManager.requestWhenInUseAuthorization before displaying a map with user location on it)
Source: rdar://problem/11744455
I had same issue. My rendering program was written to support 3 version of openglES(1, 2 and 3). On my case I was accidentally supplying EAGLRenderingAPI.openGLES1 or kEAGLRenderingAPIOpenGLES1 to my renderer class based on openGLES2.
I just had this issue when trying to use in-app-purchases.
Not sure if yours is the same issue, but I realised that you HAVE to create a Sandbox User in iTunes Connect, then log into iCloud on an iOS device with that user to enable the app to work.
I got this console warning message because of issues with multiple Apple Developer accounts. Evidently you cannot have a sandbox account with an existing Apple Developer account. I didn't try to create a sandbox account but it seems to check my default account, which is also an old Apple Developer account that I don't use and hence is no longer entitled. This issue has been reported to Apple many times by other people and I have not yet seen a solution.
My workaround to suppress this warning was to set the OS_ACTIVITY_MODE environment variable to disable in my scheme settings. You can click on the app name and then click Edit Scheme... or from the top menu you can click Product->Scheme->Edit Scheme... :
Then you edit the "Run" settings and add the environment variable OS_ACTIVITY_MODE and set it to disable:
NOTE: Be sure to set this environment variable to enable before you submit your app so that you can see if there are other warnings. There may be other warnings you should fix before you submit your app to the App Store.

Know whether user downloaded iOS app for free or paid?

I am switching my iOS app which is already on the app store from paid to free. I want to know which users have paid for the app, so I can treat them differently (like not showing them additional ads). As far as I know, there's no way to get which version of the app users originally downloaded.
One thing I thought of is this. I can release an update at the same time the app goes free. Everyone who launches the game for the first time who has the update gets marked with a "Free Download" flag. The issue here is what if someone paid for the app, then didn't launch it, then updated their app. That means I will treat them like a free user even though they have paid. Thanks!
There's no way to do this with 100% accuracy without releasing a new app.
If you do use a flag of some sort, save the flag in the keychain and/or iCloud so that it will have a better chance of persisting across uninstall/reinstalls and from device to device (if you use iCloud).
Your best bet though is probably to release a new lite version of the app. It can be a pain to maintain two versions, but at least you know for sure who's paid and who hasn't.
I somewhat accomplish this with a server-side script. On initial app launch, I grab data from my server to determine if this is a paid or free install and then save this info in iCloud. It works relatively well, but it does have a drawback; a small percentage of the time the query fails. If it fails, I just set the app as being paid so as not to screw anyone over. This screws me over a bit, but I take the hit for the convenience of not having to update whenever I want to switch paid/free.
You cannot show updates or advertisement for the customers separately who bought the app for free or by paying money. Whenever you changed your paid app to free, the customers can download the application for free now.

Removal of TestFlight apps?

Is there a way to remvoe TestFlight apps from users that have installed them? Also is there a way that TestFlight can bake into the app some sort of password that the users all have to log in with (in case of a lost phone, we don't want our developement apps exposed).
If left untouched, the provisioning of your apps will eventually expire automatically. Even without the native ability to remove applications with TestFlight there is still something of an expiration date on the application.
That would still leave your question of a "baked in password prompt" and removing the application itself physically from the device.
The first part, the app checking for authentication could be solved by implementing a solution with a more robust SDK that happens to have that sort of security-minded approach. As far as I know, and based on TestFLight's feature grid, this exceeds the abilities of their tool.
The second part, removing the application itself from the device, would be accomplished by using a tool that has the ability to use MDM (Mobile Device Management) for device-level control. Specifically you'd want to look for something that can selectively control a single application, rather than having to apply a blanket MDM policy. Again based on knowledge of TestFlight and based on their web page this is also not something TestFlight is capable of.
There are solutions out there that will give you exactly what you are asking about - easy beta testing with the added ability to force the app to check in and re-authenticate as well as the ability to remove applications from the device when you're done testing. If you hit your search engine of choice you can find a few tools that will give you a "yes" to all of your questions here. The list is very short so they're easy to find. :)
If it is at all helpful to you, I am associated with one of those companies, AppBlade, and would be happy to answer questions about this sort of thing. We're at https://AppBlade.com and you're welcome to give us a call or even log into the tool to see how it works for yourself.
Unfortunately you can't delete apps that are already installed on the device via TestFlight, unless you do it on the device itself. As for the password, TestFlight doesn't exactly support that either. You could however put a passcode lock feature in all of the Beta versions of your apps through your code. Sorry thats probably not the answers that you wanted to hear, but TestFlight is still in its early stages.
You are not able to delete apps from a users device, however TestFlight is testing in their 'Area51' an option to force users to update to a new build if there is one available.
If you no longer want testers to access your app you probably could add a new build which justs shows some info screen.
There is a way to expire the builds in the app store connect when you click on build.
Another way if you want to get rid of it as a tested to open the app page and click on stop testing.

Resources