Why is my iCloud Drive AppFolder displayed on MacOS but disabled in iCloud Drive on iOS?

I developed the iCloud export function for my iOS application and it works. I can view the exported documents in our public AppContainerFolder in the iCloud Drive folder on Mac OS X 10.11.

But on iOS, I see the AppContainerFolder app in the iCloud Drive app. It is disabled and I cannot open this folder or see documents inside.

Image of the shutdown folder in the iCloud Drive iOS app

From the iCloud Drive settings, I can see that the files that I exported are in this AppContainerFolder in iCloud Drive.

AppContainerFolder image inside iCloud settings

Has anyone had such a problem with iCloud Drive?

I use two applications in my application, one with the identifier "iCloud.com ..." for export, and the other with the identifier "TeamIdentifier.com ..." for synchronization of Ensembles-CoreData. I am explicitly using container urls using the method:

[[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:@"iCloud.com..."] 

I already tried using TeamIdentifier-Container, but there were no changes in AppContainerFolder visibility.

I tried to raise BundleVersion, I played with Info.plist NSUbiquitousContainers settings. I also made Builds available through TestFlight for external testers to find out if this is related to development devices.

The only thing I have not done yet is to release a new version in the AppStore with the new BundleVersion to find out if this is related to a productive application and an application in development.

Any tips and tricks are welcome.

+5
source share
2 answers

After finding out Apple Developer technical support, I was now able to solve the problem.

My application announces two exported UTIs (its own backup files), so the iCloud container will NOT be turned on (or grayed out) by default when files other than these UTIs are saved in this folder. Our application can create PDF and CSV, but these file types were NOT declared as "Document Types" in info.plist because our application cannot display them.

When you add PDF and CSV document types to the info.plist file, the iCloud container is instantly displayed in iCloud Drive.

For reference, here is an excerpt from info.plist:

 ... <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array/> <key>CFBundleTypeName</key> <string>Adobe PDF</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Alternative</string> <key>LSItemContentTypes</key> <array> <string>com.adobe.pdf</string> </array> </dict> <dict> <key>CFBundleTypeIconFiles</key> <array/> <key>CFBundleTypeName</key> <string>CSV</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Alternative</string> <key>LSItemContentTypes</key> <array> <string>public.comma-separated-values-text</string> </array> </dict> </array> ... 
+6
source

The message Why my application is not shown in the iCloud drive folder seems to indicate that your application must be approved and released before the iCloud public folder is opened.

0
source

Source: https://habr.com/ru/post/1233685/


All Articles