Do I need any iCloud settings before using Ensembles for CoreData & iCloud syncing?

98 views Asked by At

I'm developing an app which uses CoreData and is already released. I'm trying to add syncing feature using iCloud and Ensembles 1.x. I added codes which are told in the readme, but syncing doesn't happen. The debug log says it can't leech to ensemble.

I enabled iCloud for the project, but only for Key-value storage which is used for another purpose. Do I need to enable other services such as iCloud Documents or CloudKit?

Also, I have this line like sample codes do, and wondering ubiquityContainerIdentifier shouldn't be nil. But I have no idea what I should pass. Could you please give me any advices?

cloudFileSystem = CDEICloudFileSystem(ubiquityContainerIdentifier: nil)

Thank you in advance.

1

There are 1 answers

0
Drew McCormack On BEST ANSWER

You do need to have iCloud Documents enabled.

See the Simple Sync example app to see the things you have to setup.

I think passing nil should work. That will choose the default iCloud container for you (e.g. iCloud.com.mycompany.myapp). If you need a different container, just set that up in your capabilities for the target, and use that.

Note also there is a free book at http://leanpub.com/ensembles