Post

Replies

Boosts

Views

Activity

Reply to How to debug Quick Look Preview Extension
It might be me - most likely it is - but I'm not able to debug my macOS Preview extensions either: I launch the app with the embedded appex from Xcode in debug mode. When trying to attach to the appex process the following error is reported: Domain: IDEDebugSessionErrorDomain Code: 6 Failure Reason: Ensure “AppName Preview” is not already running, and matthias has permission to debug it. User Info: {... } -- System Information macOS Version 15.4.1 (Build 24E263) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-05-12T14:07:14+02:00 I'm using a standard user account (no admin) and might miss some obvious steps. Can someone detail the steps to debug a Preview (or Thumbnail) extension with Xcode 16? For legacy Quick Look plugins I was using "qlmanage", but that's not working on extensions... All the best, Matthias
Topic: App & System Services SubTopic: General Tags:
May ’25
Reply to StoreKit2 - Maintain property of purchased products
Problem solved! I created a small sample project with a similar construction which just worked: Even async functions could access the class property, while my StoreManager received the following error: Passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure. By defining StoreManager class as a @MainActor, access to the mentioned property is possible across threads. All asynchronous / delaying work is done in threads, so I'm fine with forcing the StoreManager to the main thread, no performance impact can be observed. I assume (!) my sample code was just working as its functions were located in a UIViewController, residing on the main thread anyway. But that's only an (educated) guess...
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’25
Reply to StoreKit2 - Maintain property of purchased products
Hi Quinn, [quote='820522022, DTS Engineer, /thread/772090?answerId=820522022#820522022'] It sounds like you have a mix of Swift and Objective-C, and some of those clients are in Objective-C. Is that right? [/quote] Exactly! Actually, most of those clients are currently Objective-C classes because StoreKit2 as Swift-only is the main reason to migrate StoreManager. I totally agree to your mention of a "snapshot" - that's what I meant when calling the array a kind of cache, for the lack of better words: It only provides the "point-in-time" state of purchased products, and all clients are notified via NSNotificationCenter when their data was updated. Access to the array property is always in sync calls without blocking / waiting for any asynchronous call to finish.
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’25
Reply to QLSupportedContentTypes cannot contain system-supported types (UTIs)
Just to close this thread: DTS has confirmed the mentioned behavior and there is no solution. Currently, system-wide default UTIs are given priority - a different approach might be to prefer UTIs defined by installed apps. A bug report is required to request an architectural change - how likely this might be. I won't pursuit further as I've filed a very similar request a decade ago regarding macOS...
Topic: App & System Services SubTopic: Core OS Tags:
Feb ’24
Reply to XCode 14.3, issue with switching simulators
I have a related issue which just drives me nuts: For all my iOS projects only simulators running iOS 16.4 are listed as Run Destinations ... although I've installed the iOS 13 simulator and corresponding entries are listed under "Devices & Simulators". I've toggled "Show run destination" from "Automatic" to "Always" with no avail. Deployment target is e.g. iOS 13, and I'm running Xcode Version 14.3 (14E222b). As a current bypass I'm booting up the simulator manually and install apps by "xcrun simctl install booted <path to signed .app>" to allow some basic testing, but that's no sustainable solution. Any help is much appreciated! Mattes
May ’23
Reply to No MAS receipt after exit(173)
Thanks for your reply, Rich, really much appreciated! Providing a freemium app I'm fine with removing the receipt validation at launch. IAP processing is handling a missing receipt now gracefully like no purchase (doing nothing), and the "Restore Purchases" option pulls the receipt ... so I'm good for now. Nevertheless it has a smell that the sandbox environment is not acting like production, and testing cannot be done with full code coverage. In addition - as Brigitte mentioned - the exit(173) is still documented as the proposed step when no receipt is present - especially to check for a legit app at launch. DCAppAttestService cannot cover this for existing apps with support of older macOS versions (like mine).
Jun ’22