I've made some Apps on Android and I'm searching way to do the same on iOS.
We have a main App which receive emergency phone calls (accident, fire...) and calls volunters firefighters who are at home.
On Android, our main "Emergency-center" app send encrypted SMS to the firefighters smartphones. On the firefighters' smartphone there is an Android App looking for incoming SMS. When the app detect the incoming SMS is from the "Emergency-center", it wakes up the phone, sets volume to max, sounds to alert the FF and display info about the accident. This App send back an SMS to the "Emergency-center" when the FF confirm he has received the alert.
The goal is to create an iOS version of this Firefighters cellphone's app.
But after searching here and on Google, I concluded that, on iOS, you cant' detect incoming SMS as you don't have the right for that nor the right to read SMS content.
So the question is: how can I do such a think on iOS? Meaning calling an App on a phone with an external call. If it's throught SMS, OK. If not, it doesn't matter... but how?
Thanks for the suggestions
How can I send a text message (natively or through the use of an API) from an iOS application to someone without having them have to interact with the message before hand?
The message would be prewritten and would send on tap of screen. Its ok if the user needs to okay it once, but I need a way to send a message without having to have the user interact with their device each time.
Example:
Phone is off, I shake phone, phone senses shake, sends text messaging saying "I'm shaking" to another user via SMS or MMS without having the user need to OK the sending. Is this possible? How would I do it?
You can't do that. You need to show the user the message in the MFMessageComposeViewController that pops up first, and he has to send it by himself.
This restriction was made, because otherwise, many apps could spam your contacts etc. with a massive amount of sms or they could even write sms to expensive numbers.
But if you want to send just some kind of notification to another user, you could use push notifications. To do that, I would recommend you to use parse.com and their free push notification-service. Also, because Push Notifications are free, in contrast to SMS, you will save a lot of money. Of course you need to make some preparations before you can send notifications, but that way you could do it. But also there are restrictions. One restriction is, that the receiver of the notification also must have the app installed on the receiving device.
So the receiver would receive a "message" like that:
So I would recommend you to check the QuickStart Guide from Parse.com for iOS for further informations. The Guide is really simple and shows you step by step how to activate your app for Push notifications.
Sorry, but you can't, it is completely impossible. The only way to send sms is through messageUI, which always requires the users consent. You can probably do it on a jailbroken phone, though.
Yes, it is possible. But you would have to use a 3rd party service to send the text message. for example, Twilio.
Need to send SMS programmatically in my iPhone app.But don't want to track SMS history in default message app(message in sent items).
Does any one has solution for this ?
I use MFMessageComposeViewController to send SMS inside my App. Is there a way to know if the message was sent using iMessage or regular cellular services?
No. You do not even know if it was sent out at all. I wish there was such feature in iOS SDK.
I'm developing an iOS app that sends sms. What's the best way to handle a incoming message when the app is active. Is this done automatically or do I have to code for this in my app via the
applicationWillResignActive:(UIApplication *)application
method?
You don't need to/shouldn't need to deal with incoming SMSs.
When the device receives an SMS (or an iMessage these days), then the user will be notified by their method of choice. They may leave your application via that notification, but you cannot determine that it was the SMS that caused it.
CoreTelephony provides some abilities for people to deal with Calls, but nothing to do with SMS. Sorry. As such your app cannot determine the state of SMS messages. You're able to send SMS messages because the OS provides you with a view controller to do so, but you can't do anything else with them.