作为 Apple Watch 插件

虽然您不能使用 Flutter 构建 Apple Watch 应用程序,但可以向 Flutter 应用程序添加 Apple Watch 的本地扩展。

步骤 1: 在 Xcode 中开启 bitcode

Apple Watch target 要求启用 bitcode,因此请按照 创建支持 bitcode 的 iOS 应用程序 中的步骤在您的应用程序中使用 bitcode。

步骤 2: 添加一个 Apple Watch target

在菜单中,选择 File > New > Target。当对话框打开后,在顶部选择 watchOS 并且点击 Watch App for iOS App。然后,点击 Next,输入产品名,最后选择 Enter

Adding an Apple Watch target