Post

Replies

Boosts

Views

Activity

[macOS Sequoia] Sudden surge of "failed to retrieve app-scope key" logs and failed URL security scoping
Hello, with macOS Sequoia I've observed a sudden, substantial surge in reports about the Mac App Store version of my app Yoink no longer accepting files dropped to it, with the following message being logged in Console.app: 08:16:05.516307+0200 Yoink ---Yoink Error--- Could not create NSURL bookmark for /Users/<redacted>/Downloads/<redacted>/<redacted>.txt err: Error Domain=NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" UserInfo={NSDebugDescription=Failed to retrieve app-scope key} The code line that causes this is the following: NSData *bmData = [fileURL bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:nil error:&err]; Sometimes a relaunch of Yoink, or a restart of the Mac resolves the issue, but only temporarily. Other times, even a restart doesn't work, but running tccutil reset All at.EternalStorms.Yoink in Terminal and then restarting the Mac works (again, temporarily). The trial version and Setapp versions of my app both work as expected, however. I myself cannot reproduce this issue, so any pointers would be greatly appreciated. (This might be considered a follow up to https://developer.apple.com/forums/thread/46583 , years back) Thanks a ton, – Matthias
4
1
422
Oct ’24
[macOS] Failed to perform in-line receipt renewal for application at path <path>
Hello, I have a customer who keeps getting an "app is damaged" error for a freshly downloaded app from the Mac App Store. The logs show the following lines: standard 12:58:40.390872+0200 storeuid Receipt Validation (at.EternalStorms.Yoink) Signature Check: PASS Bundle ID Check: PASS Bundle Version Check: PASS GUID Check: PASS Expiration Check: PASS standard 12:58:40.391649+0200 storelegacy StoreLegacy: Failed to perform in-line receipt renewal for application at path /Applications/Yoink.app : '(null)' The Mac in question is running macOS 12 Monterey - curiously, the customer has another Mac with that same system version and there it works just fine. What can be done to make this work again? Thank you, – Matthias
0
0
197
Oct ’24
[macOS] AppTransaction questions (internet connection requirement)
Hello, I hope to find out more about how AppTransaction works on macOS, specifically about its internet connection requirements: if I use this to validate that the app is a legit purchase from the Mac App Store, I would not want it to have an always-on requirement just to validate. Does AppTransaction require the user to always be online for AppTransaction.shared ? When an app is downloaded from the Mac App Store, is the data needed for AppTransaction automatically embedded during that download, or is that data downloaded upon first launch of the app, therefore requiring an internet connection at launch time? Once the data/receipt has been downloaded by AppTransaction, is it cached until the app's next update, or is it cleared at some time during the version's life and needs to be re-downloaded, therefore requiring an internet connection at launch? Where is that receipt/data stored? Also, if you don't mind me sneaking in this non-related but sort of related question, in terms of receipt validation: Does macOS Sequoia's MAC address rotation feature affect receipt validation in any way when using IOKit? Thank you kindly, – Matthias
0
1
208
Oct ’24
[Mac App Store] Sudden increase in "<App> is damaged and can't be opened" errors when launching Mac App Store app
Hi, I've recently observed a sudden increase in support requests for one of my apps on the Mac App Store, reporting the error " is damaged and can't be opened. Please re-download it from the Mac App Store", all on different systems: macOS 12, macOS 13, and macOS 15 Sequoia. Re-downloading does not resolve the issue most of the time. One user reported that being connected to the internet resolved it - perhaps this is an OCSP issue again? I myself cannot reproduce this issue. Has there been a change in code-signing recently? Have some certificates changed? Anything else I should be aware of? What is the best course of action to have users take who experience this, when re-downloading the app from the Mac App Store does not work? Thank you, – Matthias
8
1
477
Oct ’24
[macOS Sequoia] Using RegisterEventHotkey with option and shift modifiers doesn't working anymore
Hello. In my app, I use RegisterEventHotkey to implement global keyboard shortcuts to trigger actions. Up until macOS Sequoia, I was able to use a keyboard shortcut with option and shift as the modifiers, like option shift 2 (⌥ ⇧ 2). Now, on macOS Sequoia, using RegisterEventHotkey to register a hotkey with those exact modifiers (option and shift), regardless of the key, fails with the error -9868 (eventInternalErr). Is this a documented and wanted change, or is this a bug? Other modifier keys (just command, command option, command shift, command control, control shift, etc), all work. Any insight into this would be appreciated. (Feedback filed: FB15163561) Thank you, Matthias
15
9
4.8k
Sep ’24
Restricting available units for a Measurement<UnitDuration> @Parameter
Hello, I'm preparing my app Tameno for iOS 18, adding a couple of Control Center widgets. One of them allows users to select their favorite interval. But in the context of my app, only seconds and minutes make sense as a unit value - I don't need milli-pseconds, nor hours. Is there a way restrict these available options that come from a ControlConfigurationIntent? @available(iOS 18.0, iOSApplicationExtension 18.0, *) struct TamenoFavoriteIntervalControlWidgetSetupIntent : ControlConfigurationIntent { static let title: LocalizedStringResource = "cw_FavoriteIntervalSetup" static let isDiscoverable: Bool = false @Parameter(title: "cw_IntervalParameter", defaultValue: 5.0, defaultUnit: .seconds, supportsNegativeNumbers: false) var interval: Measurement<UnitDuration>? @MainActor func perform() async throws -> some IntentResult { .result() } } I am able to restrict it just to seconds or minutes only (by adding unit: .seconds, or unit: .minutes to the @Parameter setup), but I'd really like to offer both. Thank you, Matthias
3
0
331
Sep ’24
[macOS Sequoia b1-3] Screen recording permission for XPC service repeatedly requested
Hi, my app ScreenFloat can capture screenshots and record the screen (along with system- and microphone audio). It does this in an XPC service. On macOS Sequoia b1-3, recording does not work anymore (although permissions are granted to the app in System Preferences > Privacy & Security). Instead, I keep getting an error that my XPC service can access this computer's screen and audio. (of course, that's the point!) First of all, the screen is locked when the warning appears, clicks anywhere on the screen are not recognized. I have to hit Escape (or wait about a minute, at which point it resolves itself), to be able to click anywhere. Clicking on Continue To Allow doesn't do anything, either. The warning just re-appears every time. Do I need to add a new entitlement to my main app or the XPC service, or any new NSUsage strings to the InfoPlist.strings? How can I resolve this? Thank you, Matthias
16
1
2.4k
Jul ’24
Mac app, SwiftUI: Change Dock menu
Hello. I'm trying to change my SwiftUI Mac app icon's menu in the Dock, using the NSApplicationDelegate's applicationDockMenu(_ : ) function. However, it does not work: The delegate function is only called once, randomly after launch, and then never again, and it will not show any items in that menu I return. When I right-click the app in the Dock, only the macOS-supplied items are shown, and my App delegate function is not called. Here's the code I use inside my NSApplicationDelegate: func applicationDockMenu(_ sender: NSApplication) -> NSMenu? { let men = NSMenu() print("applicationDockMenu called") var it = NSMenuItem(title: "Test1", action: #selector(test(_:)), keyEquivalent: "") it.target = self men.addItem(it) it = NSMenuItem(title: "Test2", action: #selector(test(_:)), keyEquivalent: "") it.target = self men.addItem(it) return men } @objc func test(_ sender: NSMenuItem) { print("application dock menu custom item called") } Is there a SwiftUI modifier I should be using instead of the NSApp delegate method, or is this just not supported at this time in SwiftUI Mac apps? Thank you, - Matthias
2
1
1k
Mar ’24
[macOS Sonoma 14.4b 23E5196e] screencapture fails to capture video.
FeedbackID: FB13636921 I'm using /usr/sbin/screencapture -v -x -C -k -R 0,0,500,500 /path/to/a/movfile/in/a/folder/in/my/apps/sandbox/Group/Container in my app to allow users to capture screenshots and recordings. Screenshots keep working fine on macOS Sonoma 14.4b23E5196e, but video recordings no longer work. I'm guessing the following log output has something to do with it: default 15:01:53.151819+0100 screencapture sampleBuffer: start recording time: 3123.604833 target: 3123.474266, overshot: 0.130568 error 15:01:53.185179+0100 screencapture <private>:246:<private> Not writable url (null).!folderIsWritable == true error 15:01:53.185236+0100 screencapture <private>:50:<private> We could not create a byte stream! error 15:01:53.185252+0100 screencapture <private>:87:<private> NULL byte stream. error 15:01:53.185298+0100 screencapture <private>:3479:<private> ### Err -45, error 15:01:53.185312+0100 screencapture <private>:3814:<private> ### Err -45, error 15:01:53.185334+0100 screencapture <<<< AVCaptureMovieFileOutput >>>> Fig assert: "status == 0 " at (AVCaptureMovieFileOutput.m:2522) - CMIOFileWritingControlTokenStartWriting (err=-45) error 15:01:53.185374+0100 screencapture <private>:1885:<private> ### Err -67452, error 15:01:53.185388+0100 screencapture <private>:303:<private> FigMovieFormatFileWriter::PostProcessMovie: WriteMovie() errored!!! -67452 error 15:01:53.185476+0100 screencapture <private>:4687:<private> consolidate movie fragments err : -17913 default 15:01:53.185610+0100 screencapture <<<< AVError >>>> AVLocalizedErrorWithUnderlyingOSStatus: Returning error (AVFoundationErrorDomain / -11800) status (-45) default 15:01:53.186201+0100 screencapture didFinishRecording: No trim finish. duration: 0.000000s size: 0, error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={AVErrorRecordingSuccessfullyFinishedKey=false, NSLocalizedDescription=The operation could not be completed, NSLocalizedFailureReason=An unknown error occurred (-45), NSURL=file:///Users/eternalstorms/Library/Group%20Containers/group.com.apple.screencapture/ScreenRecordings/3ED15EE7-A814-47A7-A398-29D5A6AD03C1.mov, NSUnderlyingError=0x6000031d80c0 {Error Domain=NSOSStatusErrorDomain Code=-45 "fLckdErr: file is locked"}} error 15:01:53.186290+0100 screencapture recording failed. The operation could not be completed Are there new entitlements we need for this in our apps starting with macOS Sonoma 14.4? Or is it a bug? Calling it directly from Terminal works. Thank you, Matthias
10
0
1.5k
Feb ’24
[macOS Sonoma] screencapture CLI no longer includes DPI information
Using the screencapture CLI on macOS Sonoma 14.0 (23A344) results in a 72dpi image file, no matter if it was captured on a retina display or not. For example, using screencapture -i ~/Desktop/test.png in Terminal lets me create a selective screenshot, but the resulting file does not contain any DPI metadata (checked using mdls ~/Desktop/test.png), nor does the image itself have the correct DPI information (should be 144, but it's always 72; checked using Preview.app). I noticed a (new?) flag option, -r, for which the documentation states: -r Do not add screen dpi meta data to captured file. Is that flag somehow automatically set? Setting it myself makes no difference and obviously results in a no-dpi-in-metadata and wrong-dpi-in-image file. The only two ways I got the correct DPI information in a resulting image file was using the default options (forced by -p): screencapture -i -p, and by making the capture go to the clipboard screencapture -i -c. Sadly, I can't use those in my case. Feedback filed: FB13208235 I'd appreciate any pointers, Matthias
4
2
1.4k
Sep ’23
Has WKExtendedRuntimeSession changed the way timers work in watchOS 10?
I have a stand-alone watchOS app that starts a WKExtendedRuntimeSession and a 1-second repeating timer when a button is pressed. No CPU-intensive stuff happens during this extended (background) time. On watchOS 9, this worked perfectly until I stopped it again (or after the hour I get out of a Mindfulness Session Type has passed, and the extended runtime session expires). The screen could go dark, and the timer would keep running. On watchOS 10, I get about 50 seconds when the screen goes dark, and then the timer just stops. No delegate methods are called (i.e. no "extendedRuntimeSession...willExpire()" or "...didInvalidateWith()" is called), though. Also, the scenePhase does not change at this point, it remains at inactive. The execution just stops. When I tap the watch to turn the screen back on, the timer resumes as if nothing happened. Does anybody know what's going on here? Has something changed in WKExtendedRuntimeSessions in watchOS 10, or is it a bug? I tried removing the timer and changing it to a recursive DispatchAsync.main.asyncAfter block, but it yielded the same result.
1
0
648
Sep ’23
Xcode 13/14 Regression: Git Source Control: Cannot push, results in error "username does not match previous request"
Hi, I reported this issue a while back for Xcode 12, which I then marked as resolved because it intermittently worked: https://developer.apple.com/forums/thread/652855 However, since Xcode 13, even in Xcode 14 RC 2, Git pushing to a custom server just does not work for me at all anymore. I get the following error: An unknown error occurred username does not match previous requests (-1) Feedback ID: FB9812942 Thank you, Matthias
1
0
991
Oct ’22
Apple Archive .zlib compression algorithm unarchiving
Hello, I want to archive a folder containing files into a single file using Apple Archive. So far so good, it works as it should. Now, the documentation says: The zlib compression algorithm, which is recommended for cross-platform compression. The encoded format is the raw DEFLATE format as described in IETF RFC 1951, the following obtains the equivalent configuration of the encoder: deflateInit2(zstream,5,Z_DEFLATED,-15,8,Z_DEFAULT_STRATEGY) Thus, I'm using .zlib, because I want the archive to be unarchivable on macOS as well as other, non-Apple platforms. The thing is, I don't know what file extension to use so it is unarchivable / openable on both macOS and, say, Windows. Using .aar ("Apple Archive"), or .aea ("Apple Encrypted Archive"), it works on macOS, but I doubt those can be opened on Windows (since it's the Apple-proprietary file format). Using .zip doesn't work on macOS, so I doubt it'll work on Windows. Using .zlib doesn't work (can't be opened on macOS) Usng .z doesn't work (can't be opened on macOS) So my question is, with a folder compressed using .zlib for cross-platform, what file extension must I use for the resulting archived file so it can be opened with an unarchiving app on macOS and non-Apple platforms? Thank you for any insights, Matthias
2
0
1.9k
Aug ’22
Shutting down M1 Mac - app no longer able to extend time?
Hi all, so, in my app Transloader, when the app is terminated, I sync the Mac's "turned off" status to iCloud. This works on Intel Macs and on Apple silicon Macs when the user manually quits the app. However, on Apple silicon Macs, when the user shuts down or restarts the Mac and the app is terminated that way, the app is terminated right away (doesn't even receive the -applicationWillTerminate: call), so I'm unable to properly sync the status. This still works on Intel Macs, as far as I know. So, is there any new API to extend the Mac's shutdown a little longer to finish my sync? Currently, I use -applicationShouldTerminate:, returning NSTerminateLater, and after syncing, calling -replyToApplicationShouldTerminate:YES . Again, this works fine on Intel Macs if the user manually quits, as well as if the Intel Mac shuts down, but on Apple silicon, it only works if the user manually quits - a shutdown results in the app being terminated without even receiving a -applicationWillTerminate: call. Both NSSupportsSuddenTermination and NSSupportsAutomaticTermination are disabled in the app's Info.plist. Thank you for any insights, Matt
2
0
1.3k
Mar ’22