0
votes

I've got an OS X app which uses NSDocument.save(to:URL) to save documents to iCloud. How can I look at these in the Finder?

By printing out the URL, I see that the files are saved to "/Users/me/Library/Mobile%20Documents/iCloud~com~mycompany~appname/Documents/filename". But if I navigate to that directory, it doesn't show me the contents. As soon as I double-click the "Mobile Documents" folder, it actually takes me to a folder called "iCloud Drive" which doesn't show any of my files.

If I navigate to the directory in the Terminal, then I do see my files. But is there any way to get there in the Finder?

Thanks!

1

1 Answers

0
votes

You need to set the information about iCloud document both in Info.plist and YourApp.entitlements. Especially, you need to take care to set some keys in .entitlements manually, and you cannot use $(PRODUCT_BUNDLE_IDENTIFIER) in the keys in Info.plist. Have you done all of them?

In addition, don't forget to increase the bundle version after changing the settings for the iCloud document. It's important to let the system update.

FYI, The followings are those for my app (CotEditor). I hope it helps you.

Info.plist

enter image description here

.entitlements

enter image description here