Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 09-16-2010, 03:51 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 79
ramdas is on a distinguished road
Default how to add native iphone Contacts screen in our application

hello,

I am trying to connect Native iphone Contacts screen in my application

Can someone point me to some code sample which does this ?


Thanks,
~ramdas
ramdas is offline   Reply With Quote
Old 09-16-2010, 04:31 AM   #2 (permalink)
iPhone Developer
 
d_amal's Avatar
 
Join Date: Nov 2009
Location: chennai, india.
Age: 26
Posts: 60
d_amal is on a distinguished road
Send a message via Yahoo to d_amal Send a message via Skype™ to d_amal
Default

Quote:
Originally Posted by ramdas View Post
hello,

I am trying to connect Native iphone Contacts screen in my application

Can someone point me to some code sample which does this ?


Thanks,
~ramdas
Refer the QuickContacts sample code in apple documentation
d_amal is offline   Reply With Quote
Old 09-17-2010, 01:02 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 79
ramdas is on a distinguished road
Default Errors can't understand

hello d_amal,

I tried QuickContacts example in apple documentation.
I tried to show Contacts screen in a view controller (MyViewController) it is View based application.

1 > I added 2 frameworks AddressBook & AddressBookUI
2 > Add Navigation controller my View Controller
3 > & add both the files that is QuickContactViewController.h & QuickContactViewController.m in my application.

still it shows me 14 errors. show below...

please suggest me .. some solution on this ..
--------------------------
errors -------------------------------
"_ABAddressBookCopyPeopleWithName", referenced from:
-[QuickContactsViewController showPersonViewController] in QuickContactsViewController.
"_kABPersonBirthdayProperty", referenced from:
_kABPersonBirthdayProperty$non_lazy_ptr in QuickContactsViewController.o
(maybe you meant: _kABPersonBirthdayProperty$non_lazy_ptr)
"_ABRecordSetValue", referenced from:
-[QuickContactsViewController showUnknownPersonViewController] in QuickContactsViewController.
"_ABMultiValueCreateMutable", referenced from:
-[QuickContactsViewController showUnknownPersonViewController] in QuickContactsViewController.o
"_ABMultiValueAddValueAndLabel", referenced from:
-[QuickContactsViewController showUnknownPersonViewController] in QuickContactsViewController.o
"_OBJC_CLASS_$_ABNewPersonViewController", referenced from:
objc-class-ref-to-ABNewPersonViewController in QuickContactsViewController.o
"_OBJC_CLASS_$_ABPeoplePickerNavigationController" , referenced from:
objc-class-ref-to-ABPeoplePickerNavigationController in QuickContactsViewController.o
"_kABOtherLabel", referenced from:
_kABOtherLabel$non_lazy_ptr in QuickContactsViewController.o
(maybe you meant: _kABOtherLabel$non_lazy_ptr)
"_ABPersonCreate", referenced from:
-[QuickContactsViewController showUnknownPersonViewController] in QuickContactsViewController.o
"_kABPersonEmailProperty", referenced from:
_kABPersonEmailProperty$non_lazy_ptr in QuickContactsViewController.o
(maybe you meant: _kABPersonEmailProperty$non_lazy_ptr)
"_OBJC_CLASS_$_ABUnknownPersonViewController", referenced from:
objc-class-ref-to-ABUnknownPersonViewController in QuickContactsViewController.o
"_kABPersonPhoneProperty", referenced from:
_kABPersonPhoneProperty$non_lazy_ptr in QuickContactsViewController.o
(maybe you meant: _kABPersonPhoneProperty$non_lazy_ptr)
"_ABAddressBookCreate", referenced from:
-[QuickContactsViewController showPersonViewController] in QuickContactsViewController.o
"_OBJC_CLASS_$_ABPersonViewController", referenced from:
objc-class-ref-to-ABPersonViewController in QuickContactsViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


------------------------------------------------------------------

thanks

~ramdas
ramdas is offline   Reply With Quote
Old 09-17-2010, 01:29 AM   #4 (permalink)
iPhone Developer
 
d_amal's Avatar
 
Join Date: Nov 2009
Location: chennai, india.
Age: 26
Posts: 60
d_amal is on a distinguished road
Send a message via Yahoo to d_amal Send a message via Skype™ to d_amal
Default

Delete the files copied from quick contacts.

Add these two in your view controller.h

Code:
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>
Also add this delegate
Code:
ABPeoplePickerNavigationControllerDelegate
Add this code to your .m file.

Code:
-(IBAction)contact {
	ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
	picker.peoplePickerDelegate = self;
	[self presentModalViewController:picker animated:YES];
	[picker release];
}
Add the below delegates function
Code:
- (BOOL)peoplePickerNavigationController: (ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {
	NSString *fir_name=(NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
}

-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {
	return YES;
}
d_amal is offline   Reply With Quote
Old 09-17-2010, 02:26 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 79
ramdas is on a distinguished road
Default same error

Hello d_amal,

whatever code you give,all the code are exist in my files and i already add
AddressBook & AddressBookUI framework and import same files.

i tried with your code but it can't work. and showing same errors.

any solution on that. ...

thanks
~ramdas
ramdas is offline   Reply With Quote
Old 09-17-2010, 02:48 AM   #6 (permalink)
iPhone Developer
 
d_amal's Avatar
 
Join Date: Nov 2009
Location: chennai, india.
Age: 26
Posts: 60
d_amal is on a distinguished road
Send a message via Yahoo to d_amal Send a message via Skype™ to d_amal
Default

Quote:
Originally Posted by ramdas View Post
Hello d_amal,

whatever code you give,all the code are exist in my files and i already add
AddressBook & AddressBookUI framework and import same files.

i tried with your code but it can't work. and showing same errors.

any solution on that. ...

thanks
~ramdas
I may be wrong. But i think quick contacts will run in iOS above 3.2. What version are you building for your app
d_amal is offline   Reply With Quote
Old 09-17-2010, 02:56 AM   #7 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 79
ramdas is on a distinguished road
Default

version 4.0
ramdas is offline   Reply With Quote
Old 09-17-2010, 04:11 AM   #8 (permalink)
iPhone Developer
 
d_amal's Avatar
 
Join Date: Nov 2009
Location: chennai, india.
Age: 26
Posts: 60
d_amal is on a distinguished road
Send a message via Yahoo to d_amal Send a message via Skype™ to d_amal
Default

Quote:
Originally Posted by ramdas View Post
version 4.0
As far as i know, these errors are due to framework. i.e. the frameworks are not linked properly
d_amal is offline   Reply With Quote
Old 09-17-2010, 09:56 AM   #9 (permalink)
Registered Member
 
Join Date: Sep 2010
Location: Stockholm
Posts: 115
longst is on a distinguished road
Send a message via Skype™ to longst
Default

I tried. Add address book into my application but one problem is when I drop call, it comes to the 'Phone" application. I wonder if there are ways that when I drop call, make the screen back to my application but not the iPhone native "Phone" application Thank you
longst is offline   Reply With Quote
Old 09-17-2010, 10:30 AM   #10 (permalink)
Registered Member
 
Join Date: Sep 2010
Location: Stockholm
Posts: 115
longst is on a distinguished road
Send a message via Skype™ to longst
Default

by the way, it is said that "The application displays four cells labeled "Display Picker," "Create New Contact," "Display and Edit Contact," and "Edit Unknown Contact." Tap "Display Picker" to browse a list of contacts and choose a person from that list. Tap "Create New Contact" to create a new person. Tap "Display and Edit Contact" to display and edit a person. Tap "Edit Unknown Contact" to add data to an existing person or use them to create a new person."

If I understood correctly, if it is saying that I could put four buttons on the view. Thank you
longst is offline   Reply With Quote
Old 01-04-2012, 02:08 PM   #11 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 30
denin is on a distinguished road
Default

I am having the same error.

"_OBJC_CLASS_$_ABPersonViewController", referenced from: objc-class-ref-to-ABPersonViewController in ...

I am trying to have the iphones original contact detail view in my application. However I could not do it. I have tried the methods suggested in this thread but I still get the same error.

Some of you said it is because of the frameworks. Could someone experienced tell how I can do it?

I am also open to other methods to have the same exact view. I have tried to mimic the view by using tables by it just does not look the same.

I waiting for your suggestions please
denin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 375
7 members and 368 guests
husthlj, illogical, LegionMD, LunarMoon, mer10, Murphy, padsoftware
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0