iPhoneOS,使用 applicationWillResignActive

发布于 2024-09-17 05:04:19 字数 158 浏览 2 评论 0原文

我想使用 applicationWillResignActive 这个函数执行一些任务。 在应用程序因来电、消息或用户手动关闭而关闭之前。

我可以使用此功能发送电子邮件/应用程序短信吗?这些任务是否会被执行,或者应用程序是否会由于上述中断而立即退出。 谢谢大家。

泰穆尔

I want to use this function applicationWillResignActive perform some tasks.
before the application shuts down due to incoming call, message or user close it manually.

Can i send an email message/in app sms using this function ? Will those tasks would be performed or the application would immediately quit due to the above mentioned interrupts.
Thank you all.

Taimur

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

べ映画 2024-09-24 05:04:19

在 iOS 上发送电子邮件或短信之前,您必须向用户显示标准 UI(MFMailComposeViewController 或 MFMessageComposeViewController),但是当应用程序要退出活动状态时,您无法呈现任何新 UI,因此答案是否定的 - 这些任务不能执行的

Before sending email or sms on iOS you have to display standard UI to user (either MFMailComposeViewController or MFMessageComposeViewController), but you can't present any new UI when application is going to resign active state, so the answer is no - those tasks cannot be performed

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文