简体   繁体   中英

Getting Ensembles Idiomatic OSX App to sync with iCloud

I try to implement the Ensembles iCloud sync for the Cocoa app of our already working and syncing iOS apps. Because I have a problem in that Cocoa app, I thought to try the Ensembles sample app.

So I try to get the Idiomatic App for OSX to sync through iCloud. But I always get the same error, that I am not logged into iCloud, because

[fileManager URLForUbiquityContainerIdentifier:ubiquityContainerIdentifier]

always returns nil for me.

I am logged into iCloud on my Macbook and sync for eg DayOne works fine between iPhone and Macbook. So, not being logged in could not be the problem. The question is, why the FileManager does not return the Identifier?

I hassle with this for three days now and it worked already for some time and broke because of 'I don't know'. I restored my ~/Library folder from TimeMachine and then it worked for some time again, but also broke again. Then I created a new OS user and used another Apple-ID for iCloud, it worked for some time and broke again.

I am really a little confused, am not sure, if it has something to do, with Signing, Sandboxing, Provisioning ... or whatever.

So, what did I do?

I opened the Ensembles 1.4 Idiomatic project, On the Target-General -Tab I changed the BundleIdentifier , I enabled MacAppStore Signing and I chose our DevTeam .

On the Capabilities -Tab I enabled AppSandbox and iCloud Capabilities , specified custom containers and chose the newly created iCloud container,

On the BuildSettings -Tab I chose the Mac Developer CodeSigningIdentity and the MacTeamProvisioningProfile for our BundleID. (I would just post screenshots, but haven't enough reputation points for that.)

Also, disabling the Sandboxing capability does not help.

Has anyone an idea, or knows, what thing I am missing? Any 'magic' folders in ~/Library that has to be deleted? Logging in and out of iCloud? Deleting the container on the iCloud servers? Or do I have to completely new start the App-Id-Certificate - ProvisioningProfile -hassle, to perhaps solve this issue?

Could it be, that my iCloud accounts have been corrupted?

Any help appreciated, thanks in advance for it.

Ok, for quite some time, I didn't have that error again on my Mac and wanted to share, that I have NOT found out, WHAT caused this iCloud syncing error, but that it worked now for weeks, AFTER I restored my ~/Library folder again.

So, my best guess for solving this error of mine: Do TimeMachine Backups and do NOT manually delete things under ~/Library without such a backup!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM