carekit-apple / CareKit

CareKit is an open source software framework for creating apps that help people better understand and manage their health.
https://www.researchandcare.org
Other
2.41k stars 443 forks source link

CareKit-issue while updating Symptom tracker and viewing insights #145

Closed sgollahallichowda closed 7 years ago

sgollahallichowda commented 7 years ago

Whenever user updated his CarePlanstore data and his activities it does not trigger the Delegate to inform insights ,

Any suggestion on this very much appreciated !

// The aggregate operation is dependent on the query operations. aggregateDataOperation.addDependency(meEventsOperation) aggregateDataOperation.addDependency(outdoorWalkEventsOperation) aggregateDataOperation.addDependency(moodEventsOperation) buildInsightsOperation.addDependency(aggregateDataOperation)

    // Add all the operations to the operation queue.
    updateOperationQueue.addOperations([
        meEventsOperation,
        outdoorWalkEventsOperation,
        moodEventsOperation,
        aggregateDataOperation,
        buildInsightsOperation
        ], waitUntilFinished: false)
ninoguba commented 7 years ago

OCKSample is a good example showing how this works. Look specifically at the CarePlanStoreManager.swift for its delegates.

akshay-yadav-apple commented 7 years ago

@sgollahallichowda Can you provide complete insights builder code, where you're creating the EventsOperations?

umerkhan-apple commented 7 years ago

@sgollahallichowda If you look at the Insights Builder inside the OCKSample app as @ninoguba suggested, you should be able to find sample code that address your issue.