Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Add container variable to config #20

Closed
wants to merge 1 commit into from
Closed

Add container variable to config #20

wants to merge 1 commit into from

Conversation

blwinters
Copy link

Thanks for the great library, Vasily! If you're open to it, I would like to contribute some code to CloudCore as I add features and fix bugs to support my app.

About this PR:
I need to use a custom CKContainer in my app so that Core Data can sync between an iOS app and a Mac app. I made the following changes to support using a custom CKContainer:

  • Added a container: CKContainer variable to CloudCoreConfig
  • Replaced references to CKContainer.default() with CloudCore.config.container
  • Moved allDatabases from FetchAndSaveOperation to CloudCore
  • Removed the default parameter value from FetchAndSaveOperation.init and passed in allDatabases for the appropriate inits (CloudCore, lines 94 and 156)

If you have any questions about this or if you would like me to change anything, just let me know. :)

This allows a custom CKContainer to be used for sharing data between multiple apps, like an iOS and macOS app.
Sorix added a commit that referenced this pull request Feb 3, 2018
Squashed commit of the following:
    Update version to 2.0.1
    Revert change: FetchAndSaveOperation.allDatabases
    Fix unit tests crash
    Add `container` variable to config
@Sorix
Copy link
Owner

Sorix commented Feb 3, 2018

Thank you, pull request has been merged with some changes

  • Fixed broken unit tests
  • Reverted allDatabases place to initial, because that has broken compatibility with previous versions. But anyway allDatabases respects now CloudCoreConfig's CKContainer.

@Sorix Sorix closed this Feb 3, 2018
@Sorix
Copy link
Owner

Sorix commented Feb 3, 2018

Marked as version 2.0.1 and it is available at CocoaPods 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants