简体   繁体   English

iOS后台应用间通信

[英]iOS Inter App Communication in Background

There is a platform application which connects to the remote server and stores required information in its local repository, that is in CoreData. 有一个平台应用程序连接到远程服务器,并将所需的信息存储在其本地存储库(即CoreData)中。 I want to develop my application over this platform app. 我想通过该平台应用程序开发我的应用程序。 Since it is not possible to access its local storage, I have to communicate with it somehow. 由于无法访问其本地存储,因此我必须以某种方式与其通信。 I am able to send/receive data using URL Schemes; 我能够使用URL方案发送/接收数据; however it's frustrating for user to switch between apps constantly. 但是,让用户不断在应用之间切换是令人沮丧的。

Is it possible to communicate with another application via URL Schemes (or any other way) without bringing it to foreground? 是否可以通过URL方案(或任何其他方式)与另一个应用程序通信而不将其置于前台?

除了少数例外,例如在后台接收CoreLocation数据或被本地通知通知唤醒,在iOS中,应用程序无法“在后台运行”

This is a pretty common query on Stack Overflow, the official iOS reply can be found here There are SO articles here and here . 这是对堆栈溢出一个很常见的查询,官方的iOS回复可以发现这里有这么文章在这里这里

Background data exchange is however not going to be a thing as there are restrictions on background app rules (so the URL transfer is going to foreground your second app) 但是,由于后台应用程序规则受到限制(因此,URL传输将成为您的第二个应用程序的前景),因此后台数据交换将不再重要。

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

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