iCloud Use Outside the Mac App Store? App killed because its use of com.apple.developer.ubiquity-container-identifiers entitlement.

I believe it was announced that apps outside the Mac App Store could use iCloud when iCloud drive was introduced.


This is logging out when try to run an exported Developer ID application:

Killed my.App.Bundle.Id.here because its use of com.apple.developer.ubiquity-container-identifiers entitlement.

Also may be helpful to include the error code being logged out:


error code -67050

Thanks for the error code, but it doesn't really matter. The problem is a simple one: iCloud Drive works differently than the old-style iCloud containers. Apps can save to iCloud Drive just as they would save anywhere else—the user just needs to select a location in iCloud Drive using the Save panel. In order to set up an iCloud container (visible to the user as the special folder marked with the app icon), you do still need need to have the traditional iCloud entitlements and Mac App Store distribution signatures.


But since you're using Developer ID, you have no choice but to delete the entitlement anyway. Also, make sure that you're not building with a provisioning profile—even if there aren't any entitlements that require it—because it will invalidate the code signature and prevent the app from launching for anyone but you. I learned this one the hard way 🙂

Yeah I'm not building with a provisioning profile, though Xcode is really having a hard time archiving properly. It failed sometimes, saying no provisioning profile found, even though I told it to sign with my developer ID.

But I got it to archive, and when I did, the application won't launch (and that error logs out).

I did try to archive the app without code signing too and then in Organizer I exported the Developer Id Signed app (which exports the app signed). When I do it that way, the app will launch, but I lose the iCloud entitlement. So there goes that.


I originally wrote this application for the Mac App Store but Apple rejected it.

I got a phone call from them, the guy I spoke too was pretty nice about it, and he suggested I distribute the app outside the Mac App Store...though the reason for the rejection still feels a bit arbitrary to me…but that's a battle I can't win.

So are you saying, there is no way to get a container when you're outside the MAS? I know the user can always navigate to the iCloud drive folder in Finder, but that doesn't do anything for my app.

Unfortunately, yes, there is no way to get a container in a production environment without using App Store distribution.


So your app got rejected? If you're willing to share why, perhaps I'd be able to help you correct whatever problem is there.

Thanks for responding. I guess I'm on a wild goose chase here if I can't get an iCloud container outside the MAS.


Not sure why the review team would call me and suggest that I distribute it outside the MAS if that is the case. I guess I could probably find a way to point to the entire iCloud drive folder if I wanted, or manually hack a directory folder in there... but I really don't want to be that intrusive. I'd like to just work within my own container within iCloud and do it nice and clean. Guess from a programming standpoint, I won't be able to do it cleanly.

I believe I know how to modify the application in order to get it on the store, however, I think if I do what Apple suggests it compromises the quality of the application, which is why I choose to take Apple's initial advice and take it outside MAS.

I think at this point the only thing for you to do is weigh the options: either you have to forgo the iCloud container or you have to risk modifying the app so that it no longer satisfies your vision. It's a tough choice, and only you will be able to make it.


Here's a thought, though—you could try using another form of data storage: perhaps a sandbox container, or a proprietary file (like the iTunes library) that users can place wherever they want, including iCloud Drive?

Yeah, basically they don't want to allow me to use iCloud in the fashion that my app uses iCloud (at least not for the Mac App Store). I don't really want to go into details too much about what the app does or why Apple choose not to allow it on the store because I believe developers need to hear what is allowed or not allowed on the App Store(s) from Apple and not from another developer. It isn't my job to get the word out that apps like this aren't allowed. I did suggest to them to be a little less vague on this stipulation in the review guidelines.


I will say this, the app got rejected twice.

I went ahead and added a good amount of functionality after the initial rejection, thinking it would perhaps be enough to get it through.

In my initial talk with someone from Apple it was suggested that I think about selling it outside the MAS (the phone call from Apple came in between the first and second rejection). After the second rejection I decided outside MAS was the way to go because I believe the changes I would need to make compromise the app and provide no benefit to users.


So now I have to figure out a clean way to use iCloud in a non-MAS app. I actually was under the impression that iCloud was not allowed outside the MAS before my talk with Apple. I really don't want to hard-code a path that is subject to change...maybe I'll make the user create a directory...not great.

I'm not sure what you're getting at—are you using iCloud for data storage or are you trying to do other stuff with it? If you're trying to use iCloud for something other than it's intended purpose (storage of user data and application state and the like), it's against the rules in the developer program license agreement and I can't in good faith help you break the rules.

My app uses iCloud for data storage. The app uses only public methods. There's no sketchy behavior from a programming standpoint (or really any standpoint). It's a document based app, there are some nice innovative features in it.


I can only speculate why Apple rejected the app. It was not rejected for poor quality. The impression I got was that they don't want us (third party devs) doing this...but they didn't stipulate it clearly in the review guidelines (I wish I knew of course because I spent lots of time on this) ...but no way could it be argued that the app isn't useful.

It was Apple who suggested I think about selling it outside MAS to me... the reason I made this thread, was to get some clarification on how I could get an iCloud container for outside MAS. If you are correct and I cannot get a container outside the MAS, then I am disappointed and have to think about where to go with it...


But yeah, I have no intention of going against the rules either...my convo with Apple suggessted to me that "you can do this, but not here (on the MAS)". That is not a direct quote. But anyway, if someone could point to documentation that iCloud is not allowed to be used outside MAS...I'd greatly appreciate it. I'm not really trying to complain about the rejection (though our convo sort of morphed a bit).

I'm glad to hear that—your earlier posts were oddly vague, making it look like you were hiding something. Anyway, you weren't told which regulation you were being rejected under? That's really kind of strange…


About the documentation, the introduction to the iCloud Design Guide clearly answers your question:

Prepare for iCloud with Provisioning and Entitlements

The first two steps in adopting iCloud for your app are to obtain an appropriate provisioning profile for your development device and to request the appropriate entitlements in your Xcode project.


Note: iCloud entitlements are available only to apps submitted to the App Store or to the Mac App Store.



Here's the link to the guide, if you want to see it for yourself.

https://developer.apple.com/library/mac/documentation/General/Conceptual/iCloudDesignGuide/Chapters/Introduction.html#//apple_ref/doc/uid/TP40012094-CH1-SW1

Great. Thanks for pointing that out. I appreciate that. I won't go banging my head against the wall trying to get this to work.


I was being vague mainly because I didn't want to get into the rejection details too much....because I really didn't make this thread to complain about the rejection. I decided to take Apple's suggested advice and go outside MAS. I'd rather stay in the MAS and target those customers but there is nothing I can do about that.


As I said before, I think it's Apple's responsibility to define the review guidelines. I don't want to spread the word that apps like mine aren't allowed. It really isn't my place to do that (especially not here on Apple's dev forums). I also was being vague because this isn't a situation where I think I could ask other developers for advice and get feedback on how to get the app in the store (the beginner "what's wrong with my app" type question). I think this is a situation where they, for whatever reason want to excercise control here. If I truly believe the changes suggested to my app made sense, I would make them (usually when you get rejected, the suggested changes do make sense). But I don't believe I should compromise the quality of the app at the expense of potential customers because Apple says so...just to get it on the Mac App Store. I'm still an Apple fan. I just want a fair chance to compete. Maybe I'll have better luck in the future...

I understand your frustration. Good luck! 😉

I just downloaded a trial version for an app made by another developer (from the developer's website). I notice that this application has an iCloud container in my iCloud Drive folder. I never purchased this app from MAS...so they perhaps found a workaround???..but if I remember correctly, I couldn't get a proper icloud container for my app outside MAS...

Is that folder in iCloud Drive actually an iCloud container (marked with the app icon), or is it just a folder? It's hypothetically possible, I suppose, for a non-sandboxed app to create folders and files directly within the user's local iCloud cache. Try running the following Terminal command and see if you can find that app's bundle identifier (with the periods replaced by tildes) in the top level. If so, you have a bona fide iCloud container.

ls "~/Library/Mobile Documents"

If you don't see it here, try this to look at the iCloud Drive cache:

ls "~/Library/Mobile Documents/com~apple~CloudDocs"

Note that you won't be able to do this in the Finder, even if you have the Library folder visible, because of the special treatment applied to the Mobile Documents folder.

Yeah it's a container not a regular folder. I know non-MAS apps are allowed to have documents in the iCloud drive folder starting in 10.10...but I wanted a bonafide container for my app b/c it's nicer to work with...


I inspected the bundle and it has iCloud entitlements. In iCloud drive, when you click in it it has the:


iCloud for App Name Here

You Can move your existing documents to iCloud blah blah...

My only guess would be, that since there is a MAS version of this app live on the store (presumbly with the iCloud entitlement)...I'm guessing the non-MAS version has the same bundle identifier and is able to access the container. That is my guess. When I tried to ship my non-MAS app with the iCloud container, the system terminated my app for using the iCloud entitlements. Maybe that's how this app is able to get iCloud outside MAS...though if that hunch is correct that also may be a bug. Or maybe this dev gets the red carpet treatment.

iCloud Use Outside the Mac App Store? App killed because its use of com.apple.developer.ubiquity-container-identifiers entitlement.
 
 
Q