简体   繁体   English

Iphone后台处理

[英]Iphone background processing

I am new to Iphone development. 我是Iphone开发的新手。 We are working on Hybrid Application for one of our customer. 我们正在为我们的一位客户开发混合应用程序。 We would like to know, whether the following requirement is possible in Iphone, if yes, please let me know your thoughts. 我们想知道,在Iphone中是否可以满足以下要求,如果是,请告诉我您的想法。 I learnt from this forum, all the operations will be suspended once the application is pushed to background. 我从这个论坛中了解到,一旦应用程序被推送到后台,所有操作都将被暂停。

1) Launch the Application.
2) My Applications interacts with the custom backend server for every certain intervals to check for new messages.
3) If yes, then it has to receive the messages and alert the user.

It works fine in Foreground mode. 它在前景模式下工作正常。 But the Customer expects to work on the background mode also, because they need to alert the user immediately within 15 mins once after the message has been dispatched. 但客户也期望在后台模式下工作,因为他们需要在分发消息后的15分钟内立即提醒用户。

Please let me know your thoughts or suggestions. 请让我知道你的想法或建议。

Thanks, Ramesh 谢谢,拉梅什

You can use push notifications to call back the app from the backend when a certain event happens. 当某个事件发生时,您可以使用推送通知从后端回叫应用程序。 In iOS7 is possible to send push notification when new content is available. 在iOS7中,可以在新内容可用时发送推送通知。 So basically, instead of using a polling mechanism, that is the one you want to implement, it is fairly easy to solve by using a push mechanism. 所以基本上,不是使用轮询机制,而是要实现的轮询机制,使用推送机制很容易解决。

It's not possible, none of this kind of background processing are supposed to be allowed by Apple (only music etc.) 这是不可能的,Apple不允许这种背景处理(只有音乐等)

It's your server which need to send notifications to apple servers which will send it to users (saying "Yeah you have new messages") then your application will display those new message when it wake up. 这是你的服务器,需要向苹果服务器发送通知,然后将其发送给用户(说“你有新消息”)然后你的应用程序会在它唤醒时显示这些新消息。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM