Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 4 commits
  • 1 file changed
  • 0 commit comments
  • 3 contributors
Commits on May 23, 2012
@jeethu jeethu Changed 3 __bridge casts to __bridge_transfer. Added "’s" to stringsT…
…oStrip.
00ccbf9
Commits on Aug 01, 2012
@kmonaghan kmonaghan Handling a ’ apostrophe in device name a337dd2
@jakeboxer Merge pull request #8 from kmonaghan/master
Handling a ’ character in device name
3c499a6
@jakeboxer Merge pull request #7 from jeethu/memleak-fix
Changed 3 __bridge casts to __bridge_transfer. Added "’s" to stringsToStrip.
29cb38b
Showing with 5 additions and 4 deletions.
  1. +5 −4 JBDeviceOwner/JBDeviceOwner.m
View
9 JBDeviceOwner/JBDeviceOwner.m
@@ -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,7 +80,7 @@ - (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) {
@@ -87,7 +88,7 @@ - (void)populateFromAddressBook {
// 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];

No commit comments for this range

Something went wrong with that request. Please try again.