Ich habe Probleme, Telefonnummern aus dem iPhone-Adressbuch zu erhalten.Adressbuch Telefonnummer (+45) Präfix verursacht Absturz!
Es gibt kein Problem, wenn die Zahl enthalten keine Landesvorwahl wie 45, aber wenn es der Fall ist, meine app stürzt ab ...
Ist das ein bekanntes Problem? Ich habe nicht in der Lage, etwas dagegen zu finden ...
Dank
EDIT:
ich Telefonnummer wie folgt aus:
-(void)getContact
{
ABPeoplePickerNavigationController *pp = [[ABPeoplePickerNavigationController alloc] init];
pp.displayedProperties = [NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonPhoneProperty]];
pp.peoplePickerDelegate = self;
[self presentModalViewController:pp animated:YES];
[pp release];
}
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
// assigning control back to the main controller
[self dismissModalViewControllerAnimated:YES];
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {
return YES;
}
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {
ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
saveString = (NSString *)ABMultiValueCopyValueAtIndex(phoneProperty,identifier);
saveString = [saveString stringByReplacingOccurrencesOfString:@" " withString:@""];
nummerTextField.text = saveString;
}
Können Sie Ihren Code posten? Und wo kommt der Unfall zustande? –
Vielleicht mag jemand bei Apple das Dänische;) Scheint allerdings etwas unwahrscheinlich. – spender
:-) Der Absturz geschieht bei saveString = (NSString *) ABMultiValueCopyValueAtIndex (phoneProperty, identifier); aber nur wenn die Nummer ein Präfix hat wie +45 ... – CCDEV