I have to share a directory created by appA with appB. Is there a way I can "authorize" appB to access the folder created by appA in its space? They are iPad only apps.
I know about UIPasteboard, but I want to share(preferable secure) multiple small files (stored in a folder) created by appA with appB.
I am want to avoid using a server to establish sharing between the apps.
Edit: Both app will be installed on the same device (iPad).
Thank you.
--AAT
From Apple's provisioning portal:
In addition, an App ID can also be used to share keychain data (such as passwords) between a suite of applications and share document and configuration data between your applications using iCloud.
So using iCloud, yes you can; otherwise, no.
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
I am developing an iPad App (will not put in App store, just ad-hoc deploy) that would have some documents save at apps Documents folder, and some where I need to enable the iCloud capability for some other function.
If I have no other special configuration (as I don't know), I would like to ask:
Will / Can iCloud or iTunes backup the Documents folder and containing files? (I don't want this)
What will be backup related to the App? (how about Library Folder)
Is iCloud independent per App?
If I restore the app to a new device, what will be preserved of not preserved?
iCloud will backup the App data. See the iCloud: iCloud storage and backup overview Support Document, but you turn off the App data backup on a per app basis. See the iCloud: Select which iOS apps to back up Support Document.
Basically the way that a backup and restore will work is iCloud will restore the App data, then will download the application from the iTunes Store (I'm not sure how this will work with an ad-hoc app.) Hope this helps.
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 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.)
I've worked for a while now on my (existing) app to add support iCloud synchronization. In total, I have 3 Versions of the app:
a) regular iPhone version
b) lite (free) iPhone version
c) iPad version
I want to use iCloud to make the core data storage sync between all 3 versions/devices. I've got the implementation, and the development versions I put on my devices worked great.
Yesterday I decided to submit the iPhone versions, but they got rejected:
Invalid Code Signing Entitlements - The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix. The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier.
Specifically, value "[teamid].com.[myself].[somename]" for key "com.apple.developer.ubiquity-container-identifiers" in [my app] is not supported.
I really have no clue about how those identifiers should look like. On this page: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1 they say something about containers of my other apps ... do I have to add 3 containers for the 3 versions of my app? So far I configured under project/targets/summary/entitlements:
[x] iCloud Key-Value Store: com.[myself].[somename]
iCloud Containers: com.[myself].[somename]
for all 3 versions (same identifiers). What do I have to configure exactly, so that all 3 versions will sync their core data storage database through iCloud?
According to iCloud Design Guide: iCloud Fundamentals, all your apps sharing your iCloud container, can do so using a single iCloud container (if that is what you wish). The catch here is that the primary (first) container ID must be the Bundle ID of your current app being developed, or a Bundle ID of any of your previously submitted apps (that share the same Team ID).
I'll bring an example,
Let us assume that your app regular iPhone app (a) has a Bundle ID com.yourteam.iphoneapp and it was the one that you submitted first and is available on the App Store. Then you have to provide that same ID as the primary iCloud container ID for all other versions as well.
Here's a relevant section out of the document mentioned above:
In the Xcode target editor’s Summary tab, you can request access to as
many ubiquity containers as you need for your app. For example, say
you provide a free and paid version of your app. You’d want users, who
upgrade, to retain access to their iCloud documents. Or, perhaps you
provide two apps that interoperate and need access to each other’s
files. In both of these examples, you obtain the needed access by
specifying a common ubiquity container and then requesting access to
it from each app.
Pick one of your iCloud-enabled apps to serve as the primary app for the common ubiquity container. The app you pick can be the current
one you are developing, or another app of yours submitted for
distribution in the App Store and whose entitlements use the same team
ID.
You have probably resolved this issue by now, but the answer is that you just use the same ubiquity container identifier in all apps. You only need one, and it is not dependent on the app name: notice Apple told you to use "[teamid].com.[myself].[somename]" not "[teamid].com.[myself].[appname]". Use "some name" that is consistent between the apps, not the "app name".
You need to create 3 separathe iCloud enabled provisional profiles. Devices that are running the same version of your app can share data on the same iCloud container. But if you wish to have any devices running any one of those three versions of your apps to share data then you need to add those identifiers in the Entitlements section of each version.
There is good tutorial on iCloud from http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1
Edited:
I added an sample picture for your case. Also, the text below is extracted from the tutorial on that website:
Here we use a new method you haven’t seen yet called URLForUbiquityContainerIdentifier. This method allows you to pass in a container identifier (like you set up earlier in the iCloud Containers section) and it will return to you a URL to use to access files in iCloud storage.
You need to call this on startup for each container you want to access to give your app permission to access the URL. If you pass in nil to the method (like we do here), it automatically returns the first iCloud Container set up for the project. Since we only have one container, this makes it nice and easy.