You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WidgetKit Complication在iPhone与Apple Watch间同步异常求助

watchOS Complication组件在iPhone Watch应用中显示异常问题

我使用WidgetKit开发watchOS的Complication组件时,遇到了如下异常:

  • 在iPhone的Watch应用中选择该组件时,组件无法显示内容,且组件库中显示为“未命名组件”
  • 直接在Apple Watch上选择该组件则功能正常

该问题在真机和模拟器中均会出现,且仅在部分设备配对组合中发生:

  • Apple Watch Ultra(watchOS 10.4)+ iPhone 14 Pro(iOS 17.0):异常
  • Apple Watch Ultra(watchOS 10.4)+ iPhone 14 Pro(iOS 16.1):异常
  • Apple Watch Ultra(watchOS 10.0)+ iPhone 14 Pro(iOS 17.0):正常

我创建了简化测试项目,问题依然存在。其中使用StaticConfiguration创建的Complication无此问题,但使用AppIntentConfiguration的Complication仍会触发该异常。相关代码如下:

var body: some WidgetConfiguration {
    AppIntentConfiguration(kind: kind, intent: ConfigurationAppIntent.self, provider: Provider()) { entry in
        WatchComplicationEntryView(entry: entry)
            .containerBackground(.fill.tertiary, for: .widget)
    }
}

内容的提问来源于stack exchange,提问作者Kin Kaze

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 14:02:02