Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
coderZsq committed Sep 29, 2019
1 parent db36c62 commit 572634e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions SQManagement/SQManagement/Tools/SQAuthorizationTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,20 @@ + (void)fetchContacts:(void (^)(NSArray * _Nonnull))callback{
[postalAddresses addObject:[NSString stringWithFormat:@"%@: 国家: %@, 省: %@, 城市: %@, 街道: %@, 邮编: %@", label, country, state, city, street, code]];
}
obj.postalAddresses = postalAddresses;
obj.dates = contact.dates;
obj.urlAddresses = contact.urlAddresses;
obj.contactRelations = contact.contactRelations;
obj.socialProfiles = contact.socialProfiles;
obj.instantMessageAddresses = contact.instantMessageAddresses;
NSMutableArray *dates = @[].mutableCopy;
for (CNLabeledValue *date in contact.dates) {
NSString *label = [CNLabeledValue localizedStringForLabel:date.label];
id dateComponents = date.value;
NSDate *value = [[NSCalendar currentCalendar] dateFromComponents:dateComponents];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"yyyy年MM月dd日 HH:mm:ss";
[dates addObject:[NSString stringWithFormat:@"%@: %@", label, [dateFormatter stringFromDate:value]]];
}
obj.dates = dates;
// obj.urlAddresses = contact.urlAddresses;
// obj.contactRelations = contact.contactRelations;
// obj.socialProfiles = contact.socialProfiles;
// obj.instantMessageAddresses = contact.instantMessageAddresses;
[array addObject:obj];
}];
if (callback) {
Expand Down

0 comments on commit 572634e

Please sign in to comment.