2

I am building an IOS6 app which requires the user's phone number,

Is there a way to ask the user for permission and get the number in programmatic way?

Or he has to manually type it in?

I am using Xcode 4.5 if it matters..

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Yoni Hassin
  • 584
  • 1
  • 5
  • 17
  • No! I asked if this permission type exists! not if it is possible to get it without permission! – Yoni Hassin Aug 18 '13 at 05:55
  • That question asks if it's possible at all, _including_ by asking permission. – jscs Aug 18 '13 at 05:59
  • So let my question be a subclass of that one :) – Yoni Hassin Aug 18 '13 at 06:01
  • 1
    Right, but subclassed questions should forward all their answers to their superclass so that the information is consolidated. That's the point of closing as duplicate. – jscs Aug 18 '13 at 06:12
  • It's funny because I just got this notification: You've earned the "Popular Question" badge for Can I get user's phone number by requesting for permission in ios 6?. See your profile. – Yoni Hassin Dec 28 '13 at 20:17

1 Answers1

4

You can't get the phone via any easy API within iOS. There might be a way to do it via the technique described in this related question, but this is a few years old and Apple may have closed this hole (which uses an undocumented key). I also wonder if Apple wouldn't allow the app on the App Store for privacy reasons. Probably not.

You'll have to trust the user to type in the correct phone number if you prompt him/her to.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • 3
    That is so weird, isn't it exactly the reason permission exists? So apps will be able to ask permission for user's private data? :) – Yoni Hassin Aug 18 '13 at 05:53