简体   繁体   English

当UILocalNotification触发时,将应用程序从后台自动带到前台吗?

[英]Bringing an app from background to foreground automatically when an UILocalNotification fires?

As I understand in iOS, when an UILocalNotification fires, an alert window would pop up and ask the user to open that app. 据我了解,在iOS中,当UILocalNotification触发时,将弹出一个警报窗口,要求用户打开该应用。

I want to show that app to the user directly when an UILocalNotification fires, no user intervention is required. 我想在UILocalNotification触发时直接向用户显示该应用程序,不需要用户干预。

Is it possible to bring that app from background to foreground automatically when an UILocalNotification fires? 当UILocalNotification触发时,可以自动将该应用程序从后台移到前台吗?

Thank you. 谢谢。

目前无法在库存的iOS设备上使用允许的公共API来实现。

The main logic Apple's restrictions is to protect both the user and the device(its memory, battery etc..) from harmful applications. Apple的主要逻辑限制是保护用户和设备(其内存,电池等)免受有害应用程序的侵害。 And the logic of iOS notifications is that they let the operating system user intervention. iOS通知的逻辑是它们让操作系统用户干预。 As @hotpaw2 has said, there is no way to do that in public API's, which means if you do that your app will be rejected.. 正如@ hotpaw2所说,在公共API中无法做到这一点,这意味着如果您这样做,您的应用将被拒绝。

NOTE* 注意* : * If you target jailbreak devices it is possible, i can help a little too if you want that *如果您以越狱设备为目标,那么我也可以提供一些帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 确定UILocalNotification是否在前台或后台使用app触发 - Determining if UILocalNotification fired with app in foreground or background 重新安装应用程序后触发 UILocalNotification - UILocalNotification fires after reinstalling the app 从后台重新启动应用程序到前台 - Relaunching the app from background to foreground 应用程序从背景进入前景时,MPMoviePlayerController黑屏 - MPMoviePlayerController black screen when app enter foreground from background 当应用程序进入前台时,如何自动停止所有后台任务 state - how can I automatically stop all background tasks when app is coming in foreground state 收到UILocalNotification时使应用程序执行后台代码 - Getting the App to execute background code when receiving a UILocalNotification 当应用程序处于后台时,UILocalNotification不会显示在通知中心中 - UILocalNotification not showing up in Notification Center when app is in background 当App处于后台模式时,UILocalNotification可以触发自定义方法吗? - Can UILocalNotification fire a custom method when App is in background mode? 当应用程序前台到后台时,计时器没有更新 - Timer is not upadating when app come Foreground to Background 如何将Ios App从后台变成前台 - How to come Ios App to foreground from background
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM