This question already has answers here:
Send mail without MFMailComposeViewController
(3 answers)
Closed 8 years ago.
I want to send email from my iOS App, without showing native mailComposeController.
I want to fill its email text body and other attributes at back end, I know this is possible but my question is how can I send email without presenting mailComposeController instead of on just the button click(my email sent).
Any help will be appreciated.
Thanks!
You can't, since this will be a breach of privacy.
For example you could get the user e-mail address without their consent.
An option would be to create your own API to send the e-mail or send it via SMTP directly.
Related
This question already has answers here:
How to target a logged user with FCM? [duplicate]
(1 answer)
Sending Firebase Push Notifications to Logged-in Users Only
(2 answers)
Closed 2 years ago.
I would like to send notifications (or at least make them readable) only to users that are logged in on their devices. I could on each login and signout edit the realtime database and let the function that sends out notifications check it, but I was wondering if there was a simpler way to do this.
Firebase Cloud Messaging has no knowledge of users, so any time you want to relate messages to users you will have write code to do this. What you're describing is indeed a common way of doing this: write the token to a database when the user signs in, remove it from that database when they sign out.
Also see:
Sending Firebase Push Notifications to Logged-in Users Only
How to target a logged user with FCM?
This question already has answers here:
Detect permission of media library ios
(3 answers)
Closed 6 years ago.
In iOS 10, if an app accesses the music library, an Alert will be presented asking if the user gives permission for this access. This Alert is not part of the App. Is there some notification mechanism so that the App can be informed (a) that the Alert has been presented and (b) when the user has responded one way or the other?
The only work-around I have found is to relaunch the App after giving permission - not a very satisfactory way to deal with this.
Before accessing, request authorization yourself. See MPMediaLibrary.requestAuthorization(). It has a callback with the resulting status. You can also check the authorizationStatus() directly.
This question already has answers here:
How can I detect whether a user deletes the Telegram Bot chat?
(4 answers)
Closed 6 years ago.
What should happen when bot sends any message to user which blocked/stopped him? Can I catch this events with Bot API?
You can understand if bot was blocked/stopped only if you send a message to a user - you will get an error. It's the only way for now :(
Is there any chance to send sms only to one specified phone number?
I know that it must be executed only with native text editor (SmsComposeTask or ChatMessageManager), but is it possible to block addition of another recipients phone numbers?
Thanks in advance
The answer is basically NO.
Once you open the SMSComposeTask then basically your APP does not have any control over it.
The user can change recipients or even the text.
If you do want this then : one way to overcome this would be to send the message from the server by connecting to a web service. So the SMS goes from the server and not from the phone.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How to programmatically send SMS on the iPhone?
How to develop/code an application which could send sms from iPhone with text in it.
It's not possible to send an sms message from your application. You could for example make an application that connects to your server and sends the message from there.