Sending a text message without being prompted [duplicate] - ios

Is it possible to send sms via iphone without user intervention? I already know about MessageUI framework and MFMessageComposeViewController class, but this option requires user to click Send button when MGMessageComposeViewController is presented. I would like the device to automatically, without my help send a text message when certain conditions are met. (I have some sensors connected to the device)

No. You can only open a message ready to send but you cannot send it automatically.

If you want to be able to send sms without user's interaction, consider using some third party gateway. TextMagic provides nice api to send sms, but it is not free. At some point it charges you money. But, they have nice and simple api to use.
Look at this,
http://api.textmagic.com/https-api/textmagic-api-commands#send

Related

How to send user input to designated e-mail?

I am developing an iOS app targeting iOS 9 and above using Swift 3 and xCode 8.
I have a "Contact ViewController" which contains multiple forms where user enters its data to submit. Collected data also contains users' e-mail address. I am validating all the information that entered by the user correctly.
So, what I would like to do is my "send" button to send the user's all data to an e-mail address.
Is this possible without using Mail App or its interface? Do I need additional framework for such functionality?
I appreciate your time and sharing your thoughts.
This is not possible secretly. You can't send an email from the users device via the Apple Mail app because the system will not allow that. You can prepare an email with all the data that opens and let the user send it to you by tapping "Send" in the NavigationBar. So yes, you would need another framework to do that.
But I would not use emails to do that. Just use a server you send the data to or a service like Firebase.
If you really have to send E-mails, and just pushing the data to a backend API is not enough:
This is not possible using built-in functionality, but you could leverage an external mail delivery service like Mailgun to send your mails. (From a security standpoint, this should be handled by a server and not by the app itself however.)

How to send a text inside an iOS app?

Is it possible to send a text immediately inside an app. I have implemented the sms send. I just want to bypass the screen where the user has to press send.
There is no way to bypass the MFMessageViewController screen where the user has to tap "send." I assume Apple has designed it this way to prevent an app from potentially spamming a user's contact list.
In addition, there is no way to detect income SMS. Both these features are strictly reserved for the native Messages app.
For more information on sending an SMS on iOS check this out.
One alternative is to implement sending and receiving messages within your app using a web service to store and retrieve messages. For example, you could use a messages library like JSQMessagesViewController documented here and for simplicity's sake, you could use a BaaS like Parse.

Is it possible to send mails periodically from iOS app

I'm developing an app that creates a simple document with basic information created by the app. It won't contain any personal information, but it will contain data created and requested by the user. I want the user to be able to send this to themselves via email. I would also like to add the option for the user to have this file (which updates daily) to be able to send to them automatically every week/month, so they won't have to think about it. The user can set the intervals themselves.
Is this possible? The user will set up this option themselves from a menu, so it's not like they won't know it's happening. Every automatic mail will also contain information on how to turn the option back off again.
Is this possible and is it allowed by Apple?
Thanks for your reply
It is not possible from within the app. A user has to explicitly send the email through the MFMailComposeViewController.
If you want this functionality, you should build a backend for your app.
To clarify, if you want to use the users configured accounts; i.e. the account they use with Mail, then no you cannot do this automatically. The other answers rely on the fact a user enters their POP/IMAP settings, which personally I would never do.
You could use an email service as mandril or mailgun, to send emails "from your app".
Take a look at this: https://github.com/rackerlabs/objc-mailgun
There's a library called MailCore that's incredibly powerful. You can use it to send mail in the background of your app without needing to present the built in mail composer view
https://github.com/MailCore/mailcore2

Perform some action depending upon the text in the inbox of iPhone

I am having a message in iPhone inbox. I want to send that message to a small app which in my iPhone to do some particular task.
Can some one suggest me , Whether it is possible to send that SMS to our application development.
Thanks.
Unfortunately is not possible handle sms at SDK level.
If you manage the send of sms you can add a link into it and, using a custom url scheme, passing data to your app.

Possible to send automated email?

The iOS SDK class MFMailComposeViewController can be used to let the user compose an email message.
What I'd like to do, is for the iOS app to send an email in the background, with no user interaction. Is this at all possible/allowed in the iOS SDK?
Nope. There isn't any API available to do this. You'd need to roll your own SMTP client and have the user enter credentials into your application. On top of that Apple may not approve this.
Unfortunately, I don't think Apple would ever allow this because (for example) then you could just get everyone's email address by auto-sending mail to yourself. :(
I actually wanted to implement something like this for the express purpose of alerting me when a critical error happens on an app in the app market.
Best solution would be to create an API (just ping a php file or something), and have it send the relative alert message to your email).

Resources