4

Can I get user's mobile number (CLI number) in Objective-C on the iPhone from its sim card?

4

2 回答 2

5

Not with the official SDK. You could ask the user to point to its own contact entry using the AddressBookUI framework's pickers, or a UI of your own design.

于 2008-10-01T20:33:24.513 回答
3

您可以从 NSUserDefaults 获取用户的电话号码。然后查找他们的通讯录条目。

这种方法是完全没有记录的,并且很容易在注意到的时候中断。

它也很脆弱 - 用户可能有一个错误的地址簿,多次使用相同的 # 等等。

于 2008-10-02T03:27:12.023 回答