{"action":"created","comment":{"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments/55383489","id":55383489,"diff_hunk":"@@ -24,9 +24,28 @@\n \n #import \"UIItems.h\"\n #import \"WTRColor.h\"\n+#import \"NSString+FontAwesome.h\"\n+#import <CoreText/CTFontManager.h>\n \n @implementation UIItems\n \n++ (void)dinamycallyAddFont {\n+    NSString *fontPath = [[NSBundle bundleForClass:[UIItems class]] pathForResource:@\"fontawesome-webfont\" ofType:@\"ttf\"];\n+    NSData *fontData = [NSData dataWithContentsOfFile:fontPath];\n+    \n+    CFErrorRef error;\n+    CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef) fontData);\n+    CGFontRef font = CGFontCreateWithDataProvider(provider);\n+    if (!CTFontManagerRegisterGraphicsFont(font, &error)) {\n+        if (CFErrorGetCode(error) == kCTFontManagerErrorAlreadyRegistered) return;\n+        CFStringRef errorDescription = CFErrorCopyDescription(error);\n+        NSLog(@\"WootricSDK: Failed to load font: %@\", errorDescription);\n+        CFRelease(errorDescription);\n+    }\n+    CFRelease(font);\n+    CFRelease(provider);\n+}","path":"WootricSDK/WootricSDK/UIItems.m","position":24,"original_position":24,"commit_id":"2bef552d9a5257a4f5af285a9b4e282125eff558","original_commit_id":"2bef552d9a5257a4f5af285a9b4e282125eff558","user":{"login":"diegoserranoa","id":1431421,"avatar_url":"https://avatars.githubusercontent.com/u/1431421?v=3","gravatar_id":"","url":"https://api.github.com/users/diegoserranoa","html_url":"https://github.com/diegoserranoa","followers_url":"https://api.github.com/users/diegoserranoa/followers","following_url":"https://api.github.com/users/diegoserranoa/following{/other_user}","gists_url":"https://api.github.com/users/diegoserranoa/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoserranoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoserranoa/subscriptions","organizations_url":"https://api.github.com/users/diegoserranoa/orgs","repos_url":"https://api.github.com/users/diegoserranoa/repos","events_url":"https://api.github.com/users/diegoserranoa/events{/privacy}","received_events_url":"https://api.github.com/users/diegoserranoa/received_events","type":"User","site_admin":false},"body":"Correct, is for memory management. I'm responsible of releasing both objects for their memory to be deallocated and then the object destroyed.","created_at":"2016-03-08T16:21:51Z","updated_at":"2016-03-08T16:21:51Z","html_url":"https://github.com/Wootric/WootricSDK-iOS/pull/6#discussion_r55383489","pull_request_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments/55383489"},"html":{"href":"https://github.com/Wootric/WootricSDK-iOS/pull/6#discussion_r55383489"},"pull_request":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6","id":62030143,"html_url":"https://github.com/Wootric/WootricSDK-iOS/pull/6","diff_url":"https://github.com/Wootric/WootricSDK-iOS/pull/6.diff","patch_url":"https://github.com/Wootric/WootricSDK-iOS/pull/6.patch","issue_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/6","number":6,"state":"open","locked":false,"title":"Social buttons","user":{"login":"diegoserranoa","id":1431421,"avatar_url":"https://avatars.githubusercontent.com/u/1431421?v=3","gravatar_id":"","url":"https://api.github.com/users/diegoserranoa","html_url":"https://github.com/diegoserranoa","followers_url":"https://api.github.com/users/diegoserranoa/followers","following_url":"https://api.github.com/users/diegoserranoa/following{/other_user}","gists_url":"https://api.github.com/users/diegoserranoa/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoserranoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoserranoa/subscriptions","organizations_url":"https://api.github.com/users/diegoserranoa/orgs","repos_url":"https://api.github.com/users/diegoserranoa/repos","events_url":"https://api.github.com/users/diegoserranoa/events{/privacy}","received_events_url":"https://api.github.com/users/diegoserranoa/received_events","type":"User","site_admin":false},"body":"Fixed Facebook and Twitter button that weren't showing the images. Changed images for font icons.","created_at":"2016-03-08T06:25:22Z","updated_at":"2016-03-08T16:21:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e79567df31f3d31ac916bc947702ea0bed076e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/6/comments","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/2bef552d9a5257a4f5af285a9b4e282125eff558","head":{"label":"Wootric:social-buttons","ref":"social-buttons","sha":"2bef552d9a5257a4f5af285a9b4e282125eff558","user":{"login":"Wootric","id":5396837,"avatar_url":"https://avatars.githubusercontent.com/u/5396837?v=3","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"repo":{"id":32400982,"name":"WootricSDK-iOS","full_name":"Wootric/WootricSDK-iOS","owner":{"login":"Wootric","id":5396837,"avatar_url":"https://avatars.githubusercontent.com/u/5396837?v=3","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wootric/WootricSDK-iOS","description":"iOS SDK survey","fork":false,"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS","forks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/forks","keys_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/teams","hooks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/events","assignees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/tags","blobs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscription","commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/merges","archive_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/downloads","issues_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/deployments","created_at":"2015-03-17T15:12:30Z","updated_at":"2016-03-02T17:51:07Z","pushed_at":"2016-03-08T06:34:22Z","git_url":"git://github.com/Wootric/WootricSDK-iOS.git","ssh_url":"git@github.com:Wootric/WootricSDK-iOS.git","clone_url":"https://github.com/Wootric/WootricSDK-iOS.git","svn_url":"https://github.com/Wootric/WootricSDK-iOS","homepage":null,"size":994,"stargazers_count":2,"watchers_count":2,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"Wootric:master","ref":"master","sha":"f77719bf84bc99a37591522983d30831b7d860ae","user":{"login":"Wootric","id":5396837,"avatar_url":"https://avatars.githubusercontent.com/u/5396837?v=3","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"repo":{"id":32400982,"name":"WootricSDK-iOS","full_name":"Wootric/WootricSDK-iOS","owner":{"login":"Wootric","id":5396837,"avatar_url":"https://avatars.githubusercontent.com/u/5396837?v=3","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wootric/WootricSDK-iOS","description":"iOS SDK survey","fork":false,"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS","forks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/forks","keys_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/teams","hooks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/events","assignees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/tags","blobs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscription","commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/merges","archive_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/downloads","issues_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/deployments","created_at":"2015-03-17T15:12:30Z","updated_at":"2016-03-02T17:51:07Z","pushed_at":"2016-03-08T06:34:22Z","git_url":"git://github.com/Wootric/WootricSDK-iOS.git","ssh_url":"git@github.com:Wootric/WootricSDK-iOS.git","clone_url":"https://github.com/Wootric/WootricSDK-iOS.git","svn_url":"https://github.com/Wootric/WootricSDK-iOS","homepage":null,"size":994,"stargazers_count":2,"watchers_count":2,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6"},"html":{"href":"https://github.com/Wootric/WootricSDK-iOS/pull/6"},"issue":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/6"},"comments":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/2bef552d9a5257a4f5af285a9b4e282125eff558"}}}}