Missing Address Book properties
Missing Address Book properties
- Subject: Missing Address Book properties
- From: "David F." <email@hidden>
- Date: Fri, 06 Apr 2012 19:03:31 -0600
My project has two targets, the main app and a test suite. For some reason, my test suite can't see AddressBook properties, but my app can (both are running in the simulator). My first thought was that my test suite wan't linking against the AddressBook.framework, but I double checked and the test suite is linking against the AddressBook.framework.
I feel like this problem has got to be due to how the project/targets are configured--why else wouldn't I be able to see these properties?
The other thing that has me stumped is how these properties are getting defined in the first place. If I cmd-click on a property name, I'm taken to ABPerson.h and I see this:
// Property keys
extern const ABPropertyID kABPersonFirstNameProperty; // First name - kABStringPropertyType
extern const ABPropertyID kABPersonLastNameProperty; // Last name - kABStringPropertyType
extern const ABPropertyID kABPersonMiddleNameProperty; // Middle name - kABStringPropertyType
extern const ABPropertyID kABPersonPrefixProperty; // Prefix ("Sir" "Duke" "General") - kABStringPropertyType
extern const ABPropertyID kABPersonSuffixProperty; // Suffix ("Jr." "Sr." "III") - kABStringPropertyType
extern const ABPropertyID kABPersonNicknameProperty; // Nickname - kABStringPropertyType
But I don't understand how or where the values for these properties are actually being set.
Here is the code I'm using to view the property values:
NSLog(@"kABPersonFirstNameProperty: %d", kABPersonFirstNameProperty);
NSLog(@"kABPersonLastNameProperty: %d", kABPersonLastNameProperty);
NSLog(@"kABPersonMiddleNameProperty: %d", kABPersonMiddleNameProperty);
NSLog(@"kABPersonPrefixProperty: %d", kABPersonPrefixProperty);
NSLog(@"kABPersonSuffixProperty: %d", kABPersonSuffixProperty);
NSLog(@"kABPersonNicknameProperty: %d", kABPersonNicknameProperty);
Here is the output from my app:
2012-04-06 18:46:07.710 MyApp[795:207] kABPersonFirstNameProperty: 0
2012-04-06 18:46:07.712 MyApp[795:207] kABPersonLastNameProperty: 1
2012-04-06 18:46:07.712 MyApp[795:207] kABPersonMiddleNameProperty: 6
2012-04-06 18:46:07.713 MyApp[795:207] kABPersonPrefixProperty: 20
2012-04-06 18:46:07.713 MyApp[795:207] kABPersonSuffixProperty: 21
2012-04-06 18:46:07.714 MyApp[795:207] kABPersonNicknameProperty: 19
Here is the output from the test suite:
2012-04-06 18:46:39.518 UISpecs[835:207] kABPersonFirstNameProperty: 0
2012-04-06 18:46:39.519 UISpecs[835:207] kABPersonLastNameProperty: 0
2012-04-06 18:46:39.520 UISpecs[835:207] kABPersonMiddleNameProperty: 0
2012-04-06 18:46:39.520 UISpecs[835:207] kABPersonPrefixProperty: 0
2012-04-06 18:46:39.521 UISpecs[835:207] kABPersonSuffixProperty: 0
2012-04-06 18:46:39.521 UISpecs[835:207] kABPersonNicknameProperty: 0
Any tips, pointer, help, etc. would be greatly appreciated.
Thanks!
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden