Post

Replies

Boosts

Views

Activity

watchOS app gets killed by filecoordinationd when in Always on mode
Hi, I have a watchOS app which is able to control Sonos speakers. So people set it to stay active for 1 hour. Unfortunately, the system kills the application every time after 5 to 15 min. I have made many system diagnosis and the pattern is always the same. Carousel decides that the app must be suspended. runnungboardd suspends the app. filecoordinationd kills with SIGKILL because it detected it has been suspended. launchd reports that the app has been killed. The issue is that I don't understand why Carousel wants to suspend the app. I have disabled all animations while the app is in Always on mode. The app does not perform any operations. If anyone has any idea on what do try, I would be glad for help. Here are some of the related logs. There are thousands around that but I could not deduce anything useful from them. The app gets suspended and then the filecoordinationd decides to kill it. But why is it suspended ? Just before, the app invalidates the timelines. But the timelines here are from the Backlight service. debug 2024-05-11 10:19:47.116194 +0200 WatchSonos WatchKit Extension 0x16d57dd0 invalidateAllTimelinesForReason:Host update. for environment:de.heinrich.alexander.WatchSonos.watchkitapp default 2024-05-11 10:19:47.116285 +0200 WatchSonos WatchKit Extension [(FBSceneManager):de.heinrich.alexander.WatchSonos.watchkitapp] Sending action(s): BLSInvalidateFrameSpecifiersAction Here an error occurs when setting the darwin gpu. This could be related default 2024-05-11 10:19:47.176223 +0200 runningboardd [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1706] Shutdown sockets (ALL) default 2024-05-11 10:19:47.176259 +0200 runningboardd [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1706] Set darwin role to: None default 2024-05-11 10:19:47.176264 +0200 runningboardd 1706 Set Darwin GPU to "deny" error 2024-05-11 10:19:47.176292 +0200 runningboardd 1706 setGPURole failed with result = e00002c7 Here the carousel requests suspension which then later performed by the runningoardd default 2024-05-11 10:19:47.177176 +0200 Carousel [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1706] Setting process task state to: Suspended info 2024-05-11 10:19:47.177309 +0200 Carousel Client requesting suspension of PID:1706 Name:<redacted> info 2024-05-11 10:19:47.177407 +0200 Carousel Update delivered for [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1706] with taskState 3 Suspending the process default 2024-05-11 10:21:13.851752 +0200 runningboardd [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1707] Suspending task. info 2024-05-11 10:21:13.851963 +0200 runningboardd Process: [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1707] has changes in inheritances: {( <RBSInheritance| environment:UIScene:@com.apple.frontboard.systemappservices/FBSceneManager:de.heinrich.alexander.WatchSonos.watchkitapp name:com.apple.frontboard.visibility origID:74-186-52947 payload 646688203>, <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-53033 0> )} info 2024-05-11 10:21:13.852269 +0200 runningboardd Current inheritances: {( <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-53032 0>, <RBSInheritance| environment:UIScene:@com.apple.frontboard.systemappservices/FBSceneManager:de.heinrich.alexander.WatchSonos.watchkitapp name:com.apple.frontboard.visibility origID:74-186-52947 payload 646688203>, <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-52948 0>, <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-53033 0> )} default 2024-05-11 10:21:13.852375 +0200 runningboardd Process: [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1707]: Sending inheritance changeset: <RBSInheritanceChangeSet| gained:{( )} lost:{( <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-53032 0>, <RBSInheritance| environment:(none) name:com.apple.frontboard.visibility origID:74-186-52948 0> )}> default 2024-05-11 10:21:13.852794 +0200 runningboardd [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1707] Shutdown sockets (SVC) default 2024-05-11 10:21:13.852829 +0200 runningboardd [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1707] Set darwin role to: None Killing the process: default 2024-05-11 10:19:48.441773 +0200 filecoordinationd Detected process suspension: 1706 info 2024-05-11 10:19:48.441776 +0200 filecoordinationd Update delivered for [app<de.heinrich.alexander.WatchSonos.watchkitapp((null))>:1706] with taskState 4 default 2024-05-11 10:19:48.441776 +0200 filecoordinationd Claim 562AB55E-CE67-46FA-A080-798F89013643 observed suspension of client with 1706 error 2024-05-11 10:19:48.444295 +0200 filecoordinationd SimulateCrash() on another process is not supported default 2024-05-11 10:19:48.444361 +0200 filecoordinationd Claim 562AB55E-CE67-46FA-A080-798F89013643 was revoked Reporting the kill default 2024-05-11 10:19:48.455485 +0200 launchd exited due to SIGKILL | sent by filecoordinationd[316], ran for 7913ms
0
0
362
May ’24
os_log not showing in Xcode 15 Console (watchOS, watch Simulator)
Hi, I just realized that all logs from the watchOS 10 simulator are not showing in the Xcode 15 console. When I run the same code to log on the iOS simulator the output is showing as expected. Here's my sample code os_log("Test OSLog", type: .debug) os_log(.debug, "Test OSLog 2") if #available(watchOS 7.0, *) { Logger(subsystem: "Test", category: "Test").debug("Test Logger OSLog") } None of the log functions above leads to any output in the console window in Xcode. Did anyone find a solution for that? I did not find anything about it so far in any other posts. I'm still on the last Beta, but will update to RC soon.
2
0
1.6k
Sep ’23
App crashes only watchOS 6 before launching
Here's what happens: I install the app by updating the iOS companion app (debugging does not seem to work on Xcode 14) I launch the app, the spinner around the app icon is shown The app crashes and closes The crash reports are empty I have an app that runs back to watchOS 6, in an update in November I introduced something that now causes a crash on watchOS 6. That was also the first update I uploaded with the watchOS 9 SDK. It took me a while to get hold of an Apple Watch Series 2, since the issue is not reproducible in the watchOS simulator. I guess that some library is loaded that should not be loaded. I verified all linked frameworks and all those which are not available on watchOS 6, are marked as weak. Here's the crash report that I can get on the connected iPhone: {"bug_type":"109","os_version":"Watch OS 6.3 (17U208)","build_version":"1","timestamp":"2023-05-05 03:48:22.00 +0200","app_name":"... WatchKit Extension","bundleID":"xyz.redacted....","incident_id":"65713574-8B62-460F-B888-5883BE6E722E","name":"... WatchKit Extension","is_first_party":0,"app_version":"3.0","share_with_app_devs":1,"slice_uuid":"d19f4d3c-f36f-342a-a5df-55697c51b6c7","adam_id":0} Incident Identifier: 65713574-8B62-460F-B888-5883BE6E722E CrashReporter Key: a35b48fb320eafcf397ca73c04d9c4c855507a00 Hardware Model: Watch2,4 Process: ... WatchKit Extension [894] Path: /private/var/containers/Bundle/Application/2E5E3894-A93C-412C-A518-7B3C73B42E61/... WatchKit App.app/PlugIns/... WatchKit Extension.appex/... WatchKit Extension Identifier: xyz.redacted.....watchkitapp.watchkitextension Version: 1 (3.0) Code Type: ARM (Native) Role: Foreground Parent Process: launchd [1] Coalition: xyz.redacted.....watchkitapp.watchkitextension [438] Date/Time: 2023-05-05 03:48:22.0871 +0200 Launch Time: 2023-05-05 03:48:21.0000 +0200 OS Version: Watch OS 6.3 (17U208) Release Type: User Baseband Version: n/a Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x89248914 Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [894] Highlighted by Thread: 0 Backtrace not available Unknown thread crashed with ARM Thread State (32-bit): r0: 0x62070f70 r1: 0x20ac4f70 r2: 0x82b13dc1 r3: 0x00000000 r4: 0x62070f70 r5: 0x0015c000 r6: 0x27ca7224 r7: 0x27ca6288 r8: 0x890ec914 r9: 0x01810034 r10: 0x27ca6390 r11: 0x0180efe0 ip: 0x0180ef98 sp: 0x27ca6250 lr: 0x01b8b385 pc: 0x01b8b386 cpsr: 0x00000030 Binary images description not available Error Formulating Crash Report: Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯ EOF Best, Alex
2
0
744
May ’23
MusicKit - Search Apple Music Catalog without user authorization
I want to use the Apple Music API to get album artwork for songs playing on the radio. The API seems to be easy and straightforward (for web and app). The documentation says that we need to request user authorization only if we want to access their library. All I want to do is to perform a simple search with the provided terms. I tried using the MusicCatalogSearchRequest using this code:         var songRequest = MusicCatalogSearchRequest(term: song, types: [Song.self])         songRequest.limit = 1         let response = try await songRequest.response()         guard let url = response.songs.first?.artwork?.url(width: width, height: height) else {             throw RadioImageError.notFound         }         return url I get the following error in the logs [DataRequesting] Failed to fetch current country code because the music authorization status is set to .notDetermined. Please make sure to request authorization for your app to access the user's Apple Music data using MusicAuthorization.request(). I am not able to supply the store front otherwise. Then I tried constructing the URL myself and then calling MusicDataRequest. I only get a similar error, that the user needs to authorize access first. And I added Music as a service to my bundle identifier. All the best, Alex
2
0
1.3k
Dec ’22
How to signal errors / failures in App Intents?
Hello, the new AppIntents allow a simple code-driven implementation for Siri Shortcuts. In the perform() function we need to return some IntentResult or throw an error if something went wrong. My question now is: How do I throw an error that can then be inspected by the user? Let's say the user wants to interact with a CoreData object that he has deleted earlier. Now he/she runs the shortcut and it must fail, because the object is not available. I tried to implement a custom LocalizedError, but in the Shortcuts app I only get an error message telling me something about an unknown error. The description text is not shown in Shortcuts. Feedback ID: FB11434135 Kind regards Alex
1
1
3k
Sep ’22
App Intents not discovered by iOS 16 Beta 1
Hi, I tried to implement the new AppIntents to replace some old shortcuts. I followed the sessions and their examples on how they are implemented. Unfortunately, I have not been able to get an App Intent into the Shortcuts App. I tried it on different apps, new projects and tried multiple changes to the intents. Is there something that I'm missing or is this just a bug in Beta 1? Here's my sample code: import AppIntents struct TestIntent: AppIntent {     static var title: LocalizedStringResource = "Test"     static var description: IntentDescription? = IntentDescription("Test description")          func perform() async throws -> some IntentPerformResult {         .finished(value: "Test")     } } I filed a feedback for this issue: FB10102293 All the best, Alex
7
2
2.6k
Jun ’22
Does Always-on screen require watchOS 8 as a minimum deployment target?
I just updated my app for the always-on screen and watchOS 8. I mainly used the simulator while testing, but when I tested the app on the device the always-on screen behavior the same as for watchOS 7. When I updated my minimum deployment target to watchOS 8 the always-on screen was working. Is this feature not backwards compatible at all? Does it require the app to be compiled for watchOS 8 or is there any option to support watchOS 6 & 7 as well? I used Xcode 13 RC for testing this. In the article Designing Your App for the Always On State it states: Apps compiled for watchOS 8 and later have Always On enabled by default. You can disable this feature by setting the WKSupportsAlwaysOnDisplay key to false in the WatchKit Extension’s Info.plist file. Users can also disable Always On for the entire device or on a per-app basis by choosing Settings > Display & Brightness > Always On. It could be interpreted as: It needs watchOS 8 as a deployment target and in it works when you use Xcode 13 with the watchOS 8 toolchain
2
0
1.6k
Sep ’21
SwiftUI View "isPlaceholder" not available in current build
Hey, I just cam across the WidgetKit Code along and the Apple engineer uses a modifier named isPlaceholder(true) This creates a nice looking view for the Widget placeholders. The complete sample code is: struct PlaceholderView : View {     var body: some View {         AvatarView(.panda)             .isPlaceholder(true)     } } On the current Xcode 12 this API is not available as it looks and the documentation does not mention it as well. Will it be part of a future beta? Kind regards
2
0
1.2k
Jun ’20