Re: How to get the phone number use ios sdk in iphone.
Re: How to get the phone number use ios sdk in iphone.
- Subject: Re: How to get the phone number use ios sdk in iphone.
- From: Keary Suska <email@hidden>
- Date: Thu, 22 Dec 2011 09:38:35 -0700
On Dec 22, 2011, at 8:37 AM, 吴明 wrote:
> 1. [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"];
>
> 2. Use CTSettingCopyMyPhoneNumber();
> This function is included in Coretelephony framework.
>
> 3. Get all contacts phone number by addressbook framework. Then get the phone number.
How you should get the number is by asking the user for it. Items #1 and #2 may get your app rejected. In fact, #1 is known to cause almost definite app rejection. #3 is error prone but if you ask the user to confirm that may be acceptable. Also make sure you scour the developer agreement about how you need to ask for this kind of information and how you use it. Misuse could get you permanently banned.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden