Search Results

Search found 113 results on 5 pages for 'addressbook'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Adding contact to iPhone addressbook?

    - by chaitanya
    Hi, In my application I need to implement the address book which should contains the native addressbook details, and the user should be able to add and delete from the address book and it should be updated in the native iphone addressbook. I read somewhere that the iphone native address book database is accesible. In documentation also I saw that addContact and Delete API's are exposed to addressbook. Can anyone please tell me how can I access the native AddressBook of the iphone, and.. how to add and delete contacts from the address book? Can anyone post the sample code for this?

    Read the article

  • How to save image to iphone's AddressBook using SDK API ?

    - by apple.dev
    My purpose is to process one image from image library, and save this image directly to one person record (i,e, "Tom" ), which is selected from AddressBook, I can see the new image replace Tom's previous image, but I can not save it to AddressBook. I implemented delegate ABPeoplePickerNavigationControllerDelegate, and using following logics, but whatever I tried, modified records can not be saved to address books. Any clues or suggest ? Thanks ABAddressBookRef addressBook= ABAddressBookCreate(); CFErrorRef error = NULL; BOOL wantToSaveChanges = YES; ABRecordSetValue(person, kABPersonFirstNameProperty, @"Shi", &error);//, &error) NSData * dataRef = UIImagePNGRepresentation(cellImage); ABPersonSetImageData(person, dataRef, &error); if (ABAddressBookHasUnsavedChanges(addressBook)) {\ NSLog(@"need to save "); if (wantToSaveChanges) { ABAddressBookSave(addressBook, &error); } else { ABAddressBookRevert(addressBook); } }else { NSLog(@"no changes"); } if (error != NULL) {/*... Handle error. ...*/ NSLog(@"error happened here " ); } CFRelease(addressBook);

    Read the article

  • iPhone: Accessing Composite Name in AddressBook Causes EXC_BAD_ACCESS

    - by Fyrian
    Hi everyone. I'm new to iPhone development and have a question I hope someone can help me with. I have a programmer working on an iPhone app for me and when I run the app in the simulator, it works great. But when I try to run it on my actual iPhone, I get a EXC_BAD_ACCESS error and the app locks up. Looking at the debugger, it's referencing the following code in my MainController as the problem: -(void)loadAddressBook{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; addressBookLoaded=1; [AddressbookRecord readAllContactTable:[self getDBPath]]; ABAddressBookRef addressBook = ABAddressBookCreate(); for(NSUInteger i=1;i<=ABAddressBookGetPersonCount(addressBook);i++) { ABRecordRef myPerson =ABAddressBookGetPersonWithRecordID (addressBook,(ABRecordID)(i)); NSString *name = (NSString*)ABRecordCopyCompositeName(myPerson); //save in database AddressbookRecord *addObj = [[AddressbookRecord alloc] initWithPrimaryKey:0]; addObj.ClientName=name; [addObj addNewContactEntry]; } addressBookLoaded=2; [pool release]; } More specifically, it points to this specific line as the problem: NSString *name =(NSString*)ABRecordCopyCompositeName(myPerson); My programmer can't seem to figure out what the problem is since he can't replicate it on his end. Does anyone have any ideas what would cause this problem??? Thanks!

    Read the article

  • Generate vCard from AddressBook.framework

    - by Oliver
    I'm utilising the AddressBook.framework in my iPhone app, and I'd like to replicate something along the lines of the share feature in Contacts.app. This basically attach's a specific contacts vCard to an email. As far as I know, there is nothing in the documentation that mentions generating a vCard. Is this a case of generating one myself? Or is there something available that can help me?

    Read the article

  • Sync Services With AddressBook

    - by Marcus
    Hi, I've developed an application to sync the Mac address book with another application. I was using an NSNotification (kABDatabaseChangedExternallyNotification) which are sent every time the address book is edited to do the syncing. However I found that if I 'overloaded' the address book (by adding 20 records really quickly or something) I didn't get all of the notifications. I have since found the Sync Services framework which seems to be aimed at my kind of application and it seems to work fine. The problem is that the changes are not 'pushed' to me in the same was as an NSNotification - I have to sync every 5 minutes or so. And, from what I can understand, I shouldn't use the AddressBook API directly but push changes back through sync services. This means that changes are not instant but lagged by how often address book/my app syncs. Is there any way to make it instant? or to use the NSNotifications reliably? Thanks for your time, Marc

    Read the article

  • Accessing native iPhone addressbook database and performing add and delete contacts?

    - by chaitanya
    Hi, In my application I need to implement the address book which should contains the native addressbook details, and the user should be able to add and delete from the address book and it should be updated in the native iphone addressbook. I read somewhere that the iphone native address book database is accesible. In documentation also I saw that addContact and Delete API's are exposed to addressbook. Can anyone please tell me how can I access the native AddressBook of the iphone, and.. how to add and delete contacts from the address book? Can anyone post the sample code for this?

    Read the article

  • Create ABPerson Records in a Shared CardDAV (10.6/Server Hosted) AddressBook

    - by Woodster
    Hello, My app presently reads and writes to the local Mac OS X 10.6 client addressbook using the AddressBook.framework. It works fine. 10.6 Server introduced AddressBook Server, which 10.6 clients can connect to by setting up a CardDAV Account. User and Group records can be stored in that account, which is synchronized to the 10.6 server and made available to other clients who access the same CardDAV account. Mail.app is able to autocomplete the email addresses from accounts that are in the local datastore as well as the remote CardDAV datastore. ABPeoplePicker can see both. But, programatically, I'm not getting any CardDAV-based data returned from my queries against the shared AddressBook. I'm not sure if I need to ask it for a different AddressBook, or if I need to modify my fetch-request to indicate that I want it to be able to use the shared data too. My goal is to adapt the current code so that it can read/write to the CardDAV account too, instead of just the local addressbook. Thoughts?

    Read the article

  • Can I get a person's display name or composite name from Apple AddressBook on OSX platform?

    - by AlexT
    I have come across ABRecordCopyCompositeName() in these pages but, having Spotlighted it, have a hunch it's only available for the IOS platform. The AddressBook app itself, and ABPeoplePicker obviously do something similar internally, so is there an equivalent API for OSX? It's a tedious thing to retrieve title, first name, middle name, last name, suffix and work out if it's a company before building it yourself.

    Read the article

  • Retrieving and displaying AddressBook in Table view.

    - by Prash.......
    hi, I am developing an application in which i have to retrieve all Addressbook (Name & Phone No) records and Display it in table view, this is my Snippet for retrieving records from addressbook. NSArray *tableGroups; ABAddressBookRef m_addressbook = ABAddressBookCreate(); if (!m_addressbook) { NSLog(@"opening address book"); } CFArrayRef allPeople= ABAddressBookCopyArrayOfAllPeople(m_addressbook); CFIndex nPeople = ABAddressBookGetPersonCount(m_addressbook); NSMutableArray *selectableRows = [NSMutableArray array]; for (int i=0;i < nPeople;i++) { ABRecordRef ref = CFArrayGetValueAtIndex(allPeople,i); ABMutableMultiValueRef phoneMulti = ABRecordCopyValue(ref, kABPersonPhoneProperty); CFStringRef phoneNumber= ABMultiValueCopyValueAtIndex(phoneMulti, i); NSString *contactFirstLast = [NSString stringWithFormat:@"%@,%@", ABRecordCopyValue(ref, kABPersonFirstNameProperty),phoneNumber]; printf("%s\n", [contactFirstLast UTF8String]); [selectableRows addObject:[NSString stringWithFormat:contactFirstLast, i]]; CFRelease(phoneNumber); CFRelease(ref); CFRelease(contactFirstLast); CFRelease(phoneMulti); } tableGroups = [[NSArray alloc] initWithObjects:selectableRows, nil]; I am getting exception as "CFRetain" and apps get crash. Please suggest me proper solution for that..

    Read the article

  • Count total number of Phone Numbers in AddressBook iPhone

    - by AWright4911
    I am trying to get the total count for the phone numbers listed in the AddressBook, in all groups as a whole. I can successfully retrieve Person count and Group count, just not the total number of Phone Numbers. ABAddressBookRef m_addressbook = ABAddressBookCreate(); CFIndex nPeople = ABAddressBookGetPersonCount(m_addressbook); CFIndex nGroups = ABAddressBookGetGroupCount(m_addressbook);

    Read the article

  • Error, could not create MachMessagePort for database doctor (com.apple.addressbook.migrationdaemon)

    - by user262998
    I'm working in address book for iphone. it generate address into UILabel. when I'm running the application everything goes well, but after showing about %30 of the addresses and sadenly stopped without any reason! Only in terminal shows: Error, could not create MachMessagePort for database doctor (com.apple.addressbook.migrationdaemon) starting in process migration Please help me!

    Read the article

  • Address Book is returning old values

    - by Marcus Wood
    Hi there, I am having a problem with the AddressBook framework. It all seems to be stemming from ABCopyRecordForUniqueId returning a record with old data. Example: I run up the program below in one terminal window - it shows the current data. I make a change through the address book UI - my program continues to show old data. I run up another instance of the same program in a new terminal window - it shows the updated data. I have tried posting on the omnigroup site with no luck :( so any guidance is really appreciated PS: If you would like to try the code, to get an address book ID you can export a contact as a vCard and open it with a text editor int main (int argc, const char * argv[]) { ABAddressBookRef addressBook = ABGetSharedAddressBook(); while(1) { ABRecordRef addressBookRecord = NULL; addressBookRecord = ABCopyRecordForUniqueId(addressBook, CFSTR("4064D587-0378-4DCF-A6B9-D3702F01C94C:ABPerson")); CFShow(addressBookRecord); CFRelease(addressBookRecord); sleep(1); } return 0; }

    Read the article

  • How to display a person record just after saving his data to iPhone Address Book?

    - by camelCase
    this is my code and it works flawless, where my_value is a string with separator ','. everythign works fin but i'd like to display the person record from the address book after i saved it, so in the function if(isSaved) { // **** code here *** } here the complete function - (void) addToAgenda: (NSString*) my_value{ //NSArray *strings = [my_value componentsSeparatedByString: @","]; NSArray *dati=[[NSArray alloc] initWithArray:[my_value componentsSeparatedByString:@","]]; NSString *userwebsite = [dati objectAtIndex:0]; NSString *fname = [dati objectAtIndex:1]; NSString *lname = [dati objectAtIndex:2]; NSString *useremail = [dati objectAtIndex:3];; NSString *usermobile = [dati objectAtIndex:4]; NSString *usercompany = @"xxx"; ABRecordRef aRecord = ABPersonCreate(); CFErrorRef anError = NULL; // fisrst name ABRecordSetValue(aRecord, kABPersonFirstNameProperty, fname, &anError); // last name ABRecordSetValue(aRecord, kABPersonLastNameProperty, lname, &anError); // Phone Number. ABMutableMultiValueRef multi = ABMultiValueCreateMutable(kABMultiStringPropertyType); ABMultiValueAddValueAndLabel(multi, (CFStringRef)usermobile, kABWorkLabel, NULL); ABRecordSetValue(aRecord, kABPersonPhoneProperty, multi, &anError); CFRelease(multi); // Company ABRecordSetValue(aRecord, kABPersonDepartmentProperty, usercompany, &anError); // email NSLog(@"%@", useremail); ABMutableMultiValueRef multiemail = ABMultiValueCreateMutable(kABMultiStringPropertyType); ABMultiValueAddValueAndLabel(multiemail, (CFStringRef)useremail, kABWorkLabel, NULL); ABRecordSetValue(aRecord, kABPersonEmailProperty, multiemail, &anError); CFRelease(multiemail); // website NSLog(@"%@", userwebsite); ABMutableMultiValueRef multiweb = ABMultiValueCreateMutable(kABMultiStringPropertyType); ABMultiValueAddValueAndLabel(multiweb, (CFStringRef)userwebsite, kABWorkLabel, NULL); ABRecordSetValue(aRecord, kABPersonURLProperty, multiweb, &anError); CFRelease(multiemail); if (anError != NULL) NSLog(@"error while creating.."); CFStringRef personname, personlname, personcompind, personemail, personwebsite, personcontact; personname = ABRecordCopyValue(aRecord, kABPersonFirstNameProperty); personlname = ABRecordCopyValue(aRecord, kABPersonLastNameProperty); personcompind = ABRecordCopyValue(aRecord, kABPersonDepartmentProperty); personemail = ABRecordCopyValue(aRecord, kABPersonEmailProperty); personwebsite = ABRecordCopyValue(aRecord, kABPersonURLProperty); personcontact = ABRecordCopyValue(aRecord, kABPersonPhoneProperty); ABAddressBookRef addressBook; CFErrorRef error = NULL; addressBook = ABAddressBookCreate(); BOOL isAdded = ABAddressBookAddRecord (addressBook, aRecord, &error); if(isAdded){ NSLog(@"added.."); } if (error != NULL) { NSLog(@"ABAddressBookAddRecord %@", error); } error = NULL; BOOL isSaved = ABAddressBookSave (addressBook, &error); if(isSaved) { // **** code here *** } if (error != NULL) { NSLog(@"ABAddressBookSave %@", error); UIAlertView *alertOnChoose = [[UIAlertView alloc] initWithTitle:@"Unable to save this time" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:@"Ok", nil]; [alertOnChoose show]; [alertOnChoose release]; } CFRelease(aRecord); CFRelease(personname); CFRelease(personlname); CFRelease(personcompind); CFRelease(personcontact); CFRelease(personemail); CFRelease(personwebsite); CFRelease(addressBook); }

    Read the article

  • SQL database problems with addressbook table design

    - by Sebastian Hoitz
    Hello! I am writing a addressbook module for my software right now. I have the database set up so far that it supports a very flexible address-book configuration. I can create n-entries for every type I want. Type means here data like 'email', 'address', 'telephone' etc. I have a table named 'contact_profiles'. This only has two columns: id Primary key date_created DATETIME And then there is a table called contact_attributes. This one is a little more complex: id PK #profile (Foreign key to contact_profiles.id) type VARCHAR describing the type of the entry (name, email, phone, fax, website, ...) I should probably change this to a SET later. value Text (containing the value for the attribute). I can now link to these profiles, for example from my user's table. But from here I run into problems. At the moment I would have to create a JOIN for each value that I want to retrieve. Is there a possibility to somehow create a View, that gives me a result with the type's as columns? So right now I would get something like #profile type value 1 email [email protected] 1 name Sebastian Hoitz 1 website domain.tld But it would be nice to get a result like this: #profile email name website 1 [email protected] Sebastian Hoitz domain.tld The reason I do not want to create the table layout like this initially is, that there might always be things to add and I want to be able to have multiple attributes of the same type. So do you know if there is any possibility to convert this dynamically? If you need a better description please let me know. Thank you!

    Read the article

  • AdressBook Crash, only with some contacts!

    - by Zebs
    My app crashes, it is a problem that arises from the AddressBook API, it only happens with some contacts. Here is the log: Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x00000102, 0x316ebd38 Crashed Thread: 0 Thread 0 Crashed: 0 CoreFoundation 0x00001cfe CFRetain + 90 1 AddressBook 0x00004b2c ABCMultiValueCopyValueAtIndex + 28 2 AddressBook 0x0001066a ABMultiValueCopyValueAtIndex + 2 3 Call Monitor 0x00003824 -[CallAppDelegate peoplePickerNavigationController:shouldContinueAfterSelectingPerson:property:identifier:] (AppDelegate.m:408) 4 AddressBookUI 0x00032cfc -[ABPeoplePickerNavigationController personViewController:shouldPerformDefaultActionForPerson:property:identifier:withMemberCell:] + 152 5 AddressBookUI 0x0003b8ce -[ABPersonViewControllerHelper personTableViewDataSource:selectedPropertyAtIndex:inPropertyGroup:withMemberCell:forEditing:] + 222 6 AddressBookUI 0x0004a17c -[ABPersonTableViewDataSource valueAtIndex:selectedForPropertyGroup:withMemberCell:forEditing:] + 40 7 AddressBookUI 0x00048c00 -[ABPersonTableViewDataSource tableView:didSelectRowAtIndexPath:] + 316 8 UIKit 0x00091f40 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 656 9 UIKit 0x0009db40 -[UITableView _userSelectRowAtIndexPath:] + 124 10 Foundation 0x00086c86 __NSFireDelayedPerform + 362 11 CoreFoundation 0x00071a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8 12 CoreFoundation 0x00073ede __CFRunLoopDoTimer + 854 13 CoreFoundation 0x0007485e __CFRunLoopRun + 1082 14 CoreFoundation 0x0001d8e4 CFRunLoopRunSpecific + 224 15 CoreFoundation 0x0001d7ec CFRunLoopRunInMode + 52 16 GraphicsServices 0x000036e8 GSEventRunModal + 108 17 GraphicsServices 0x00003794 GSEventRun + 56 18 UIKit 0x000062a0 -[UIApplication _run] + 396 19 UIKit 0x00004e10 UIApplicationMain + 664 20 Call Monitor 0x000028e8 main (main.m:14) 21 Call Monitor 0x000028b8 start + 32 This is driving me crazy, as it only happens with an isolated number of contacts. Any help would be greatly appreciated. Here is the code that was requested, thank you very very much for your help: (It is an extract from the method where I think the error happens) The weird thing is that it only happens with certain contacts, and deleting the contact, then creating a new one solves the problem... - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier NSString* firstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); NSString* lastName = (NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty); NSNumber* record = [NSNumber numberWithInt:ABRecordGetRecordID(person)]; if(lastName!=nil){ name=[NSString stringWithFormat:@"%@ %@",firstName,lastName]; } else { name=firstName; } ABMultiValueRef phone = ABRecordCopyValue(person, property); NSString *value =(NSString *)ABMultiValueCopyValueAtIndex(phone, identifier); NSString *label =(NSString *)ABMultiValueCopyLabelAtIndex(phone, identifier); NSMutableArray *tempArray=[[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"MainArray"]]; NSDictionary *stringDictionary = [NSDictionary dictionaryWithObjectsAndKeys:name, kLabelKey, value, kNumberKey,label, kNumberLabelKey,record, kReferenceKey, nil]; [tempArray addObject:stringDictionary]; NSArray *mainArray = [NSArray arrayWithArray:tempArray]; [[NSUserDefaults standardUserDefaults] setObject:mainArray forKey:@"MainArray"];

    Read the article

  • A few questions about a Rails model for a simple addressbook app

    - by user284194
    I have a Rails application that lists information about local services. My objectives for this model are as follows: 1. Require the name and tag_list fields. 2. Require one or more of the tollfreephone, phone, phone2, mobile, fax, email or website fields. 3. If the paddress field has a value, then encode it with the Geokit plugin. Here is my entry.rb model: class Entry < ActiveRecord::Base validates_presence_of :name, :tag_list validates_presence_of :tollfreephone or :phone or :phone2 or :mobile or :fax or :email or :website acts_as_taggable_on :tags acts_as_mappable :auto_geocode=>{:field=>:paddress, :error_message=>'Could not geocode physical address'} before_save :geocode_paddress validate :required_info def required_info unless phone or phone2 or tollfreephone or mobile or fax or email or website errors.add_to_base "Please have at least one form of contact information." end end private def geocode_paddress #if paddress_changed? geo=Geokit::Geocoders::MultiGeocoder.geocode (paddress) errors.add(:paddress, "Could not Geocode address") if ! geo.success self.lat, self.lng = geo.lat,geo.lng if geo.success #end end end Requiring name and tag_list work, but requiring one (or more) of the tollfreephone, phone, phone2, mobile, fax, email or website fields does not. As for encoding with Geokit, in order to save a record with the model I have to enter an address. Which is not the behavior I want. I would like it to not require the paddress field, but if the paddress field does have a value, it should encode the geocode. As it stands, it always tries to geocode the incoming entry. The commented out "if paddress_changed?" was not working and I could not find something like "if paddress_exists?" that would work. Help with any of these issues would be greatly appreciated. I posted three questions pertaining to my model because I'm not sure if they are preventing each other from working. Thank you for reading my questions.

    Read the article

  • Best document format for addressbook in CouchDB

    - by 2x2p1p
    Hi guys. I really tried, tried so hard but i cant understand couchdb :( I must record the contact of several people, should i put every contact in a single document ? codeviewer.org/view/code:df8 Or in different documents ? codeviewer.org/view/code:df9 I confused, can somebody help me ? Thanks.

    Read the article

  • Anyone knows of a good addressbook implementation?

    - by Tsahi Levent-Levi
    I am looking to add an address book to one of my programs. For that purpose, I want to have something that is flexible and customizable to the point of allowing me to hook up additional metadata to contacts in it from third parties. I don't mind paying for a solution as long as I get something that is usable for me. My requirements: Optimized to run on embedded devices Preferably in source code form Ability to add my own fields to contacts over those the address book provides out of the box Ability to plugin "stuff" to it to enhance it without changing its base code too much Has a C or C++ interface

    Read the article

  • Find missing birth days in Apple Addressbook

    - by Felix Ogg
    I am trying to clean the holes out of my Mac address book. As a first step I want to ask all my friends for their birth day, to be able to congratulate them with cheesy Hallmark cards. I need a "group" in my address book, to mailmerge personalized messages from. This is the Applescript I came up with: tell application "Address Book" make new group with properties {name:"No Birthday"} set birthdayPeople to (get every person whose birth date is greater than date "Monday, January 1, 1900 12:00:00 AM") repeat with i from 1 to number of items in people set thePerson to item i of people if not (birthdayPeople contains thePerson) then add thePerson to group "No Birthday" end if end repeat save end tell It breaks, but from the error messages I cannot deduce what is wrong: Result: error "Can’t make «class azf4» id \"05F770BA-7492-436B-9B58-E24F494702F8:ABPerson\" of application \"Address Book\" into type vector." number -1700 from «class azf4» id "05F770BA-7492-436B-9B58-E24F494702F8:ABPerson" to vector (BTW: Did I mention this is my first AppleScript code, EVER? So, if this code can be simplified, or made more elegant, that is welcome too.)

    Read the article

  • Android application not working on 1.5 firmware?

    - by UMMA
    dear friends, i have created a single page application of showing phonebook data in a list. i am using 2.1 sdk in emulator and application works fine. but in my HTC hero firmware is 1.5 when i try to intall same application on HTC hero application is installed successfully but when i click on app icon it gives me force close error even i have set minsdkversion property in manifest file to 3 here is the log Cat [2010-05-17 12:28:18 - AddressBook]Starting activity com.example.AddressBook.AddressBook on device [2010-05-17 12:28:19 - AddressBook]ActivityManager: Can't dispatch DDM chunk 46454154: no handler defined [2010-05-17 12:28:19 - AddressBook]ActivityManager: Can't dispatch DDM chunk 4d505251: no handler defined [2010-05-17 12:28:20 - AddressBook]ActivityManager: Starting: Intent { comp={com.example.AddressBook/com.example.AddressBook.AddressBook} } please help me out whats wrong? any help would be appriciated.

    Read the article

1 2 3 4 5  | Next Page >