How to send a text inside an iOS app? - ios

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.

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

Swift - How to check if two users are present in JSQMessagesViewController?

We are developing an iOS application which has a chat through JSQMessagesViewController and Firebase. When a message is sent by one user, the other user will receive a notification for the message. However, we desire a functionality where if the other user is in the chat, he should not receive the notification as he can already see all the chat-messages.
What is the best logic / way to implement this desired functionality?
Xcode 8.1, Swift 3, Firebase, JSQMessagesViewController
According to me there are two things that you can do:
1)You can use observers, like typing , for mapping two users when they are in private chat. Just make a status key on firebase and set it to true if two users are on chat page. In this case just don't send push as probably you are sending it from client end.
2)Or you can just ignore notifications when application is active when you see that payload has same user with which you are chatting.
You would probably need to add a presence management system. I did something similar on my app while using Firebase and JSQMessagesViewController, you could probably customize the system to your liking.
Depending on what you use database wise for incoming and outgoing messages with the JSQMessagesViewController library, you could probably set it up there as well.
Firebase has worked best for me for what you're looking to do:
https://firebase.google.com/docs/database/ios/offline-capabilities

Sending a text message without being prompted [duplicate]

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

How can I intercept text messages using cocoa

I intend on writing an app for iOS that would require me to monitor incoming texts from select contacts etc - in short, I need to somehow get the strings from a text message into my app directly. Is anyone able to point me in the right direction here?
Apple doesn't provides any SDK (and doesn't allows developers) to access on the messages.
You can just access to the screen New Message from the app.

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.

Resources