Skip to content

Commit

Permalink
Merge pull request #150 from dduan/fix_social_crash
Browse files Browse the repository at this point in the history
Fix recently introduced social profile crash
  • Loading branch information
belkevich authored Jan 10, 2017
2 parents c6bc63d + e46c7ef commit 84494f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Pod/Core/Private/Extractors/APContactDataExtractor.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ - (NSArray *)socialProfiles
NSString *socialService = dictionary[(__bridge NSString *)kABPersonSocialProfileServiceKey];
profile.socialNetwork = [APSocialServiceHelper socialNetworkTypeWithString:socialService];
NSString *urlString = dictionary[(__bridge NSString *)kABPersonSocialProfileURLKey];
profile.url = [[NSURL alloc] initWithString:urlString];
if (urlString)
{
profile.url = [[NSURL alloc] initWithString:urlString];
}
profile.username = dictionary[(__bridge NSString *)kABPersonSocialProfileUsernameKey];
profile.userIdentifier = dictionary[(__bridge NSString *)kABPersonSocialProfileUserIdentifierKey];
[profiles addObject:profile];
Expand Down

0 comments on commit 84494f4

Please sign in to comment.