هل هناك طريقة غير رسمية للحصول على رقم هاتف الجهاز؟
-
15-11-2019 - |
سؤال
أود الحصول على رقم هاتف الجهاز (على iOS5 و iOS6).
هل هناك أي طرق غير رسمية للقيام بذلك؟
هل هناك أي واجهات برمجة تطبيقات الهاتفية الأساسية الخاصة أو APIs Iokit التي يمكن استخدامها على سبيل المثال؟
ونعم، أعرف أن تطبيقي لن يتم قبوله في AppStore
المحلول
Private API
There is a private API to get phone number. Private API can't be submitted to AppStore, but it can be executed on jailed device.
NSString* CTSettingCopyMyPhoneNumber();
It returns phone number. And it's located in CoreTelephony
MDM
And actually, there is even a legal way of getting phone number. However, it's complicated. There is MDM protocol for iOS. One of the commands retrieves information about a device and this info includes phone number (and a lot of other device info).
Other notes
Also, you may be interested to read through these several questions:
نصائح أخرى
You could start by searching in the private headers.