且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apple Watch:一个 Watchkit 应用程序可以与多个 iOS 应用程序通信吗?

更新时间:2023-11-22 20:26:16

你可以做到这一点.

但前提是两个 iOS 应用都是由同一位开发人员开发的.

BUT only in case both iOS apps are developed by the same developer.

要走的路是将所有三个应用程序放在同一个应用程序组中.这将允许所有三个应用程序访问一个公共存储空间,它们可以在其中存储其他应用程序访问的信息.

The way to go would be to put all three apps in the same App Group. This would allow all three apps to access one common storage where they could store their information to be accessed by the other apps.

此功能用于 iOS 应用程序 <-> Watch OS 1 中的 Watch 应用程序通信以及与今天的扩展程序通信.

This functionality was used for iOS App <-> Watch App communication in Watch OS 1 and for communicating with today extensions.

您可以在此处找到使用应用组的教程:http://www.codingexplorer.com/share-data-in-your-swift-watchkit-apps-with-app-groups/

You can find a tutorial to using App Groups here: http://www.codingexplorer.com/share-data-in-your-swift-watchkit-apps-with-app-groups/