Posts

Post not yet marked as solved
1 Replies
224 Views
Hi, now with the Vision Pro released for US customers, I was wondering if non-US developers could buy a development kit (basically a Vision Pro but shipped worldwide.) Similar to what Apple has offered when the Apple Watch has been released. Alex
Posted
by AlexSFD.
Last updated
.
Post marked as solved
2 Replies
1k Views
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.
Posted
by AlexSFD.
Last updated
.
Post marked as solved
2 Replies
489 Views
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
Posted
by AlexSFD.
Last updated
.
Post not yet marked as solved
1 Replies
894 Views
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
Posted
by AlexSFD.
Last updated
.
Post marked as solved
1 Replies
2.2k Views
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
Posted
by AlexSFD.
Last updated
.
Post not yet marked as solved
3 Replies
2.1k Views
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
Posted
by AlexSFD.
Last updated
.
Post marked as solved
2 Replies
1.3k Views
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
Posted
by AlexSFD.
Last updated
.
Post marked as solved
2 Replies
999 Views
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
Posted
by AlexSFD.
Last updated
.