Related
I have submitted many app builds to TestFlight, even yesterday, but today when I tried to submit my app to TestFlight via XCODE I get the following error:
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.healthkit.access' in 'Payload/Runner.app/Runner'."
I'm building a flutter project via XCODE. I have tried the following:
Cleaning my project.
Re-enabling automatic app signing in XCODE.
Deleting my provisioning files from ~/Library/MobileDevice/Provisioning\ Profiles/
Disabling automatic signing in xcode and creating my own provisioning profile via the Apple Developer site
But I'm still getting this error. My enablements haven't changed from the last time I uploaded my app. Please help, thank you.
UPDATE 1:
Appears to be a change made on Apples end that is causing this error. No official response/explanation from Apple has been provided yet. Some workarounds have been provided below. I went with enabling Clinical Health Records usage for the Health Kit enablement since this workaround doesn't use any non-apple approved changes. So still technically not a final solution, but a workaround.
UPDATE 2:
Apple has resolved the issue on their end, no workarounds are required anymore.
I was facing the similar error.
I believe the Apple back-end has changed and has started applying a stricter rule to entitlement keys that take array values.
I believe the Apple back-end used to accept empty arrays for entitlement keys that took array values but now require the entitlement key to either not be present at all or to contain actual values.
Evidence to back this assertion:
I have an entitlements file with a key for "com.apple.developer.icloud-container-identifiers" entitlement with an empty array like so:
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
This was fine until just yesterday (I successfully submitted a build, and have submitted builds like this for more than a year).
The Fix:
Remove or Comment out the following line from the .entitlements file:
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
The key was empty anyway so should not have an effect after being removed.
Now the TestFlight submission is successful.
Solution
What worked for me was to remove the following line in the .entitlements file
<key>com.apple.developer.healthkit.access</key>
<array/>
Validation
I double checked and the HealthKit access still works for read/write when building via Xcode
I tested the app via TestFlight and everything still looks good
My app got approved and everything works fine for existing and new users :)
Side notes
I had the same issue. I haven’t changed the entitlements for months and out of a sudden that error appeared. It might be the case that Apple changed some logic and applied stricter rules on their backend entitlement validation.
Interesting that if you create a new Xcode project and add the HealthKit entitlements it creates the entitlements like:
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>
Interesting read: https://developer.apple.com/forums/thread/10738
Remove 'com.apple.developer.healthkit.access' won't help the issue. So far we can just hope to wait for Apple to fix this.
Thread on forum (i can't access the Marceeelll's thread):
https://developer.apple.com/forums/thread/671352
Related:
App Store Connect Operation Error: ITMS-90164 [] for key com.apple.developer.healthkit.access
For me solution is to remove the following line in the .entitlements file
<key>com.apple.developer.healthkit.access</key>
<array/>
!This work if you submit the app for TestFlight!
This does not work if you submit the app for review :(. Binary will be rejected ITMS-90000: This bundle is invalid - $message.
What work for me: First, when you enable your app’s HealthKit capabilities: you must also select the Clinical Health Records checkbox!
Next, you must provide a Health Records Usage string in your app’s Info.plist file.
Same error for me with "icloud-container", just comment these lines in your . entitlements file:
<key>com.apple.developer.[YOUR-ERROR]</key>
<array/>
Deleting the empty iCloud Container entitlement (array) from the entitlement files solved the issue for me. Seems like a server-side change from Apple that no longer allows an empty array there.
Apple has fixed the issue. You can now try submitting app to TestFlight without making any changes.
Thread on Apple Developer forum: https://developer.apple.com/forums/thread/671352
What worked for me
Before started trying, I checked my .entitlements file it looks like this:
...
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>
...
Step 1: Remove and add HealthKit capability again.
Remove HealthKit from "Signing and Capabilities"
Add HealthKit back
Step 2: Check on "Clinical Health Records"
Once done, you shall be able to see your .entitlements file become
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array>
<string>health-records</string>
</array>
Step 3: Add Privacy - Health Records Usage Description and its value to info.plist
Final: Then I tried to archive and upload to TestFlight, it worked.
I commented-out/removed
<key>com.apple.developer.healthkit.access</key>
in .entitlements and it works!
A key with a value that is an empty array seems to be not allowed in entitlements anymore. Just removing the key/value pair fixed it for me.
I had the same issue with Network extensions, it is also empty and deleting it from Entitlements solved the issue.
Deleting the empty iCloud container entitlement will resolve the upload issue. But the app cannot select any documents from iCloud using document picker (UIDocumentMenuViewController).
We would end up with a crash in the app as below:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application initializing
document picker is missing the iCloud entitlement. Is
com.apple.developer.icloud-container-identifiers set?'
I have a mobileconfig which is used to add APN into iphone, whereas it does work for iOS8/9/10, but not iOS11. In iOS11, it says "invalid profile". If install this mobileconfig again, it says "UUID is not unique".
Later on, I found out the main cause. It is because the "username" parameter is missing from APN key, so that the iOS11 claimed the profile installation is failed, but it did installed the value "ABCDE" into APN, and set as default APN value too. (clicking “reset” button in APN setting will figure out that it has been set to be default). However, from the setting>profile, I can see NO profile is yet installed, so I can't further install or reinstall another APN profile mobileconfig. The reason behind is that the existing one (hidden one) is not able to uninstall.
<key>apns</key>
<array>
<dict>
<key>apn</key>
<string>ABCDE</string>
<key>username</key> <<--missing
<string></string> <<--missing
</dict>
</array>
So, I am looking for any solution, the way to remove the existing mobileconfig by building a app to tackle this abnormal situation. Should you have any ideas or further discussion, it is highly appreciated to share your inputs with me. Thanks in advance!
I encountered this problem as well. I did some combination of this to solve it:
1) manually add the corrected .mobileconfig as a ".stub" file in the directory "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles" (see the format of other .stub files in the directory)
2) add the PayloadIdentifier from the .mobileconfig file as a to the in the "PayloadManifest.plist" file also in the directory "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles"
Your profile should now show in the "Settings -> General -> Profiles & Device Management." menu
3) Delete your profile using the interactive menu. It will not delete from the menu structure, but it will not give an error either.
4) Delete your ".stub" file from step (1)
5) Maybe also (I can't remember if I did this or not) remove the added entry in "PayloadManifest.plist" (I can't remember if I did this or not)
6) Maybe also (I can't remember if I did this or not) remove the corresponding entry in "ProfileTruth.plist" in "/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles"
7) Delete "/private/var/Managed Preferences/mobile/com.apple.managedCarrier.plist"
8) You will now be able to add (and remove) your corrected mobileconfig file using your regular means
All of this was done on a jailbroken iPhone running 11.3.1
I am trying to upload an app to the app store and I am getting this error on the page that has the certs. As far as I can tell I have changed the field so they have matched, but I am missing something.
Any help would be greatly appreciated.
I'm not sure why this fixed it, but I went into my Target's Capabilities tab, turned iCloud ON, tried to do an archive build, it failed, I turned iCloud OFF again, tried to do an Archive build and it succeeded, and after that it was able to automatically resolve certificates again.
Rightclick on Finder -> Go to Folder...
~/Library/MobileDevice/Provisioning
For Xcode 11
~/Library/MobileDevice/Provisioning Profiles/
Delete all provisioning profiles, done.
The app you created has an incorrect application-identifier value, for what the provisioning profile is expecting. The cert for appID com.example.foo for the team 2ABCDEFG will be expecting application-identifier: 2ABCDEFG.com.example.foo, your app declared that its appID was com.example.foo, but the application-identifier didn't match, either you are using the wrong team-prefix, or you have the bundleID misconfigured.
In my case, I am using build schemes to allow me to build a prod app and a qa app. com.example.foo for prod, and com.example.foo.qa for QA.
I had set my bundleIdentifier in the Info.plist to $(PRODUCT_BUNDLE_IDENTIFIER)$(BUNDLE_SUFFIX), which works great in the simulator and on device for having different apps, however, when the app generates its application-identifer during the archive phase, it must not be reading the bundleIdentifier generated by the Info.plist.
To remedy the situation, I edited FooProject.xcodeproj/project.pbxproj (with a text editor) to change my QA buildSettings PRODUCT_BUNDLE_IDENTIFIER to com.example.foo.qa
You can see Apple's Technical Q&A and this page to see their in depth dive into solving this. Once you run the following on your exported app:
codesign -d --entitlements :- ./Payload/myApp.app
and see what application-identifier your app was just built with, it should be pretty quick to realize what your are doing wrong.
I didn't find that page in my Google searching, because they don't actually use the phrase from the error message or call the application-identifier by its full name, but instead say App ID.
Also, the solution to this problem isn't to generate a new provisioning profile that has the application-identifier entitlement, it does have that entitlement, however, the value in the provisioning profile, and your app have to match.
Maybe the {project}.entitlements file was missing. Doing what #samkass mentioned will auto generates the file and it will work.
So basically just go to capabilities tab, enable anything, and disable it.
Changing the iCloud toggle to on, building, and disabling iCloud, got rid of the error saying that:
Profile doesn't match the entitlements file's values for the application-identifier and keychain-access-groups entitlements.
In Xcode 11, this could happen when a .entitlement file is not present for your project. The solution would be to add any random capability by clicking on '+ Capability' under 'Signing & Capabilities' (which leads to the creation of an .entitlement file) and then removing the capability. This will let you automatically provision a certificate too.
I'm developping a Flutter app with Flavors that use the --dart-define command.
I've been very inspired by this great article.
However I've encountered this 'application-identifier' issue when deploying.
I've tried a lot of options.
This solution is the one that worked for me.
It's very close to #n8tr's comment, but the difference was the 'instead'.
To resume, just set the Product Bundle Identifier to your.id.here$(DEFINEEXAMPLE_APP_SUFFIX) under Packaging in Build Settings instead of in Info.plist.
Please check your application features which required for your application like In app purchase , push notification , Inter App audio , Siri kit etc.
This is the only cause for this type of error.
Make sure that in your App id the above flags should be on.
Most of time it happens when you not configured push notification , In App purchase in you development App ID.
I went into my Target's Capabilities tab, turned Keychain Sharing ON and it starts working
For me, the trick was to
add/remove a capability for the target (in my case a Widget);
make sure the created entitlements file is listed in the build settings;
and to add the "APS Environemnt" key with value "development" to the entitlemenets file.
In Xcode 10, I got it working by moving the entitlements file to correct folder in Project Navigator. I didn't have the entitlements file, but I managed to get one by toggling features on capabilities tab.
I got this same error and none of the solutions above solved the problem in my case.
What did work for me was to change the "Can be debugged" setting in the "Entitlements.plist" file from "NO" to "YES."
In my case the issue was following: provisioning profile used for build step was created for different app id than provisioning profile used for export step.
So make sure you're using the same provisioning profile for build and export step.
What worked for me was that I made the archive in XCode 11, and did the upload in it Xcode 12 beta.
Just have a look, whether the "Sign in with Apple" capability is added along with other capabilities such as "Background Modes" & "Push Notifications"!
In my case, it was there.
So after deleting the "Sign in with Apple" capability, it got removed from the 'project.entitlements' file and the provision profiles got synced immediately.
Cross check capabilities in the app with options you enabled for your App Id in your developer account.
I tried a few options listed in the answers here but none helped, however, toggling the checkbox "Automatically manage signing" off and on fixed the problem.
TL;DR: check your App ID and make sure the services are matching what's in your target.
What happened to me was that I let Xcode 10.1 help me create an App ID, and after that, I run into the problem as described here. (I selected whildcard app ID when I created the app in iTunesConnect, so I didn't even realized this was done.) When I opened iOS developer portal, the new app ID has Game Center and In App Purchase enabled automatically.
Since I couldn't enable Game Center in your Target -> Capabilities, I enabled In App Purchase, and then my app could be signed and uploaded.
When we faced the same issue, we tried all the above things but none of it worked.
What worked for us is changing the bundle identifier so that it was not identical to the previous one, for example "com.name.App" to "com.name.App2"; let xcode attempt to fetch/create provisioning profile and then chance it back to the original one.
Got this idea from this thread on Apple's developer forums- https://forums.developer.apple.com/thread/114539
I came across this page recently after trying to create a duplicate target - none of the suggestions were working for me. Further investigation, and some amount of hair pulling, eventually led me to scouring through the build settings for my app to try and figure out what was wrong.
It turned out that my project was still pointing to the entitlements file of the ORIGINAL target, rather than having one of its own. To resolve this, I navigated to the original entitlements file in Finder (e.g. ${SRCROOT}/MyProject/Entitlements/TargetName.entitlements), created a copy within the same folder and then renamed it (e.g NewTargetName.entitlements).
Then, I opened my new entitlements file and changed the application-identifier field to match the ending of my new target's bundle identifier (e.g. ABCDEFGH.US.co.fake-company.superduperapp-newtargetname).
Finally, I updated the 'Code Signing Entitlements' field in the build settings to the path of my entitlements file (for me, this was something along the lines of ${SRCROOT}/MyProject/Entitlements/TargetName.entitlements).
I returned to the Signing & Capabilities tab, and lo, the issue was fixed. Hope someone out there finds this useful.
Go to Xcode's Info tab and change Bundle identifier field - after changing app name it didn't change even though I changed Bundle Identifier on the General tab. The above fixes did not work for me but this one did instantly.
I had this issue with a brand new app, in Xcode 12 beta 3 (app submissions started today).
Xcode had "Automatically manage signing" on. However, the Team ID displayed in the "Signing Certificate" didn't match the Team ID displayed in iTunes Connect website. This was the root cause preventing the app from being uploaded.
How I fixed it:
I manually created a provisioning profile for App Store distribution
In Xcode, I tapped on "Download manual profiles" in Preferences -> Account
Then, I turned off "Automatically manage signing".
Once I selected the provisioning profile in the dropdown, the correct Team ID appeared under "Signing Certificate"
I ran into the same issue while setting up a Gitlab pipeline that runs exportArchive cmd and uploads to AppStore. I was able to get it to work by changing the DEVELOPMENT_TEAM in Build Settings to the same Team selected in Signing & Certs.
Because previously it was set to blank which was using another DEV TEAM id by default which was incorrect and didn't match and it was complaining about the "application-identifier" = 12331232.com.bannana.apples.peach not matching. Which lead me to setting the correct DEV TEAM and it worked.
Xcode ver: Version 11.3.1
I hope this helps somebody.
Our Setup
Multiple targets:
sub-apps
watch
app clip
today widget
...and use iCloud.
Turning iCloud on and off was not an option for us. We already use it in production and rather not mess with it... I got the original question's message and this variation at some point as well:
Profile doesn't match the entitlements file's values for the
application-identifier and keychain-access-groups entitlements.
Solution
Hinted from other responses here, We made sure that all targets would have a .entitlements file. If the target had none we created an empty one like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
...and pointed it's target Code Signing Entitlement in Build Settings to the empty .entitlements file.
Solved!
Delete all profiles located in ~/Library/MobileDevice/Provisioning Profiles/
in my case , I had to put :
<key>aps-environment</key>
<string>development</string>
in all files with extension .entitlements
In my case I am creating multiple apps from one code base using --dart-define, and building flavors in flutter app.
I have done everything right but only one
as mentioned in the comment above
https://stackoverflow.com/a/65292545/8787695
I have already written app_suffix in the build settings (PRODUCT_BUNDLE_IDENTIFIER = com.flutter.myapp$(APP_SUFFIX)).
but I have also written app_suffix in the info tab to the Bundle identifier.
I have the same problem because I had a wrong value in iCloud Key-Value Store inside the entitlements file. I set the following value and the error was solved:
iCloud Key-Value Store = $(TeamIdentifierPrefix)$(CFBundleIdentifier)
Removing this fixed the issue on my side.
OTHER_CODE_SIGN_FLAGS = "--deep";
My main target had this build setting and that way it overwrote the code signing entitlement of the embedded application with the parent code signing entitlement.
I'm developing an iCloud-enabled app where users will be able to import and export files via iCloud Drive. When browsing iCloud Drive, either using the UIDocumentPickerViewController (iOS 8) or the Finder (OS X Yosemite), I can see directories created/owned by other iCloud-Drive-enabled apps, such as, Automator, Keynote, or TextEdit.
I want our app to expose its ubiquitous documents directory in iCloud Drive, too, but haven't been able to figure it out yet. Within some of the aforementioned apps' Info.plist files, I've discovered this key:
<key>NSUbiquitousContainers</key>
<dict>
<key>com.apple.TextEdit</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
These keys are also documented here, but I haven't found any other documentation on the broader subject. Edit/Note: Although it does not contain the answer to my questions, the Document Picker Programming Guide is a helpful resource.
I've tried adding the above-mentioned keys/values to our app but didn't see any effect. Things I've noticed/tried:
For 3rd party apps, iCloud containers are constructed this way: iCloud.$(CFBundleIdentifier). I'm not sure why TextEdit only uses the pure bundle identifier, but for our identifier, I've tried both approaches, i.e., with and without the iCloud. prefix. I've also recognised that you need to hard-code the bundle identifier (i.e., don't use iCloud.$(CFBundleIdentifier)) as only the PLIST's values seem to be resolved at build time, but not the keys.
I've added a sub-directory programmatically (to <containerPath>/Documents) so the container is not empty. However, this shouldn't matter as all the other apps' directories were initially empty, too.
Some Apple apps that appear in iCloud Drive do not have these entries in their Info.plist, e.g., Numbers and Pages.
iCloud is set up correctly and I can programmatically look into the ubiquity container using the URL returned by [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];.
I am logged into an iCloud account where iCloud Drive is enabled. I can see my iCloud Drive content in the UIDocumentPickerViewController.
I use the iOS 8 beta 5 simulator (and Yosemite beta 5 to view the iCloud Drive directory on the Mac) (Edit/Note: This equally applies to beta 6)
This is how my Entitlements file looks like (relevant parts only)
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.$(CFBundleIdentifier)</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array/>
I've set this up using Xcode's UI in the Capabilities section. I don't get why the last key doesn't have an entry, but adding <string>iCloud.$(CFBundleIdentifier)</string> doesn't help. Instead, it makes Xcode complain in the Capabilities UI, so I've removed it. Edit/Note: In Xcode beta 6, this has been fixed, i.e., the ubiquity container identifier needs to be set and Xcode can fix that for you.
Original Questions: So... is it a bug? Does it not work yet? Am I doing it wrong? I couldn't find a known issue in the release notes.
Edit:
Two more things that I've tried:
Adding the (optional) NSUbiquitousContainerName key (+ value) to the container-specific dictionary, as suggested by Erikmitk.
Adding only the NSUbiquitousContainerIsDocumentScopePublic key/value to the PLIST root dictionary rather than the container-specific dictionary, as it's done in one of the WWDC sample apps (look for NewBox).
I was experiencing a similar problem with my application. I was able to make this work by doing the following:
Add the NSUbiquitousContainers setting to my Info.plist file according to documentation here https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/FileProvider.html. Here is the relevant code:
<dict>
<!-- ... other top-level Info.plist settings ... -->
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.com.example.MyApp</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
<key>NSUbiquitousContainerName</key>
<string>MyApp</string>
</dict>
</dict>
</dict>
Important! I then changed the above NSUbiquitousContainerSupportedFolderLevels string value from Any to One
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>One</string>
Next, and last, I had to change CFBundleVersion to a higher version. I also bumped the CFBundleShortVersionString to a new version as well.
Built and ran and after that, the folder with my applications icon appeared properly in iCloud Drive! Hope this helps!
When you edited the Info.plist, maybe you forgot to bump up the bundle version number? This is a requirement as per WWDC session #234.
The catch is to call [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; (or with another container identifier if it's not the default one) at least once (not per launch, but presumably per version, or when changing one of the respective PLIST entries) in order to initialize the directory. I reckon this step needs to be combined with an increase of the bundle version number, as suggested in roop's answer.
I notice my question may have been confusing in that respect, as I mentioned being able to look into the documents directory* programmatically using the API in question. However, I removed that code from the app later, maybe before getting the rest of the setup right. I'm not going to write into the documents directory directly, only through the Document Picker. Therefore, there hasn't been any need to get the URL.
If you just need a Document Picker to read/store files from/in iCloud Drive or other apps' document directories, there's no need to call URLForUbiquityContainerIdentifier:. Only if you want your app to have its own ubiquity container (and potentially expose it in iCloud Drive and the Document Picker), the steps mentioned in the original post and the call to URLForUbiquityContainerIdentifier: are necessary.
*When mentioning the documents directory, I'm always referring to the one in the ubiquity container, not the local one.
It seems, changing the CFBundleVersion will let it work.
I think you can try it. I got this from Apple Developer Forums.
Hope this work for you.
After dorking around with this all morning, reading all the posts, making all the changes, the key thing that finally worked for me was, as Yet Another Code Maker stated, changing the bundle ID. I think once it has created a container for a bundle, you can't go back and change the visibility of it to have it appear in Finder. I had tried all the different info.plist values but nothing worked until I changed to a new bundle name and forced the system to create a new one. By the way, I didn't see this noted anywhere but the bundle name, the NSUbiquitousContainer name and the NSUbiquitousContainerName can all be different - which is what I did in my case. After spending so much time on this, I figured I would go ahead and put a simple sample app on GitHub in case anyone is still having problems debugging their iCloud folder appearing in Finder - you can find it here. All the required steps are outlined in the README.
In my case (Xcode 7 and iOS 9), the only thing which made it works, after multiple tries, was just use a new bundle identifier (you don't have to change the cloud container identifier, just be sure to select the container you want to use in the Apple Developer Member Centre and to specify in Xcode a custom container instead of the default).
In fact, that means the first time you run your application, the NSUbiquitousContainers section of the info.plist has to be set up. If you set it afterwards as a second step, it won't work...
Well, it's not documented anywhere but try to add Documents folder in the container and store your files there.
Found this hint in replies in this Apple Developer Forum thread.
The .plist entry on this documentation page has an additional entry:
<key>NSUbiquitousContainerName</key>
<string>MyApp</string>
Maybe the missing name is prohibiting it from showing up.
Couldn't find any documentation, but trial and error, I found that:
[[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:#"com.apple.CloudDocs"];
Gives you the base URL for the drive as seen in the picker. Using this base URL I was able to save files in my app and see it on the iCloud drive within Yosemite.
Edit 14.8.14
I tried your plist settings:
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.net.redacted.docTest</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
In my little throwaway test app "docTest" it does indeed expose the empty Documents directory in Yosemite and in the document picker.
Screenshot http://spring-appstudio.com/picker-view.png
Just wanted to emphasize one of the OP's discoveries that fixed it for me:
I've also recognised that you need to hard-code the bundle identifier (i.e., don't use iCloud.$(CFBundleIdentifier)) as only the PLIST's values seem to be resolved at build time, but not the keys.
You need to hard code the bundle id. Also update the version.
(I didn't notice this in the question until I went through all the answers).
Same problem occurred to my OSX app.
It is seemed that NSUbiquitousContainers setting works only in the creation time of the iCloud containers. So I tried with new Apple ID(for preparing clean iCloud environment), it becomes to work.
I know this is an old thread but just in case someone runs into the same issue: Only way for me to get my Container folder to be visible in iCloud Drive (after trying all the above suggestions) was to have my app create a temporary file in the Documents folder. As soon as I did that the Container Folder (and the file I created) showed up on my Mac. If this is really the case that I have to create a file to make this folder visible then this would be a bit annoying because my app is a read only app (only reads files added by the user to the Container Folder). The Container Folder needs to be visible as soon as the app is launched for the first time. I guess I will have to detect the first launch.
I want to learn iOS development first then buy a developer account. So I'm using a Jailbreak+AppSync+iOS 5.0.1 device for development.
Then, I want to add some lines below to Entitlements.plist but I can't find this file and of course I can't make it by myself.
<dict>
<key>com.apple.springboard.launchapplications</key>
<true/>
</dict>
From the official document, I found I can see Entitlements.plist in the shell and I see it.
codesign -d --entitlements -xxxx/Build/Products/Debug-iphoneos/MyApp.app
Then I think the Entitlements.plist file for this app must be somewhere. I just want to add some lines to it.
I also found some questions that said to enable Entitlements.plist, you should do it in Organizer/Provisioning Profiles. But that question is about iCloud. I don't need iCloud. So I want to ask, is there anyway to write to Entitlements.plist without a developer account?
[ADD]
If Xcode 4.2 or iOS 5 don't necessarily need a Entitlements.plist anymore. How can I add this entitlement (com.apple.springboard.launchapplications) to my application.
Thank you very much.
In Xcode 4.2, click your project, then TARGETS->project name->Summary, at then end of this page, check "Enable Entitlements", then you can see a file appear in your project.
It is no longer needed, but if you want to specify property in it, you can do in this way. :-)