为设备构建手表应用

Build watch app to device

我正在尝试生成一个 Ti 应用程序(SDK 5.2.0.GA - 使用 alloy),带有 swift-os2 手表扩展,直接在 App Studio 中连接到设备。它 运行 在 iPhone 和 Watch 模拟器上测试时没问题,但我在设备上尝试 运行 时遇到此错误。

[ERROR] : iOS extension "watch" target "watch WatchKit App" has invalid provisioning profile UUID in tiapp.xml. Did you mean?

[ERROR] : The provisioning profile "xxxxx-xxxx-xxxx-xxxxx-xxxxxx" is tied to the application identifier "com.test.watch.*", however the extension's identifier is "$(PRODUCT_BUNDLE_IDENTIFIER)".

我已经编辑了配置文件 ID,但它确实使用了在 tiapp.xml 中设置的有效 ID。

我尝试清理项目,并删除 buildResources 目录,但我仍然看到此错误。

有什么想法吗?

确保您已经为 iOS 应用程序、WatchOs2 应用程序和 WatchOS2 应用程序扩展(是的,那是三个)创建了配置文件,并确保 iPhone 在第一个和手表在最后两个。

然后您可以use Studio配置它们。

如果您为 iOS 应用程序使用通配符配置文件,并且 iPhone 和 Watch 都在其中。然后,您可以不配置 WatchOS2 应用程序和 WatchOS2 应用程序扩展的配置文件,Titanium 将自动使用 iOS 应用程序的配置文件。您应该在控制台日志中看到以下内容:

[WARN] :   iOS extension "Ti 5.2.0" target "<device>" is missing the Ti 5.2.0 WatchKit App provisioning profile UUID in tiapp.xml.
[WARN] :   Using the iOS app provisioning profile UUID "xxxxxxxx-7262-4b24-82cf-7969af384b4b"
[WARN] :   iOS extension "Ti 5.2.0" target "<device>" is missing the Ti 5.2.0 WatchKit Extension provisioning profile UUID in tiapp.xml.
[WARN] :   Using the iOS app provisioning profile UUID "xxxxxxxx-7262-4b24-82cf-7969af384b4b"