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

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).

Related

Is there a way to delete call logs and SMS programmatically in iOS?

I want the ability for a user to specify a time-frame and delete all call logs and sms created during that time-frame. Does Apple allow this functionality?
I know this is like accessing the sandbox mode of a private app but just want to confirm if there is a way.
Sadly, There is no way to access the SMS or Call Logs.
Apple encourages third party apps to be developed to carry unique functions. Not the ones that are already available from First party which is apple itself.
Call log and sms are synced to iCloud. So i guess even if you figure out a way to access them using some private api, you might not be able to update them. so apparently they will be resynched.

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.

Is there an iOS API for accessing call logs?

I want to access the call log of the device in my application. I have R&D a lot and found some posts here on Stack Overflow as well (for example, this one), but none of them have clear vision whether we can do this.
When I look into these apps:
Truecaller
quickReminder
...it seems that they managed to get the call history in their app and customized it as well.
Any help/feasibility would be appreciated.
It is not possible to extract the call log programmatically.
First of all Apple officially does not expose any public API to access the call log. That means you can hack all you want to access the call log(Using private API's) but when submitting your app to Apple by sure it will be rejected.
Regarding the app you have mentioned(quickRemainder)
It gets the call log using a cvs file or a text file. It is not taking the info via device calllog db.
Extract from their app description.
You can import text or cvs files containing phone calls into this app.
TrueCaller does not get the call log they just use the app to search the contacts and update the contacts with info they got. They are not reading the callogs
Update: Apple has introduced framework called Callkit. Though you cannot access all the call log, you can have some control over calls like
Identifying incoming calls
Blocking calls
etc
https://developer.apple.com/reference/callkit

iOS access phone settings programmatically

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

Programmatically identify if an app is paid or free

I would like to identify whether an app is paid or free; programmatically, at runtime.
To brief on the context I'm working on, I'm developing an SDK which can be used by various third-party apps. I would like to identify if the app that is using my SDK is paid or free.
Any suggestions to find this?
You should make them configure your SDK writing their app id somewhere, and then your SDK have to check the app store webservices like this
https://itunes.apple.com/lookup?id=theAppID
There you can check the price
One thing you can do is this
https://itunes.apple.com/lookup?id=YOUR_APP_ID
and then fetch price & currency values from the returned JSON
There is a way tick into my mind,
Add a logic to get application name which using your SDKalso add some logic to send that name to you via API or any other way you preferred.
Once you get a new name in your server database, you can, open AppStore in iTunes, and search for the application there, and yes you'll get to know whether they are paid or free!
I know its tough if your SDKwill be going to fly with many apps, but not hard.
An alternate way, if there's some way that you get to know whether app is paid or free, then, you can do the same thing, send app name, and its price details.

Resources