{"action":"created","comment":{"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments/26726212","id":26726212,"diff_hunk":"@@ -515,22 +516,41 @@ - (void)resumeSyncUpOneEntry:(SFSyncState*)sync\n     };\n     \n     // Create handler\n-    SFSyncServerTargetCompleteBlock completeBlockCreate = ^(NSDictionary *d) {\n+    SFSyncUpTargetCompleteBlock completeBlockCreate = ^(NSDictionary *d) {\n         // Replace id with server id during create\n         record[kId] = d[kSyncManagerLObjectId];\n         completeBlockUpdate(d);\n     };\n     \n-    SFSyncServerTargetCompleteBlock completeBlock;\n+    \n+    SFSyncUpTarget *target = (SFSyncUpTarget*) sync.target;\n+    NSArray *fieldList = sync.options.fieldlist;\n+    \n+    // Getting type and id\n+    NSString* objectType = [SFJsonUtils projectIntoJson:record path:kObjectTypeField];\n+    NSString* objectId = record[kId];\n+    \n+    // Fields to save (in the case of create or update)\n+    NSMutableDictionary* fields = [NSMutableDictionary dictionary];","path":"libs/SmartSync/SmartSync/Classes/Manager/SFSmartSyncSyncManager.m","position":246,"original_position":246,"commit_id":"c51aac1ffcf8c6b8b28cff4f913157c889d49f02","original_commit_id":"c51aac1ffcf8c6b8b28cff4f913157c889d49f02","user":{"login":"khawkins","id":755462,"avatar_url":"https://avatars.githubusercontent.com/u/755462?v=3","gravatar_id":"","url":"https://api.github.com/users/khawkins","html_url":"https://github.com/khawkins","followers_url":"https://api.github.com/users/khawkins/followers","following_url":"https://api.github.com/users/khawkins/following{/other_user}","gists_url":"https://api.github.com/users/khawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/khawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khawkins/subscriptions","organizations_url":"https://api.github.com/users/khawkins/orgs","repos_url":"https://api.github.com/users/khawkins/repos","events_url":"https://api.github.com/users/khawkins/events{/privacy}","received_events_url":"https://api.github.com/users/khawkins/received_events","type":"User","site_admin":false},"body":"The decision to move this into the sync up target was deliberate, to take the decision making about the shape of the data out of the hands of the sync server.  What's the impetus for the decision to move it back?","created_at":"2015-03-19T02:41:34Z","updated_at":"2015-03-19T02:41:34Z","html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963#discussion_r26726212","pull_request_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963","_links":{"self":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments/26726212"},"html":{"href":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963#discussion_r26726212"},"pull_request":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963"}}},"pull_request":{"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963","id":31481359,"html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963","diff_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963.diff","patch_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963.patch","issue_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/963","number":963,"state":"open","locked":false,"title":"Aligning sync up target between Android and iOS","user":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars.githubusercontent.com/u/1012459?v=3","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"body":"- Renamed SFSyncTarget as SFSyncDownTarget\r\n- Renamed SFSyncServerTarget as SFSyncUpTarget\r\n- Changed methods exposed by SFSyncUpTarget to be more like Android's\r\n- Added method to SFSyncUpTarget to actually specify targeted records for the sync up\r\n\r\n- Native and hybrid tests passing\r\n- Sample apps (native and hybrid) running","created_at":"2015-03-18T23:03:44Z","updated_at":"2015-03-19T02:41:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1123cdd9f2f7e347da652f1a85ad91821e9079ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963/commits","review_comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963/comments","review_comment_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/963/comments","statuses_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/c51aac1ffcf8c6b8b28cff4f913157c889d49f02","head":{"label":"wmathurin:unstable","ref":"unstable","sha":"c51aac1ffcf8c6b8b28cff4f913157c889d49f02","user":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars.githubusercontent.com/u/1012459?v=3","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"repo":{"id":5184198,"name":"SalesforceMobileSDK-iOS","full_name":"wmathurin/SalesforceMobileSDK-iOS","owner":{"login":"wmathurin","id":1012459,"avatar_url":"https://avatars.githubusercontent.com/u/1012459?v=3","gravatar_id":"","url":"https://api.github.com/users/wmathurin","html_url":"https://github.com/wmathurin","followers_url":"https://api.github.com/users/wmathurin/followers","following_url":"https://api.github.com/users/wmathurin/following{/other_user}","gists_url":"https://api.github.com/users/wmathurin/gists{/gist_id}","starred_url":"https://api.github.com/users/wmathurin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmathurin/subscriptions","organizations_url":"https://api.github.com/users/wmathurin/orgs","repos_url":"https://api.github.com/users/wmathurin/repos","events_url":"https://api.github.com/users/wmathurin/events{/privacy}","received_events_url":"https://api.github.com/users/wmathurin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS","description":"Force.com mobile SDK for iOS applications","fork":true,"url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS","forks_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/forks","keys_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/teams","hooks_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/events","assignees_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/tags","blobs_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/subscription","commits_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/merges","archive_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/downloads","issues_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wmathurin/SalesforceMobileSDK-iOS/releases{/id}","created_at":"2012-07-25T20:31:23Z","updated_at":"2015-03-17T17:43:13Z","pushed_at":"2015-03-19T00:38:19Z","git_url":"git://github.com/wmathurin/SalesforceMobileSDK-iOS.git","ssh_url":"git@github.com:wmathurin/SalesforceMobileSDK-iOS.git","clone_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS.git","svn_url":"https://github.com/wmathurin/SalesforceMobileSDK-iOS","homepage":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","size":241884,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"forcedotcom:unstable","ref":"unstable","sha":"958326756097dcd9f7451651dcca2cdcb839f1bd","user":{"login":"forcedotcom","id":464563,"avatar_url":"https://avatars.githubusercontent.com/u/464563?v=3","gravatar_id":"","url":"https://api.github.com/users/forcedotcom","html_url":"https://github.com/forcedotcom","followers_url":"https://api.github.com/users/forcedotcom/followers","following_url":"https://api.github.com/users/forcedotcom/following{/other_user}","gists_url":"https://api.github.com/users/forcedotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/forcedotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forcedotcom/subscriptions","organizations_url":"https://api.github.com/users/forcedotcom/orgs","repos_url":"https://api.github.com/users/forcedotcom/repos","events_url":"https://api.github.com/users/forcedotcom/events{/privacy}","received_events_url":"https://api.github.com/users/forcedotcom/received_events","type":"Organization","site_admin":false},"repo":{"id":2338086,"name":"SalesforceMobileSDK-iOS","full_name":"forcedotcom/SalesforceMobileSDK-iOS","owner":{"login":"forcedotcom","id":464563,"avatar_url":"https://avatars.githubusercontent.com/u/464563?v=3","gravatar_id":"","url":"https://api.github.com/users/forcedotcom","html_url":"https://github.com/forcedotcom","followers_url":"https://api.github.com/users/forcedotcom/followers","following_url":"https://api.github.com/users/forcedotcom/following{/other_user}","gists_url":"https://api.github.com/users/forcedotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/forcedotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forcedotcom/subscriptions","organizations_url":"https://api.github.com/users/forcedotcom/orgs","repos_url":"https://api.github.com/users/forcedotcom/repos","events_url":"https://api.github.com/users/forcedotcom/events{/privacy}","received_events_url":"https://api.github.com/users/forcedotcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","description":"Force.com mobile SDK for iOS applications","fork":false,"url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS","forks_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/forks","keys_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/teams","hooks_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/events","assignees_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/tags","blobs_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/subscription","commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/merges","archive_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/downloads","issues_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/releases{/id}","created_at":"2011-09-06T23:13:57Z","updated_at":"2015-03-17T18:00:25Z","pushed_at":"2015-03-17T19:44:48Z","git_url":"git://github.com/forcedotcom/SalesforceMobileSDK-iOS.git","ssh_url":"git@github.com:forcedotcom/SalesforceMobileSDK-iOS.git","clone_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS.git","svn_url":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","homepage":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS","size":258958,"stargazers_count":266,"watchers_count":266,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":182,"mirror_url":null,"open_issues_count":17,"forks":182,"open_issues":17,"watchers":266,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963"},"html":{"href":"https://github.com/forcedotcom/SalesforceMobileSDK-iOS/pull/963"},"issue":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/963"},"comments":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/issues/963/comments"},"review_comments":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963/comments"},"review_comment":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/pulls/963/commits"},"statuses":{"href":"https://api.github.com/repos/forcedotcom/SalesforceMobileSDK-iOS/statuses/c51aac1ffcf8c6b8b28cff4f913157c889d49f02"}}}}