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.)
Related
A previous developer created and uploaded our app with our dev team. They then transferred it to our client's account and released it. However it kept our Team ID. When uploading to the App store, I get the following:
"Potential Loss of Keychain Access - The previous version of software
has an application-identifier value of ['XXXXXX.XXXXXXX'] and the new
version of software being submitted has an application-identifier of
['YYYYYY.XXXXXXX']. This will result in a loss of keychain access."
I can accept losing Keychain Access as I understand that there is little that can be done here and it may not affect this app.
However, my question is, could current users be affected? There are no passwords in the app or any user details stored, it is mostly an informative app. I assume it won't stop them updating the app or block them from using their current build? These users have paid for the app, so if they stop getting access all of a sudden, they might be upset!
i.e. I'm not sure about the following technologies from Apple:
Important: The only apps that can ignore this warning without
consequences are those that do not use technologies that rely on the
App ID prefix, like keychain access, Handoff, and UIPasteboard
sharing.
I think you need to check with the developers to see if they are using anything related to the app ID prefix.
As stated by Apple, the app Prefix is critical to using a couple of their capabilities.
Basically, most of the technologies listed are all about inter-app communication. If you only offer one iOS / Mac app, you aren't doing any special interactions with other apps with the same app prefix, and you don't have anything to worry about. Pasteboard is basically a shared clipboard used to share information between apps by the same developer. Handoff is about syncing state between apps on different platforms (e.g. Sharing Safari tabs between your Mac and your iPhone).
The other thing to worry about would be the first error you show. That error means that if your app is storing any information in the keychain, the new version of the app would lose access to anything that was stored in the keychain by the old version of the app. If, like you say, your app really isn't using the keychain to store information (it doesn't have to just be passwords, FYI), you don't need to worry about that either.
I would definitely have the developers check for anything related to the keychain to confirm, as well as anything related to the PasteBoard or Handoff.
EDIT
As to the affect on current app users, they should not be affected if you are not using any of the above technologies. Existing users will get the update and should not notice any difference. More on that in this answer.
When going to transfer my iOS app to another developer, I got this message
You can't transfer this app because of the following reasons:
iCloud enabled
You can only transfer apps that aren’t iCloud enabled.
Deleting and Transferring Apps Documentation
The documentation states:
Make sure the app uses only technology and content that can be transferred.
No version of the app can use an iCloud entitlement.
Since a version of my app used iCloud, is there literally no way I can transfer it? If there is a way, how should I proceed?
The app must be deleted and re-created with a new SKU/Bundle ID.
Remove the app from sale by going to Pricing > Select Territories > Deselect All
Delete the app under More (to the right of Prerelease, Pricing etc) > Delete App
Create the app under the developer account as a new app with the same name with a new SKU/Bundle ID.
This will delete any reviews/ratings, gamecenter data, iCloud data, and any other data linked to that app. You'll have to recreate any in app purchases you had.
WARNING: Never use iCloud Entitlements in an app. It's not worth it because it makes your app untransferable and therefore unsaleable forever!
I had enabled iCloud entitlements in some previous build to play around with NSUbiquitousKeyValueStore, and now I can never transfer that app... This is so so so very bad. I have an Android version of the app, ran into no issues with Google Play.
Same here. I was just using NSUbiquitousKeyValueStore to allow the user to share some settings across devices. Now all my users who paid for the app will not receive any more updates, my 4.5 star ratings will be gone, etc. I am super frustrated and this will cost me a lot of money.
I have written an article about his on medium.com, so feel free to share it in your professional networks if you feel this could help fellow developers to not run into this trap.
For June 2022+: Apple has updated the rules in 2022. Now you can transfer your app the regular way even if it uses iCloud. They write about limitations in their documentation now in "Apps Using iCloud" paragraph.
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.
Right now we've got an app and plenty of versions floating around on Dropbox, but I want to be able to store all IPAs securely yet keep them available so anyone within the company can download them directly to their iOS device. Originally we set up an S3 bucket with an ITMS tag to download, but that only enables storing one IPA per PLIST, whereupon a separate website has to host that link along with any release notes and known issues.
We tried moving to a secure wiki but that ended up being more work than simply overwriting the IPA (and never updating the PLIST). Is there a simpler way of doing this?
You should use OTA, over the air distribution. It is a feature of xcode, basically you store your IPA files on your server (with the respective info.plist) and when you want to share the app you have only to share the url. Google it, you have to do some steps but is quite easy and absolutely secure (also because the device on which you want to download the app must be registered on your provisioning profile).
I have an App in the App Store which uses an In-App-Purchase item to unlock the full feature set. During all versions so far updates have never been a problem. The customers could download the new version from the App Store and the "full version item" which they did purchase before was still active: They could still use the full version after the update.
Today I have released a new version of the app and several customers are reporting problems with the full version: After the update the app only works as limited trial version. The app seems to have "forgotten" the information about the IAP.
I use MKStoreKit to handle the purchase and the information about the IAP is stored within the KeyChain. The users can restore the full version using the "restore previous purchase function" within the app which calls the corresponding StoreKit function.
How can it be that the information in the key chain is lost?
I do not know if all customers are affected by this problem or just some of them. All that I can tell is, that quite many reported the problem.
I have no idea what the problem might be.
This is the first version using iCloud and therefore it is the first time, that a entitlements file is included in the App. Could this be the source of the problem?
The "Keychain Access Groups" property in the entitlements file is set to "xy.mycompany.MyApp" which is the same as the bundle identifier.
I thought that without the entitlements the app used "xy.mycompany.MyApp" within the key chain to store the IAP information and that the information in the entitlements file is just to let different app share the same information in the key chain. Thus I am not sure if this might have to anything with the IAP problem.
What do you think? Any ideas or suggestions?