Git Product home page Git Product logo

cloudcore's People

Contributors

deeje avatar hyerra avatar lludo avatar scytalion avatar sorix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudcore's Issues

Update to Swift 5?

I updated to Swift 5 and observed the following. I was able to silence 2-5 but am stuck on issue 1.

  1. ObjectToRecordConverter.swift shows the following: .../CloudCore/Pods/CloudCore/Source/Classes/Push/ObjectToRecord/ObjectToRecordConverter.swift:111:21: Initializer for conditional binding must have Optional type, not 'CKRecord'

  2. CloudSaveController.swift shows the following: .../CloudCore/Pods/CloudCore/Source/Classes/Push/PushOperationQueue.swift:75:50: Value of optional type 'URL?' must be unwrapped to a value of type 'URL'

  3. CloudCore.swift shows the following: .../CloudCore/Pods/CloudCore/Source/Classes/CloudCore.swift:139:48: Value of optional type 'CKNotification?' must be unwrapped to a value of type 'CKNotification'

  4. CloudCore.swift shows the following: .../CloudCore/Pods/CloudCore/Source/Classes/CloudCore.swift:180:25: Value of optional type 'CKNotification?' must be unwrapped to a value of type 'CKNotification'

  5. CloudKitAttribute.swift shows the following: .../CloudCore/Pods/CloudCore/Source/Model/CloudKitAttribute.swift:44:64: Value of optional type 'URL?' must be unwrapped to a value of type 'URL'

Sharing Extensions

I've added support for syncing across both private and shared databases, but sharing requires even more support, like roles.

Deleted object not saving to iCloud

I've tried and tried but have not had any luck saving deleted object to iCloud. Everything else works fine. I have looked at the example repeatedly with no luck. I am trying to delete as shown below:

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle,    forRowAt indexPath: IndexPath) {
    let anObject = fetchedResultsController.object(at: indexPath)
    let objectID = anObject.objectID
    if editingStyle == .delete {
        persistentContainer.performBackgroundTask { (moc) in
            moc.name = CloudCore.config.pushContextName
            if let objectToDelete = try? moc.existingObject(with: objectID) {
                moc.delete(objectToDelete)
                try? moc.save()
            }
        }
        print("In editingStyle == .delete.")
    }//End if editingStyle
} //End tableview editingStyle

I have also tried:

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
    if editingStyle == .delete {
        // Fetch Bullets
        let bullets = fetchedResultsController.object(at: indexPath)
        // Delete Bullets
        bullets.managedObjectContext?.delete(bullets)
        print("In editingStyle == .delete.")
    }//End if editingStyle
} //End tableview editingStyle

And save here:

func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
    tableView.endUpdates()
    persistentContainer.performBackgroundTask { moc in
        moc.name = CloudCore.config.pushContextName
        try? moc.save()
        print("Saving to CoreData from controllerDidChangeContent...")
    }
    tableView.reloadData()
    updateView()
}//End controllerDidChangeContent

Please help. I'm not sure what I am doing wrong.

Switching both organization and employee to public in example fails on employee

Unfortunately everything was working great in the example when using private scope, but once I switched to public scope, resetting the development environment first, the employee no longer saves and errors are displayed. I'm happing to dig in on some debugging if you can point me in the right direction:

image

image

image

image

image

image

image

Clicking on the record for an employee in the CloudKit Dashboard yields the following error:
image

Ignore syncing individual attributes?

Is there some way I could mark certain attributes to not sync to CloudKit? I have an "order" field for sorting items, but want each device to be able to sort on its own. Any advice would be appreciated, thanks!

Managed Object doesn't have stored record information

Hi, execution stops at this line:

		// That is possible if method is called before all managed object were filled with recordData
		// That may cause possible reference corruption (Core Data -> iCloud), but it is not critical
		assertionFailure("Managed Object doesn't have stored record information, should be reported as a framework bug")

in file CoreDataRelationship.swift.

It started occurring when I started using a NSManagedObject that inherits from another parent NSManagedObject. Never occurred before.

Thanks.

refactor pull from public database to use polling

CloudKit public database support has changed dramatically since the project started. we need to refactor public database sync to use polling rather than the now-deprecated CKFetchNotificationChangesOperation

Reconsider publishing to "public"

I’m not necessarily thrilled with where support for “public” data landed. It was somewhat-implemented when I forked, and I reworked it for a scenario where an app could simultaneously publish certain record types to both private and public databases.

I’d like to add support for an “isPublic” attribute that CloudCore could automatically process.

Override Persistent History Clearing

currently, CloudCore assumes ownership of NSPersistentHistoryTracking, clearing out history after its been properly pushed to CloudKit. But NSPersistentHistoryTracking is also useful for shared containers and app extensions. Need to refactor such that apps can override default history clearing behavior.

Creating data in public database does not sync with other devices

So far, I appear to be creating records successfully using the example app.
image

The first record was created using the simulator, and the second record created using my own physical device. However, it doesn't appear that the two instances of the app receive notifications for sync and so do not appear to be syncing at all. This is the boilerplate example app, which I've modified the entities to use public rather than private, and removed the organization parent as I've mentioned in a previous post.

Do you have any advice on what might be causing the two devices not to sync? In addition, I had a separate user in a separate geographic location use the same container. He is able to create records in the same public CloudKit container, but again, we do not see updates from each other's app instances.

Thanks in advance!

Device A:
image

Device B:
IMG_AECFC89149B3-1

Strange race condition

I'm evaluating using CloudCore for a new project and was playing around with the example app and am running into a strange issue.

If I insert a sample one at a time and wait for the sync to CloudKit to complete there is no issue however if I rapidly click 4 or more times (3 or less is fine) then errors are presented about a partial sync failure.

The objects that the error is referring to have already been synced and look complete however any other objects which were not yet synced are left in an inconsistent state.

Once the app is restarted the remaining objects are synced bringing the databases in perfect sync.

If you disconnect the device/simulator from having an internet connection and insert the objects and then re-enable connectivity then things also sync fine so it only seems to happen when there is 4+ objects created and being synced at the same time.

Download example

Is there a git repository in the Example folder for git clone the example project?

need cache management for Data attributes, backed by CKAsset

CKAssets can be very large, and client apps will want to manage the cache state for these. Would be great if CloudCore supported this natively, probably thru a specific set of attribute names in the CoreData schema, which clients can use to signal to CloudCore when (and where?) to download CKAssets.

macOS Support?

Howdy! I'm currently experimenting with building my first Swift / Swift UI macOS application, and I'd like to play around with using CloudKit + Core Data and CloudKit Sharing.

I was just wondering how practical it would be to add macOS support to this repo?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.