Is application preference stay after remove app, or after reinstall app I get cleared preferences?
I save UUID in preferences and want to know is there will be same UUID if I remove app and reinstall it after long time.
Update:
Is preferences backed up with iCloud and(or) iTunes and restore after reinstall app?
Thanks a lot!
Applications are stored in a sandbox. This means every application has its own directory, its own working space.
In that working space all data of the application gets stored. This includes documents, library files, temporary files, the application bundle, as well as the preferences file.
When a user chooses to delete an app, the whole sandbox gets removed, including those preferences.
You the answer is yes. When a user deletes and reinstals your application, his preferences will be reset.
I can tell that NSUserDefaults keep info after reinstalling app.
After removing nothing will be saved, I guess.
You can make hash from device UDID and make it unique identifier for you customers.
Don't save or transport unhasned UDIDs without users permission! Keep it hashed. You can recount hash after reinstalling or removing and another installing and it will be the same every time.
Not exactly about settings, but I hope it will help you.
Related
We recently integrated UICloudSharingController to share cloudkit records on one of our apps, but we noticed while testing that the icloud share link opens the wrong app on App Store if we invite a participant who has not the app installed on his device. We thought it was because we basically duplicated the same coredata/cloudkit implementation for another our app (app store opens the download page for this app), forgetting maybe some cloudkit references of the first app and indeed we noticed a wrong icloud container assignment for the second app, which essentially had two containers, the correct one (its own) and the one of the first app (the wrong one). So, we fixed the problem, every app has his own container now and only his own, and we updated the provisional profiles as well, in order to have the correct icloud containers entitlements. Unfortunately the problem persists and after check everything else (containers, app groups, PersistentStoreDescriptions etc.) we don't have any more ideas.
What else should we check? Thanks in advance for your suggestions.
Some more details of the issue:
If we have the app installed on the device the icloud share link opens the right app.
The same icloud share link works properly on Mac Catalyst (the App Store opens the correct app page if we don't have the app installed). The problem is only on iOS.
Could you check the following:
1. Bundle ID and CloudKit Container ID
Check if the Bundle ID and CloudKit Container IDs fully qualified and match on the original app
The 2nd app should have a different Bundle ID and Container ID from the original app.
How is the CKContainer created, is it using any identifier? If so does identifier correct?
I feel that some how the problem arises because the projects were duplicated and then modified, that is not a good idea as bundle settings, info.plist, entitlements would be reused.
2. CKSharingSupported
In your plist, is CKSharingSupported set to true for the other app?
CKSharingSupported should be turned on only on the app that needs to support sharing
Refer https://developer.apple.com/documentation/bundleresources/information_property_list/cksharingsupported)
3. Create a new project
Try with a simple app and ensure Share works as you would expect
Copy code (not the info.plist or the entitlements) and build on it incrementally instead of doing it all in one shot
Is there are way to completely remove an application from iTunesConnect, including even builds. There is two option for deletion:
There is an option (after app is removed from sale), in App Information section, that says: "Remove App".
Now, that doesn't really removes an app. The app can be restored. Also, all builds are still there.
Is there some way, to delete an app for real?
No, it's not 100% possible. You can remove all the metadata and screenshots, but there is currently no way to delete uploaded builds on App Store Connect.
WARNING: If you remove an app, you will lose ownership of the app name. Removed apps can only be restored if the name is not currently in use by another developer account. In addition, the SKU can’t be reused in the same organization and if you’ve uploaded a build, your bundle ID can’t be reused.
Theoretically you can "reserve" the app name with another developer account and prevent the old account from restoring the app, but I would not bet on that as there are ways to get the app name back.
I am trying to figure out a way to track, or document certain device identifiers so that if someone re-installs my app, they have to use their old account. Otherwise, what is happening right now, are people are getting blocked on the app because of improper use, they are then deleting the app, re installing, and are able to make a new account. I am making it stricter with a few ideas, but one of my ideas was to track the device IDs to prevent two users from having the same device ID.
Is there any way to do this?
Thank you.
Create your own identifier and store it in the keychain (together with the other sensitive user details). This is not deleted when the app is deleted, only if the device is restored to a clean install or an old backup before the app was installed.
I noticed that my identifierForVendor always changes. Someone told me that it doesn't change when you download from iTunes. I'm not so sure about it, though. So, I want to store the first identifierForVendor generated. I found this class, JNKeychain from one of the posts i checked. It can store password and other data. I tried using that to store my identifierForVendor. Even after deleting my app and reinstalling using XCode, I was able to get the value I stored. Sounds good because this way, my identifierForVendor can persist regardless of whether it was downloaded from iTunes or not. However, I"m not very familiar with Keychain. I didn't even know we can store secure data using it. I read their documentation and it says there it's usually used to share data between applications and your apps should have same provisioning profile etc... I don't plan on sharing. I just want it to save my identifier so this is not a concern for me. My only concern is how long will my data last in the keychain storage? Will it be deleted after some time? or when I turn off my device? When i update ios version? Can it persist forever? Will keychain have a different behavior if I use developer/distribution profile?
The keychain entry will last as long as the device is not wiped or hard-reset or until the app deletes it. Apps can be deleted and replaced, but the keychain entry will remain. If an app from developer profile is overlaid with enterprise profile or app store the keychain entry should be fine.
I am making an iOS app that has a free version and a paid version. When a user gets the paid version he/she mustn't lose any of the free app's data. The data is stored as plists.
How to I configure the Entitlements file to enable this? And how do I move (import) the plists to the paid app's Documents directory in my code?
How to I configure the Entitlements file to enable this?
This has nothing to do with the entitlements.
And how do I move (import) the plists to the paid app's Documents directory in my code?
You don't - an app cannot possibly access the sandbox of another one. (Well, actually, if you are developing for jailbroken devices, then this is not a problem, but it seems you're targeting the AppStore, right?)
Two things you can do.
Make one version of the app and use in-app purchases to give users access to paid features (this is preferred), or
Store data in the keychain, and set both apps' keychain access group to the same one. This way they can share data. (Now this is something you would actually set in the entitlements property list.)