Programatically send SMS in iOS without keeping any references in Message app - ios

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 ?

Related

Objective-C How to Determine when Messages App of Apple Sends a sms message

How can I reference the Messages app of apple to my app so I can increment x every time it sends a sms message.
I'm not trying to create an app that sends sms message. It's just a view with a large label that shows a number of how many times I've sent a message from Messages app.

Is it possible to receive SMS notification inside an app in IOS?

Consider 2 iOS phones running an app.
The app in one phone sends a SMS to the other phone. I want to know two things.
Is it possible to show a notification inside the same app in second phone when this SMS is received.
Is it possible to receive this SMS only inside the app ie, this SMS should not go to the default iOS message inbox.
No, it's absolutely not possible without jailbreak.
iOS does not provide any public API to deal with SMS without going through the MFMessageComposeViewController.

How do I send an SMS on iOS without having to get the user to ok it?

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.

How to detect that a user uninstalled an iOS App? I need to push a serious notification

I know Apple won't let you know when a user uninstalls your app.
I have an old legacy SMS system to send alert Short Message to end users. Most of these messages are serious. There's a bottleneck with the GSM module when sending hundreds SMS users simultaneously. Delay is inevitable.
Thus, I built a new alert system to send push notification to my users if they installed my app. After registering their phone number, their SMS Alert will be switched into the new alert system.
The problem is that some old-school users prefer SMS rather than push notifications. They downloaded the app and registered their phone number. Then they found their phone doesn't have a 3G data plan. They deleted the app without un-registering their phone number.
My new system has no idea who deleted the app without unregistering the phone number. All serious alert messages are still sent to the nonexistent app on their phones.
Is there any way to detect that a user has deleted my app?
APNS has a feedback service where Apple reports any device token that is no longer active on the users device. You are required by Apple to check the tokens from the feedback service and stop sending pushes to those devices.
You can use this same information to automatically move the user back to SMS. Just tie the device token to the phone number in your database. If the token is active, send pushes to it. If it is reported by the feedback service to be in-active, remove it from your records and use the users phone number for SMS again.
Just remember that a device token can become active again, at which point, it will be registered with you through the same mechanism it was the first time. Re-save it with the user and use push again.

Sending SMS inside my App

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.

Resources