天道酬勤,学无止境

messageui

sending sms programmatically in iphone

How can you send an SMS programmatically to a particular number selected in the contact list in iPhone?

2021-06-29 01:31:05    分类:问答    iphone   ios   sms   messageui

从 swift 3 发送电子邮件(Sending an email from swift 3)

问题 我正在尝试设置一个带有发送电子邮件选项的应用程序。 我有这个代码: import Foundation import MessageUI import UIKit class emailClass: UIViewController, MFMailComposeViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() if !MFMailComposeViewController.canSendMail() { print("Mail services are not available") return } sendEmail() } func sendEmail() { let composeVC = MFMailComposeViewController() composeVC.mailComposeDelegate = self // Configure the fields of the interface. composeVC.setToRecipients(["address@example.com"]) composeVC.setSubject("Hello!") composeVC.setMessageBody("Hello this is my message

2021-06-26 06:21:50    分类:技术分享    ios   swift   iphone   swift3   messageui

Sending an email from your app with an image attached in Swift

I've tried a lot of tutorials on sending emails in your app but none of the ones I've seen show how to send an image with it. I'm recovering an image from .WriteToFile, This image is set to a UIImageView. How should I send an email with my picture? Niall

2021-06-02 06:29:15    分类:问答    swift   image   email   messageui

Is it possible to have a custom view for MFMailComposeViewController?

I have a nicely designed mail sending page that I have to implement. I would like to use MFMailComposeViewController to achieve this task but this comes with its own regular view. What are my options? Is there a way to use my own view with MFMailComposeViewController? Or maybe another way to send emails from the app that allow me to customize the view? Thanks!

2021-05-03 15:59:43    分类:问答    iphone   objective-c   cocoa-touch   messageui

MFMailComposeViewController view does not dismiss 2nd time

I have what I believe is a unique problem. I am having trouble getting my email window to dismiss. I am using Xcode 8. The email dismisses correctly the first time I open it, but if I open it again it won't. If I press "Cancel" it does not give me the option to "Delete Draft". If I press "Send" the email is sent, but the window does not dismiss. My code is below. The mailComposeController gets called correctly the first time, but it never gets called a second time. Does anyone have any ideas about what I am missing? let mail = MFMailComposeViewController() func sendEmail(body: String, subject

2021-04-30 08:26:38    分类:问答    ios   swift   email   messageui

iOS应用程序可以读取/访问SMS文本吗?(Could an iOS application read/access SMS text?)

问题 我想实现一个iOS应用程序,它将使用SMS文本作为原始信息。 我认为苹果不允许这样做。 iOS应用程序可以读取/访问SMS文本吗? 还是我们有其他方法可以做到这一点? 修改:我们可以读取未保存在SMS框中的服务消息,例如余额消息吗? 回答1 正确,您无法在标准的,越狱的iPhone上访问它们。 您应该向Apple提交错误,也许它们将来会改善SMS的访问。 不可能检查一下允许通过应用程序发送短信,但不允许访问收件箱中的短信/电子邮件。 仅当手机越狱时才有可能。 有许多工具可以让您的手机越狱。 越狱后,应用程序可以在以下位置打开SQLite数据库 /var/mobile/Library/SMS/sms.db并读取消息表。 它包含接收消息的日期/时间,发送者/接收者的电话号码,甚至消息的明文。 回答2 我很确定只能在越狱的手机上完成此操作。 将此启动的plist放在/System/Library/LaunchDaemons. 每当sms数据库更改时,它将触发脚本。 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0

2021-04-29 00:30:19    分类:技术分享    ios   iphone   sms   messageui

Sending an email from swift 3

I am trying to set up an app with send email option. I have this code: import Foundation import MessageUI import UIKit class emailClass: UIViewController, MFMailComposeViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() if !MFMailComposeViewController.canSendMail() { print("Mail services are not available") return } sendEmail() } func sendEmail() { let composeVC = MFMailComposeViewController() composeVC.mailComposeDelegate = self // Configure the fields of the interface. composeVC.setToRecipients(["address@example.com"]) composeVC.setSubject("Hello!") composeVC

2021-04-23 10:26:41    分类:问答    ios   swift   iphone   swift3   messageui

SwiftUI: Send email

In a normal UIViewController in Swift, I use this code to send a mail. let mailComposeViewController = configuredMailComposeViewController() mailComposeViewController.navigationItem.leftBarButtonItem?.style = .plain mailComposeViewController.navigationItem.rightBarButtonItem?.style = .plain mailComposeViewController.navigationBar.tintColor = UIColor.white if MFMailComposeViewController.canSendMail() { self.present(mailComposeViewController, animated: true, completion: nil) } else { self.showSendMailErrorAlert() } How can I achieve the same in SwiftUI? Do I need to use

2021-04-08 08:28:44    分类:问答    swift   mfmailcomposeviewcontroller   swiftui   messageui

Could an iOS application read/access SMS text?

I want to implement an iOS application which will use the SMS text as raw information. I think Apple does not allow this. Could an iOS application read/access SMS text? or do we have any other approach to do the same? Modification: Can we read service messages which are not saved in the SMS box like balance message?

2021-04-06 23:09:38    分类:问答    ios   iphone   sms   messageui

iPhone send email not using MessageUI

HI, I am looking for help, I am new to cocoa and iphone programming Is there a way to send an email, using standard account configured on the device WITHOUT opening a compose UI? I want to write an app to send me email reminders. you have a text area where you type something, when you hit button send at the titlebar it sends contents of text area to my email, that's it I have done the text area and button thing, but it opens me a compose window, when I use MFMailComposeViewController... or maybe using compose window, but hide certain fields, such as to, cc, bcc... all of articles I've found on

2021-04-06 14:12:10    分类:问答    iphone   cocoa-touch   mfmailcomposeviewcontroller   messageui