gpt4 book ai didi

ios - swift 中 WKInterfaceController openParentApplication 的替代方案

转载 作者:行者123 更新时间:2023-11-28 08:51:24 25 4
gpt4 key购买 nike

我正在尝试通过 Watchkit 操作打开 Swift iOS 应用程序,但我无法找到 openParentApplication 方法

 // Register notifications in iOS
WKInterfaceController.openParentApplication(userInfo) {
(replyInfo, error) -> Void in
// Callback here if needed
}

现在 Swift 中 openParentApplication 的替代方案是什么?

最佳答案

如果它仍然有用,在 watchOS 2 上该方法不再可用,如文档中所述:

This method is not available for WatchKit extensions running in watchOS 2. Watch apps running in watchOS 2 must use the Watch Connectivity framework to communicate with the companion iOS app. For more information, see Watch Connectivity Framework Reference.

关于ios - swift 中 WKInterfaceController openParentApplication 的替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34121823/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com