Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Changed 3 __bridge casts to __bridge_transfer. Added "’s" to stringsToStrip. #7

Merged
merged 1 commit into from Aug 1, 2012
Jump to file or symbol
Failed to load files and symbols.
+5 −4
Split
@@ -44,7 +44,8 @@ - (id)initWithDevice:(UIDevice *)aDevice {
self.device = aDevice;
NSMutableString *deviceName = [NSMutableString stringWithString:self.device.name];
- NSArray *stringsToStrip = [NSArray arrayWithObjects:@"'s",
+ NSArray *stringsToStrip = [NSArray arrayWithObjects:@"’s",
+ @"'s",
@"ipad",
@"iphone",
@"ipod touch", nil];
@@ -79,15 +80,15 @@ - (id)initWithDevice:(UIDevice *)aDevice {
- (void)populateFromAddressBook {
ABAddressBookRef addressBook = ABAddressBookCreate();
- NSArray *people = (__bridge NSArray *)ABAddressBookCopyPeopleWithName(addressBook, (__bridge CFStringRef)self.fullName);
+ NSArray *people = (__bridge_transfer NSArray *)ABAddressBookCopyPeopleWithName(addressBook, (__bridge CFStringRef)self.fullName);
self.hasAddressBookMatch = ([people count] > 0);
if (self.hasAddressBookMatch) {
ABRecordRef owner = (__bridge ABRecordRef)[people objectAtIndex:0];
// Email
ABMultiValueRef emailMultiValue = ABRecordCopyValue(owner, kABPersonEmailProperty);
- NSArray *emails = (__bridge NSArray *)ABMultiValueCopyArrayOfAllValues(emailMultiValue);
+ NSArray *emails = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(emailMultiValue);
if ([emails count] > 0) {
self.email = (NSString *)[emails objectAtIndex:0];
@@ -97,7 +98,7 @@ - (void)populateFromAddressBook {
// Phone
ABMultiValueRef phoneMultiValue = ABRecordCopyValue(owner, kABPersonPhoneProperty);
- NSArray *phones = (__bridge NSArray *)ABMultiValueCopyArrayOfAllValues(phoneMultiValue);
+ NSArray *phones = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(phoneMultiValue);
if ([phones count] > 0) {
self.phone = (NSString *)[phones objectAtIndex:0];