iOS access phone settings programmatically - ios

is it possible to access the phone settings of an iOS Device programmatically? I'm currently building an app and there I will provide contact possibillities, for example a direct link for calling (you just push it and then the specific contact number is called).
But I only want to show that possibility, if the user isn't calling with an unknown number.

You can access the contacts stored in the phone using the Address Book framework. If you're unfamiliar with the framework, I suggest you take a look at this quick start tutorial.
EDIT It seems you wish to read the state of the Show My Caller ID system setting, however you cannot programmatically access the system settings.

Use ABAddressBook for getting contact details in your project...
see this

Related

Save a contact on iOS using QR [duplicate]

Is there a URL to open the contacts application from within my application? I know you can achieve this with the settings app by using the UIApplicationOpenSettingsURLString constant in Swift; however, I wasn't sure if I could do the same with the Contacts app.
There isn't a deep link for opening the Contacts App.
Apple is very picky when it comes to deep-linking. They have to provide one for Settings since many apps need services like Data, Location, Bluetooth, Wifi, etc.
Unfortunately they do not extend this to the Contacts App.
However if your app needs contact information then for that Apple has provided a Contacts framework to browse through your contacts within your app itself.
Read more about it here.
In order to add/update/delete/merge contacts directly from your app without using the Apple's Contact UI, use the CNSaveRequest APIs. More on that here.
The closest thing you can get to opening a contact is to write them a message in IMessage. From this screen the user can press the contact icon and open the contact page for that particular contact.
You can do this by opening the url sms://+44776382223 where the number is the number of the person that you would like to view the contact of.

Show Blocked Contacts using ABAddressBook

This question is for iOS 10 and Xcode 8. I know how to get user local address book contacts using ABAddressbook and show them in my app. What I was trying to do next are two things
Show the user what contacts he/she has blocked himself
Try see if I can block or unblock those contacts programmatically
The reason I am doing this is that as of now the only way to "block" a contact using native iOS app is to click on a contact, scroll down and click on block/unblock button. I was just trying to figure out if I can help the user quickly see all the contacts in their addresbook they have blocked and perhaps unblock/block one with one less tap using my app.
I have looked into callkit and that is not what I need. I am not creating a VOIP app nor do I need to create my own block list.
I have googled quite a bit and didn't find an answer for blocking / unblocking contacts using ABAddressbook which must mean its not possible. Suggestions?
In some way it is not possible till your device is jailbroken as this says and also it is possible if we use CallKit framework as Possible to programmatically block phone number in iOS source.
Apple document Says
The CallKit framework provides programmatic access to VoIP functionality, as well as call blocking and identification.

How to fetch the phone number for the imessage extension created application

I am trying to implement an iMessage Extension application, i want to fetch the number for whom i have selected the imessage to be created with the app i have created.
How to fetch the number whom I am sending this custom message. Any idea ? as I could not get much information from the Message Class referenced in the 'MSMessage' library file.
I can only access the UUID which is not what I want.
Thanks for any suggestions given.
For the moment it's not possible. It's more a question of privacy, Apple doesn't want dev to access private data like that. Maybe later Apple will allow it via a permission asked to the user (like they do for agenda/position etc).

Delete dial call number from recent call list in ios

I have a some special requirement to delete dial call number from call list. I research a lot on SO but not able to get any answer for this. Is it possible in iPhone?
Apple doesn't allow developers to modify call list or history, since it will violate user's privacy policy. It is not possible to achieve in iOS with iOS public framework, used to submit apps to appstore. It is only possible by using private frameworks... or you can say jailbreaking the device. But you won't be able to submit app to store. It will be rejected.
Simple answer: No you cannot. Apple iOS doesn't allow you to access some of the applications such as Phone and Messages - So it is not possible for you directly access the call log, read messages or whatsoever. What you can do is, you can open the Messages/Phone app with a pre-defined number to call or a message to send for performing user verification actions.
Take the example of Uber app; you can call the driver by tapping on the Contact button, but there is no way that app can access your phone log and delete the recent numbers from the record - unlike Android devices.
It may be possible by jailbreaking, which on the other hand won't let you put your app on the App Store.

Launching the standard Contacts View from my app

What I am trying to accomplish with my app is if a user clicks on a contact name in my app. I want to directly launch the selected contact in a new view, but using the standard ios contact view. Is this possible? If so how can it be accomplished? I can't seem to find any URL Scheme for the contacts app if one does indeed exist that is.
Look at the Address Book UI framework documentation, please.
By the way, using this framework is a very good idea i.e. "the standard iOS contact view", because trying to reproduce this view and all its functionality yourself would be, shall we say, challenging.

Resources