iOS 5 introduces some new properties in the Address Book, for eg : kABPersonSocialProfileProperty.
But it seems that there's something wrong. The app will just crash if i do something like this in iOS 4 :
If i run the code in iOS 4, the code inside the IF block never execute, but the app just crashes in the 2nd NSLog.
If i replace kABPersonSocialProfileProperty with any other property that appears in iOS 4, everything is fine.
So my guess is that the compiler does something wrongly.
Anyone can enlighten me on this ? Thanks.
But it seems that there's something wrong. The app will just crash if i do something like this in iOS 4 :
Code:
ABAddressBookRef addressBook = ABAddressBookCreate();
CGFloat iOSVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if(iOSVersion >= 5.0) {
NSLog(@"We are in iOS 5");
NSLog(@"%d", kABPersonSocialProfileProperty);
}
If i run the code in iOS 4, the code inside the IF block never execute, but the app just crashes in the 2nd NSLog.
If i replace kABPersonSocialProfileProperty with any other property that appears in iOS 4, everything is fine.
So my guess is that the compiler does something wrongly.
Anyone can enlighten me on this ? Thanks.