3

I have bunch of customers' phone number information with their profile in my database.

What I'm planning to do is that an iPhone searches for matching phone number and its customer's profile in my database as soon as the application runs. And it displays the customer profile on the screen.

The problem is.. I was told that iOS 4.x allowed this before... but not anymore after that version :S Can I still access to the device information and get its number? If yes, how?

Kara
  • 6,115
  • 16
  • 50
  • 57
Raccoon
  • 1,367
  • 4
  • 22
  • 45
  • not in appstore compatible way – Daij-Djan Nov 19 '12 at 19:56
  • On iOS 7 you can't do it without JB but on iOS 6 you can. [http://stackoverflow.com/questions/19504478/ios-7-how-to-get-own-number-via-private-api][1] [1]: http://stackoverflow.com/questions/19504478/ios-7-how-to-get-own-number-via-private-api – 0x8BADF00D Sep 18 '14 at 23:08

2 Answers2

7

Nope. Not in a way it would be accepted by the iTunes store. You did your research and it is where it ends. The only way you can get it is by asking the user to enter the phone number during the app's first run and probably cross check it with the database you already have.

Ravi
  • 7,929
  • 6
  • 38
  • 48
1

You can use CTSettingCopyMyPhoneNumber() from CoreTelephony.framework

extern NSString* CTSettingCopyMyPhoneNumber();
NSString *phone = CTSettingCopyMyPhoneNumber();
NSLog(@"Phone : %@", phone);