{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/comments/50946227","id":50946227,"diff_hunk":"@@ -7,12 +7,13 @@\n \n #import \"LBModel.h\"\n \n+\n+/**\n+ * Blocks of this type are executed for a successful method invocation that returns\n+ * an LBPersistedModel instance as a callback argument.\n+ */\n @class LBPersistedModel;\n typedef void (^LBPersistedModelObjectSuccessBlock)(LBPersistedModel *model);\n-typedef void (^LBPersistedModelArraySuccessBlock)(NSArray *array);\n-typedef void (^LBPersistedModelVoidSuccessBlock)();\n-typedef void (^LBPersistedModelBoolSuccessBlock)(BOOL boolean);\n-typedef void (^LBPersistedModelNumberSuccessBlock)(NSInteger number);","path":"LoopBack/LBPersistedModel.h","position":14,"original_position":14,"commit_id":"80d99d32eeef4d59dba6d2a25fe6090b8bf99360","original_commit_id":"e69244451a17e39a6b643b56dffc9638ef062fe6","user":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"body":"I didn't care about backward compatibility for those since those typedefs are added by me on Oct. 29 as a part of CodeGen support.  It seems highly unlikely that someone already depends on the typedefs.  How about make the above change and consider backward compatibility when we get any Issue on it?","created_at":"2016-01-27T06:34:24Z","updated_at":"2016-01-27T06:34:24Z","html_url":"https://github.com/strongloop/loopback-sdk-ios/pull/83#discussion_r50946227","pull_request_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/comments/50946227"},"html":{"href":"https://github.com/strongloop/loopback-sdk-ios/pull/83#discussion_r50946227"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83","id":53376064,"html_url":"https://github.com/strongloop/loopback-sdk-ios/pull/83","diff_url":"https://github.com/strongloop/loopback-sdk-ios/pull/83.diff","patch_url":"https://github.com/strongloop/loopback-sdk-ios/pull/83.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/83","number":83,"state":"open","locked":false,"title":"Add support for Buffer and GeoPoint data types","user":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"body":"This fixes Issue https://github.com/strongloop/loopback-sdk-ios/issues/60\r\n\r\n`Buffer` is mapped to either of `NSData` or `NSMutableData` (reflecting a specified property definition in a subclass of `LBPersistedModel`).\r\n\r\n`GeoPoint` is mapped to `CLLocation`.  Initially I thought to introduce a new class like `LBGeoPoint` (a straight translation of LoopBack `GeoPoint` class) but took a simpler approach as the reference of `-[CLLocation initWithLatitude:longitude:]` says \"typically, you acquire location objects from the location service, but you can use this method to create new location objects for other uses in your application.\"  A downside of this approach is a possible confusion when a user tried to store and retrieve a `CLLocation` object, as `GeoPoint` stores latitude and longitude only whereas `CLLocation` has other properties including altitude, accuracies, timestamp, etc.  However, I thought that the benefit of reusing `CLLocation` (simplicity in usage) would be greater.  BTW, `CLLocationCoordinate2D` struct was also considered for mapping, but complications in its use were found it as it is not a class.\r\n\r\nThis PR also includes the following changes:\r\n- Fix a race condition found in -[LBModel initWithRepository:...].\r\n- Add typedef LBPersistedModelDictionarySuccessBlock which is needed by CodeGen.\r\n- Fix indentations/format of LBPersistedModelTests.m for readability.\r\n\r\n@bajtos would you please review the changes?","created_at":"2015-12-11T10:28:47Z","updated_at":"2016-01-27T06:34:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3eca18e8355572fc261b9a5309379def6f15f8dc","assignee":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/83/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/statuses/80d99d32eeef4d59dba6d2a25fe6090b8bf99360","head":{"label":"hideya:feature/datatypes","ref":"feature/datatypes","sha":"80d99d32eeef4d59dba6d2a25fe6090b8bf99360","user":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"repo":{"id":30176812,"name":"loopback-sdk-ios","full_name":"hideya/loopback-sdk-ios","owner":{"login":"hideya","id":321713,"avatar_url":"https://avatars.githubusercontent.com/u/321713?v=3","gravatar_id":"","url":"https://api.github.com/users/hideya","html_url":"https://github.com/hideya","followers_url":"https://api.github.com/users/hideya/followers","following_url":"https://api.github.com/users/hideya/following{/other_user}","gists_url":"https://api.github.com/users/hideya/gists{/gist_id}","starred_url":"https://api.github.com/users/hideya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideya/subscriptions","organizations_url":"https://api.github.com/users/hideya/orgs","repos_url":"https://api.github.com/users/hideya/repos","events_url":"https://api.github.com/users/hideya/events{/privacy}","received_events_url":"https://api.github.com/users/hideya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hideya/loopback-sdk-ios","description":"iOS Client SDK for the LoopBack framework.","fork":true,"url":"https://api.github.com/repos/hideya/loopback-sdk-ios","forks_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/forks","keys_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/teams","hooks_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/hooks","issue_events_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/issues/events{/number}","events_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/events","assignees_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/assignees{/user}","branches_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/branches{/branch}","tags_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/tags","blobs_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/languages","stargazers_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/stargazers","contributors_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/contributors","subscribers_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/subscribers","subscription_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/subscription","commits_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/contents/{+path}","compare_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/merges","archive_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/downloads","issues_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/issues{/number}","pulls_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/labels{/name}","releases_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/releases{/id}","deployments_url":"https://api.github.com/repos/hideya/loopback-sdk-ios/deployments","created_at":"2015-02-02T07:53:53Z","updated_at":"2015-04-10T06:19:25Z","pushed_at":"2016-01-20T11:27:12Z","git_url":"git://github.com/hideya/loopback-sdk-ios.git","ssh_url":"git@github.com:hideya/loopback-sdk-ios.git","clone_url":"https://github.com/hideya/loopback-sdk-ios.git","svn_url":"https://github.com/hideya/loopback-sdk-ios","homepage":"","size":3311,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"9167c7131fd780b650c47e1c857c7269d461e69d","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":15151788,"name":"loopback-sdk-ios","full_name":"strongloop/loopback-sdk-ios","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-sdk-ios","description":"iOS Client SDK for the LoopBack framework.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-sdk-ios","forks_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback-sdk-ios/deployments","created_at":"2013-12-13T01:08:15Z","updated_at":"2016-01-26T02:28:05Z","pushed_at":"2016-01-27T06:18:31Z","git_url":"git://github.com/strongloop/loopback-sdk-ios.git","ssh_url":"git@github.com:strongloop/loopback-sdk-ios.git","clone_url":"https://github.com/strongloop/loopback-sdk-ios.git","svn_url":"https://github.com/strongloop/loopback-sdk-ios","homepage":"","size":3335,"stargazers_count":53,"watchers_count":53,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":22,"forks":28,"open_issues":22,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83"},"html":{"href":"https://github.com/strongloop/loopback-sdk-ios/pull/83"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/83"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-sdk-ios/statuses/80d99d32eeef4d59dba6d2a25fe6090b8bf99360"}}}}