cpmpercussion/microjam

Performances need to be given an 'id' property and this should be used to reference replies

Closed this issue · 5 comments

Performances need to be given an 'id' property and this should be used to reference replies

I've added a performerId property to ChirpPerformance which will store the performance's own id as a CKRecordID Object. I'm not sure how the CKReference system works, but will look a bit further at this later.

ChirpPerformances can now record their creators ID, but replyTo is still a string (although it's actually the same as the replied-to performance's ID). Further work necessary, so kicking to RC2.

ChirpPerformances can now record their creators ID, but replyTo is still a string (although it's actually the same as the replied-to performance's ID). Further work necessary, so kicking to RC2.

Just have to follow this pattern to convert between text titles and CKRecordIDs

func getPerformance(fortitle title: String) -> ChirpPerformance? {
    let recID = CKRecordID(recordName: title)
    return(getPerformance(forID: recID))
}

Performances do have a CKRecordID (same as title). At present, the replyTo is this as a string. There is a replyParentID which should be used in future to store the CKRecordID of the parent. Closing for now, could reopen if there is specific functionality blocked by current plan.