2012-05-02 17 views
1

私はphoneNumbersを取得中で、ブレークポイントを取得しています。私はそれを修正しようとしている過去数時間を過ごしましたが、まだ運がありません。アドレス帳データを取得するブレークポイントを取得する

-(void)textMessage{ 
ABAddressBookRef addressBook = ABAddressBookCreate(); 
NSMutableArray *array =[[NSMutableArray alloc]init]; 
NSMutableArray *temp; 
NSMutableArray *temp2 = [[NSMutableArray alloc]init]; 
for(int i =0;i<[savedPeople count];i++){ 

    NSString *temp = (NSString*) ABAddressBookCopyPeopleWithName(addressBook, (CFStringRef)[savedPeople objectAtIndex:i]); 
    NSLog(@"%@",temp); 
    [temp2 addObject:temp]; 
    ABRecordRef thisPerson = (ABRecordRef)[temp2 objectAtIndex:i]; 
    ABMultiValueRef phoneProperty = ABRecordCopyValue(thisPerson, kABPersonPhoneProperty); 
    NSLog(@"%@",phoneProperty); 
} 


array = temp2; 
NSLog(@"%@",array); 
CFRelease(addressBook); 
} 

![1] http://min.us/mQOzL3w5V

誰もがそれで間違っているものを知っていますか?

+0

["スレッド1:NSURLオブジェクトを初期化するときにブレークポイントで停止しました"というエラーが表示される可能性があります](http://stackoverflow.com/questions/10016890/thread-1-stopped-at-breakpoint-error-when-initializing -an-nsurl-object) –

答えて

0

ブレークポイントは、エラーではなく、設定するものです。ブレークポイントインスペクタに移動します: enter image description here

そしてそこにあるエントリを削除します。また、ブレークポイントのボタンで一時的にブレークポイントを無効にすることができます。

enter image description here

またはメニューコマンド製品>デバッグ>無効ブレークポイントを経由して。

+0

ブレークポイントを無効にしてもまだ実行されず/続行されませんが、この行は間違っていますか? ABMultiValueRef phoneProperty = ABRecordCopyValue(thisPerson、kABPersonPhoneProperty); –

+0

クラッシュしますか?コンソールは何を言いますか? –

+0

thesスレッド1:EXC_BAD_ACCESS(コード= 2、アドレス= 0x9) –

関連する問題