cocoa touch - Does UIManagedDocument handle conflcts -


does uimanageddocument handle row level conflcts me or need handle those, , answer handle row level conflicts. maybe misunderstood him not seeing this.

so going ask few key questions in hopes of getting clarification here, again uimanageddocument

if have table author having first , last name fields happens if: a) have row author: 'jon do' - has sync'd 2 devices. edit first name on 1 device 'jon' 'john' , edit last name on other device 'do' 'doe'. how icloud , uimanageddocument handle this? sort of notification need respond in order handle conflict? tried following code never notificiation:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(_ondocumentstatechangednotification:) name:uidocumentstatechangednotification object:self.openeddoc]; 

b) if add different author 2 devices there 2 rows merged uimanageddocument handle me or need myself? if need myself need do? tried signing nspersistentstoredidimportubiquitouscontentchangesnotification doesn't ever seem come through me either. context sign against? tried this:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(_onpersistentstoredidimportubiquitouscontentchanges:) name:nspersistentstoredidimportubiquitouscontentchangesnotificationobject:self.openedcaddy.managedobjectcontext.parentcontext]; 

also need handle nsmanagedobjectcontextdidsavenotification myself uimanageddocument or uimanageddocument handle me?

any , appreciated struggling here. adopted icloud , uimanageddocument @ launch of ios 5 , fumbled way though lack of documentaiton managed ship product want icloud work not winner takes approach document sync.

i figured out. uimanageddocument handle row level conflicts.

the reason never saw name:nspersistentstoredidimportubiquitouscontentchangesnotificationobject notifications because not setting moc's persistent store options properly. core data start syncing have set @ minimum following options: nspersistentstoreubiquitouscontentnamekey & nspersistentstoreubiquitouscontenturlkey.

when first started using icloud 2 years ago assumed call setubiquitous:itematurl:destinationurl:error: did me , equivalent it's not. setubiquitous:itematurl:destinationurl:error: tells icloud sync files @ url, nothing core data - think dropbox. core data portion of uimanageddocument sync 2 options need set.

i have started github repo clarifies of , makes getting , running uimanageddocument easier. http://github.com/dtrotzjr/apmanageddocument

hopefully helps else. feel rather dumb not realizing sooner when first implemented icloud sync ios 5 2 years ago documentation sparse , icloud didn't work assumed behavior normal.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -