Conditionally Migrate WatchOS 10 users ONLY to WidgetKit

I'm looking to migrate my users ClockKit complications to WidgetKit in my next app update. I can only do this for WatchOS 10 users because the APIs are too limited for WatchOS 9 (eg. Widget corner round text not available). But I do need to do this for WatchOS 10 users in order to get in the Smart Stack.

When I tried to mark my getWidgetConfiguration method in my ComplicationController.swift with:

@available(watchOS 10.0, *)

it complains and says: Protocol 'CLKComplicationWidgetMigrator' requires 'getWidgetConfiguration(from:completionHandler:)' to be available in watchOS 9.0 and newer

I then tried modifying my WidgetKit extension to only support WatchOS 10. This seems to work for a while but at some point WatchOS 9 devices still try the migration and crash with symbolNotFound DYLD issues for the WidgetKit extension which shouldn't even be embedded in the WatchOS 9 builds! (all visible in iPhone Analytics data crashes)

So I'm not sure what else to try. I've researched a lot in docs etc... but can find no official way to achieve this.

Accepted Reply

The circumstances around what you're seeing with these crash reports uncovered multiple issues present in builds of watchOS 9, and also early versions of watchOS 10, and the source of the issue was likely triggered when watchOS updated between watchOS versions with your app already installed.

The complete set of issues is resolved with the watchOS 10.2 beta that is now available. Upgrading to watchOS 10.2 is the best path so you no longer encounter these issues.

If you remain on watchOS 9 as part of testing your app, you can remove and reinstall your app as a workaround. For any of your customers using your app on watchOS 9, you can provide an update to your app, as the process of installing the update will also correct the issue.

  • This is great news. I would just like to clarify one part of this. Specifically, your last statement, providing an update to my app for customers on WatchOS 9 will resolve the issue.

    Does this need to be built with a specific version of Xcode or the SDKs? Only because I've done an update within the past month and am still seeing the issue for WatchOS 9 users. Or is it part of one of the latest WatchOS 9.6.X updates? (Which if it is I can direct customers to it)

  • A reinstall or update of the app (with no changes to the watchOS version) should mitigate the issue. If a user updates watchOS, then the issue may reappear, until the point where the installed watchOS is watchOS 10.2. If your app normally has a steady stream of updates, the App Store's installation of those app updates will mitigate how often you can reproduce the issue as people upgrade watchOS versions.

Add a Comment

Replies

I was dealing with the same problem but in my case the cause was somewhere else. Besides adding the widget extension, I also migrated to a single watchOS project target (there was a separate WatchKit extension before Xcode 14) and that caused the problem. The problem is described here https://developer.apple.com/forums/thread/729599 When I tried it without migrating to a single target, complications stayed untouched and worked correctly after updating the app on watchOS 9 and were successfully migrated on watchOS 10.

  • Ahh... That was my post too! 😱 I migrated to a single target a year back so I don't think this is my issue unfortunately.

Add a Comment

Still seeing the issue with build from the latest Xcode 15 Beta 8 and devices running WatchOS 9.6.X😕

  • And now with iOS 17 & WatchOS 10 release....

Add a Comment

Crash log from my widget extension on watchOS 9 (but the extension deployment target is watchOS 10). The missing symbol is _$s21DeveloperToolsSupport13ColorResourceV4name6bundleACSS_So8NSBundleCtcfC.

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: _$s21DeveloperToolsSupport13ColorResourceV4name6bundleACSS_So8NSBundleCtcfC
Referenced from: <D018EC5D-C49D-387D-8E1D-52FBA6099567> /***.app/PlugIns/WatchComplications.appex/WatchComplications (built for watchOS 10.0 which is newer than running OS)
Expected in:     <3DEFD17C-9665-3448-964C-B3218FDE4DF9> /System/Library/Frameworks/DeveloperToolsSupport.framework/DeveloperToolsSupport
(terminated at launch; ignore backtrace)

Triggered by Thread:  0


Thread 0 Crashed:
0   dyld                          	0x000000006954ec5c __abort_with_payload + 8
1   dyld                          	0x000000006955a31c abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:102)
2   dyld                          	0x000000006955a34c abort_with_payload + 12 (terminate_with_reason.c:124)
3   dyld                          	0x00000000694f4740 dyld4::halt(char const*) + 332 (DyldProcessConfig.cpp:2758)
4   dyld                          	0x00000000694f2be0 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3484 (dyldMain.cpp:0)
5   dyld                          	0x00000000694f176c start + 1872 (dyldMain.cpp:1107)
Post not yet marked as solved Up vote reply of Gong Down vote reply of Gong

And so many more from me:


Translated Report (Full Report Below)

Hardware Model:      Watch6,18
Identifier:          Sim.HeartRate.watchkitapp.WatchWidgetKitExtension
AppVariant:          1:Watch6,18:9
Code Type:           ARM64_32 (Native)
Role:                Unspecified
Parent Process:      launchd [1]

Date/Time:           2023-09-24 20:11:54.9181 -0500
Launch Time:         2023-09-24 20:11:54.0000 -0500
OS Version:          Watch OS 9.6.3 (20U502)
Release Type:        User
Baseband Version:    5.04.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE05ShowsE13BackgroundKeyVAA0cI0ADMc
Referenced from: <7BA88B36-F66D-3527-9C49-CE859AB79FCB> /Volumes/VOLUME/*/<APP_NAME>.app/PlugIns/<APP_NAME> Watch WidgetKit Extension.appex/<APP_NAME> Watch WidgetKit Extension **(built for watchOS 10.0 which is newer than running OS)**
Expected in:     <15E32CD8-4D76-3F93-9881-7F8FDBB8A288> /System/Library/Frameworks/WidgetKit.framework/WidgetKit
(terminated at launch; ignore backtrace)

Triggered by Thread:  0

Thread 0 Crashed:
0   dyld                          	        0x6dba6c5c 0x6db48000 + 388188
1   dyld                          	        0x6dbb231c 0x6db48000 + 434972
2   dyld                          	        0x6dbb234c 0x6db48000 + 435020
3   dyld                          	        0x6db4c740 0x6db48000 + 18240
4   dyld                          	        0x6db4abe0 0x6db48000 + 11232
5   dyld                          	        0x6db4976c 0x6db48000 + 5996

Feedback filed 1st August: FB12818485

Also reported: FB13213919

Still happening for devices running WatchOS 9.6.2 & 9.6.3 Any update on this Apple?

  • Have you tried DTS about this? I am also wondering if I can do this. Also, thanks for your other posts about complications being broken after moving to single-target… I’ve been going through the same thing after making that change.

  • I did try a DTS (3791480) and never got a response after an initial further debugging email.... replied several times too and was charged for the DTS

Add a Comment

Just to share that the crash is a known issue, and the watchOS engineering is actively working on that.

  • 👍

Add a Comment

The circumstances around what you're seeing with these crash reports uncovered multiple issues present in builds of watchOS 9, and also early versions of watchOS 10, and the source of the issue was likely triggered when watchOS updated between watchOS versions with your app already installed.

The complete set of issues is resolved with the watchOS 10.2 beta that is now available. Upgrading to watchOS 10.2 is the best path so you no longer encounter these issues.

If you remain on watchOS 9 as part of testing your app, you can remove and reinstall your app as a workaround. For any of your customers using your app on watchOS 9, you can provide an update to your app, as the process of installing the update will also correct the issue.

  • This is great news. I would just like to clarify one part of this. Specifically, your last statement, providing an update to my app for customers on WatchOS 9 will resolve the issue.

    Does this need to be built with a specific version of Xcode or the SDKs? Only because I've done an update within the past month and am still seeing the issue for WatchOS 9 users. Or is it part of one of the latest WatchOS 9.6.X updates? (Which if it is I can direct customers to it)

  • A reinstall or update of the app (with no changes to the watchOS version) should mitigate the issue. If a user updates watchOS, then the issue may reappear, until the point where the installed watchOS is watchOS 10.2. If your app normally has a steady stream of updates, the App Store's installation of those app updates will mitigate how often you can reproduce the issue as people upgrade watchOS versions.

Add a Comment

@edford  Just an update to provide some new context with the recent WatchOS 10.3 release etc...

I've done several updates to my app in the past few weeks and I still have issues from users running WatchOS 10.2/10.3 and WatchOS 9.6

For the WatchOS 9.6.3 users, I'm still seeing the exact same crashes as the one I submitted from September 23.

For the WatchOS 10 users, I only see crash reports for users on 10.0, however I still get problems reported from users mostly around complications disappearing from their watch face. This is even from users running WatchOS 10.2, too early to say for 10.3

Should I reopen a bug report / feedback on this or is there something I'm still missing to avoid all this?

  • @edford @Gong Just another update from me. With Xcode 15.3 and submitting an app update for all users I'm still seeing hundreds or even thousands of the same crash for users on WatchOS 9.6.3

    I really don't believe this issue has been fixed, is there anything else that can be done to get this looked at. I've updated the feedback

Add a Comment