SMS default contact name - ios

Whenever I receive a text message from some services (namely Google and Blablacar), I see the service name as the sender (like if it was in my contacts) instead of an ugly phone number, as it appears when the text message comes from other services (Snapchat, Hello Bank).
I don't know if an app from the service needs to be installed on the iPhone for the service name to appear instead of the phone number : I have the BlaBlaCar app installed and (of course) one of the Google apps (Maps), but the sms from Google was to confirm my phone number as I created a google account my computer, not on my phone. So the text message cannot "come from" the iOS app.
When I click the sender "Contact" button and then the Info icon, I can see the real sender phone number (ex 4 66 45 3 for google and 2 52 25 22 27 for blablacar).
I have never added those phone numbers to my contacts myself, neither I see those "contacts" in my contacts.
I would like to know how it is made, so I can do the same when sending a text message from my server.
Are there some kind of pre-embedded default hidden contacts in iOS ?
Is there a field to fill in the app plist file like "default app phone number" that I didn't see ?
Is it some kind of a registration process with Apple so you can associate a phone number to a specific name ?
Thanks

Alright, I was looking in the wrong direction, this has nothing to do with iOS, Apple, or an iOS app setting, this is a feature of the Short Message System called Sender ID.
Here is a thread which lead me to the answer : http://developer.nokia.com/community/discussion/showthread.php/109878-How-to-Send-SMS-with-Sender-Name
This ability to set the sender ID is offered by many of the SMS sending platforms (Clickatell, SMSCountry, blastSMS...), but apparently it might not work in every country.
Here you can find some info about it : http://www.smscountry.com/custom-sender-id.aspx
Hope it will help if someone wonders like me "How hell Google has put itself into my contacts ?" !

Related

How to enable alphanumeric sender ID in Twilio?

I've recently created a Twilio account and upgraded it (i.e. added credit card and funded). However, when I go to the SMS settings, it still states that alphanumeric sender ID is disabled. The setting description says "Please note the Alpha Numeric Sender Ids will be auto-enabled once you upgrade the account" but this doesn't appear to be the case:
I've tried to see if I can use alpha senders regardless and it seems not. Trying to add an alpha sender to a sender pool gets to me this:
But the link for "request for enabling the feature here" is https://www.twilio.com/console/sms/alphasender/request which just redirects me to the console home page.
I've checked the doucmentation but it only mentions checking that this setting is enabled - nothing more about how to enable the setting.
Is there anything else I need to do to enable alphanumeric sender IDs?
Depending on your country's telecom laws, specialized SMS sender IDs like short-codes may have application processes attached to them that are outside of a regular paid Twilio account.
Talk to your Twilio account rep or failing that, reach out to Twilio support.
If you click through to the support article, you can see the support for your country.

Twilio SMS Webhooks and Group Text Messages

Is it possible to maintain both group text messages and single text messages with users and keep them separate? I understand there is no concept of a group message per se, but wanted to see if any recent advances in tech has made this possible with Twilio or other providers.
In short, I am creating a POC where a user inside an iOS App can send invoke an API call to my backend application. This application receives a phone number from someone's contact list, and then connects to Twilio to send the SMS message to that target user.
When the user replies, I was researching Twilio Web hooks to receive the message, and then save it in the database. The originating user, then, would be able to see the message on a screen.
I would guess that when a user responds to the twilio message, the only metadata that comes in is their message and phone number, so the "foreign key" is the phone number.. Thus when I save it in my database, I have their phone number and message.
This works up until someone decides to target two or more people in an SMS message using my API, and then target one of those people individually. For example they select me as a sole recipient, and then select me and someone else as a group text message.
In this case, how could my system/Twilio differentiate between if I was responding to the group message, or to the single message?
Any ideas or work arounds? Maybe another technology? Thanks!
I wanted to provide an answer to this in case anyone else was looking into this.
Essentially you pay 3 cents (0.03) per month per active user in each group. Basically you buy phone numbers for each group chat you need.
https://www.twilio.com/conversations/pricing
So if you're doing a million group chats obviously it can get costly, but for simple POCs this isn't the end of the world.
Enjoy!

How do I Generate a Text Message to a Predefined Phone Number in iOS 10?

Let's say I have the user of my app define a phone number in a setup step of my program, saved in the plist as a number with the key "PhoneNum". Now lets say that I want to have a button in the program which, when pressed, generates a text message that says "Hi! How are you today?" to the phone number saved under "PhoneNum". Is it possible to have this message auto-send without confirmation from the user? If so, can you point me in the right direction?
Yes, it's possible, if you pay for an SMS-sending service. Type “sms sending api” into your favorite search engine.
If you want to send a message through the user's own iMessages or cell phone account, then you cannot do it without confirmation. How to programmatically send SMS on the iPhone?

How to avoid iPhone automatically adding Map URL to SMS message?

My App allows users to share items from the App with their friends through SMS messages, which contains a deeplink that brings the recipient to that item in the App. I have noticed a few occasions where an extra link is automatically added to the SMS message that when pressed opens up the Map App on the phone and tries to go to an address. This is confusing to the user since the item being shown is a baseball card and the first link goes to an address instead of the item as expected. An example text that turns into a url is:
1933 Goudey #149 Babe Ruth PSA 4
Does anyone know how to turn off this functionality? I couldn't find any references to it.

IOS: How to verify user's phone number using codes

i am working on an app in which i take a field of mobile number of user after entering mobile number there is a option for verify phone number.
but i don't know the functionality of how to verify a user's phone number within the app using codes.I search for similar type of questions but didn't get the exact solutions.
i am sending a screenshot of my app where i want to put that functionality.
i didn't apply any codes for this
please help
You need a backend that can generate and save codes for each phone number and also send a text message with those codes. So the flow is as follows:
User enters their phone number in the app and presses the "Verify Number" button.
You send a request to your backend with the number provided. In the app, you also displays a text field for user to enter the generated code and a new button like "Check code".
The backend generates a new code (just a random one), stores it to the database (like ID,PhoneNumber,GeneratedCode,DateOfGeneration) and sends a text message with the code to the phone number specified.
When the user receives the message he or she enters the code to the checking input field and presses the "Check" button.
The mobile app sends another request to the backend with the phone number entered earlier and the code entered by the user now.
The backend looks to the database for the "Phone number" - "Code" pair and responds with failure (the code is incorrect, try again) or success (the phone is verified).
Unfortunately, there's no way to access text messages received by user from within an app on iOS devices (unlike Android). The proof link was already provided. So the user has to manually enter the verification code from the message.
Ok I tell the information how was I already did my project in before
Step-1
when user press the Verify Number button
initially I check the phone number is valid or not(means phone number count/length).
second I generate the random number on progrmatically like NSUInteger r = arc4random_uniform(16);
Step-2
send the random number to server along with the vaild phone number , the server send the random number to the particular mobile number using SMTP Server.
Step-3
in your hand you have the random number , so open the UIAlertview for user type the valid random number , if user typed the vaild number show the Next Screen else show the Alert.
To verify any mobile number you can use third party api's which are available for mobile as well as backend server. You can use Twilio Messaging Api. To use this API follow below steps:
Register account on Twilio and get key from account.
Get user's phone number from mobile application.
When user click on the "Verify Number" button, call web-service with the number.
When you'll call the web-service, write a logic to send the random number with the Twilio messaging api to send message to user.
When user get this number through SMS, You can tell user to enter the number and verify it.
Also, there is another api which you can directly integrate into your mobile application. You can find this Sinch Api here.
To verify against your device's phone number, first, you need to get the phone number from your device and then you can compare against. However, after iOS 4, getting phone number of your device is quite impossible. Even if, you do get the device's number using some private api which I am not sure works entirely, there is a huge possibility for Apple to reject your app.
Refer to the following stack overflow discussion-
Programmatically get own phone number in iOS
Just a suggestion: You probably want to look for a work around based on your business goal. For example, rather than checking for device's phone number directly. You can generate a code and send that to the number specified by the user and then enter that code to verify that the user has that device.

Resources