English 中文(简体)
如何使用ABAS 书籍
原标题:How to use ABAddressBook
  • 时间:2012-01-14 10:25:32
  •  标签:
  • ios4

我正试图从接触书上取得所有联系,然后根据要求处理。

我正在收集使用......的所有接触的名称和编号。

NSString *strFNm=(NSString *) ABRecordCopyValue(ref,kABPersonFirstNameProperty);

ABMultiValueRef phoneNumbers = ABRecordCopyValue(ref, kABPersonPhoneProperty);

我在把每个名字和接触扩大到两个不同的阵列。

This all thing works correctly in simulator names and arrays in array (displayed with NSLog) however when I try to check the same thing in device array is always empty ... there is nothing in the array. (The contact book in device is having 127 contacts).

如果有任何解决办法,请将此事写到底。

问题回答

似乎你并不要求允许查阅地址簿,即必须获得查阅许可。

Refer to: Programmatically Request Access to Contacts





相关问题
touchesBegan @ multitask

Is it possible to access to the touchesBegan event while application is running in background in iPhoneOS 4.0 ? Thanks in advance.

Error when making a distribution file with iPhone SDK 4.0

When I try to upload the binary to iTunesConnect it says: "An application targeting the iPhone device family may not require a iPhone OS Deployment Target of 3.2, which is an iPad-only OS". I am ...

New App provisioning in iPhone SDK 4 Beta

The enterprise distribution in iPhone 4 beta is supposed to be easier. Companies can host their own servers with the apps instead of distributing through iTunes. I am looking for technical ...

IPhone SDK 4 background process for incoming call [closed]

I would like to track (run some code - or invoke function) when the user get an incoming call. for example: for every call the user receive I want to save the number, and check something during or ...

How can I install more than one version of the iPhone SDK?

I want to install the iPhone 4.0 SDK, but I don t want to lose my stable 3.2 version because I am planning on packaging an app for distribution soon. Any tips on installing more than one version? ...

iPhone SDK 4.0 Phone locked tool

Is there going to be a way with the 4.0 SDK to create a tool similar to Pandora(which was demoed today), so when the phone is locked, I can manipulate my app? So basically if my app was running, and ...

UITableViewCell Custom accessory - get the row of accessory

I have a pretty big issue. I am trying to create a favorite-button on every UITableViewCell in a UITableView. That works very good, and I currently have an action and selector performed when pressed. ...

热门标签