Search Results

Search found 2 results on 1 pages for 'fyrian'.

Page 1/1 | 1 

  • 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

  • Conditional interface programming for iPad?

    - by Fyrian
    Hi everyone! I'm working on an app for the iPad and am a little over my head with one issue. Is it possible to build an app for iPad that uses a function to control which interface layout is displayed? Something like "if these parameters are met, use XIB file "a" else use XIB file "b". I know that's not in any kind of legitimate format, but you get the idea. If this is possible, does anyone know of any tutorials on how to do it or sample code I could look at? Thanks!

    Read the article

1