无法将 UIImage 从 iPhone 传输到 WatchKit 应用程序中的 WKInterfaceImage,对吗?

There is no way to transfer an UIImage from iPhone to WKInterfaceImage in the WatchKit app, correct?

无法将 UIImage 从 iPhone 传输到 WatchKit 应用程序中的 WKInterfaceImage,对吗?

有些限制不允许这样做,对吗?

然后我尝试将其保存在设备上的文档文件夹中。但是每台设备上都有 2 个单独的文件夹,对吗? iPhone 有一个文档文件夹。 Watch 设备上的那个是单独的一个。因此,当我查询文件路径时,它会在手表上为我提供类似 Device/pluginKit/filename.png 的内容。

总之没有办法实现上面的标题吧?

如果您想在主机 iOS 应用和 WatchKit 扩展之间共享磁盘 space/files,您需要使用应用组。在此处查看文档:https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/DesigningaWatchKitApp.html ("Sharing Data with Your Containing iOS App")

然而,

WKInterfaceImage 有几个方法可以使用 phone 中的图像。我在这里做了一个简单的解释:http://www.fiveminutewatchkit.com/blog/2015/3/10/how-to-display-an-image-using-wkinterfaceimage