Post

Replies

Boosts

Views

Activity

Reply to Xcode no longer supports temporarily using a local SwiftPM package?
That works, but two convenience features seem to be gone. The first is that replacing a package was a matter of dragging the new package Xcode's project navigator, and it would automatically override the current definition (no need to delete) and when you were done, you could remove it, and it would automatically revert back to the configuration you had. The workaround requires the original package definition to be entered again (was it a hash, was it a version range, was it just a branch?)
Jun ’24
Reply to Using NSFileProviderReplicatedExtension on iOS
Mhm, I just noticed something that I missed previously, which might be the whole reason for the above not working. The call to NSFileProviderManager.add (domain) is returning an error NSPOSIXErrorDomain Code=1 "Operation not permitted", but still manages to add my file provider to Files. And shortly after the console shows: [unspecified] container_create_or_lookup_app_group_path_by_app_group_identifier: client is not entitled I have made sure they both are on the same app group (had to add the app group manually to the containing application, and it matches the extension provider).
Jul ’22
Reply to Using NSFileProviderReplicatedExtension on iOS
Thank you, this did indeed get me over this odd crash. I have run into another issue, and I can not seem to be making any progress, despite my attempts at single-stepping into the FileProvider framework with little luck. I explored a couple of options: Default scaffolding I took the default scaffolding produced by Xcode, and merely added the NSFileProviderManager.add on my main application. In this scenario, when I try to run the extension, my constructor required init(domain: NSFileProviderDomain) is never invoked. But I do get the following messages on the console: 2022-07-13 09:48:41.519607-0400 Gooble[11689:275870] [org.tirania.test.swiftui.Third.Gooble/N{35}r] [ERROR] Creating internal error for "itemForItemID", original error was: NSError: FP -1000 "You need to authenticate before accessing this item." 2022-07-13 09:48:41.524792-0400 Gooble[11689:275869] [org.tirania.test.swiftui.Third.Gooble/N{35}r] [ERROR] Creating internal error for "fetchAndStartEnumeratingWithSettings", original error was: NSError: FP -1000 "You need to authenticate before accessing this item." I have tried to use breakpoints and abort() everywhere to try to catch this thing, I tried using dtrace after disabling system integrity protection, and looked the Console logs and nothing seems unusual about it: default Gooble Hello, I'm launching as euid = 501, uid = 501, (persona not available) default Gooble Initializing connection default Gooble Removing all cached process handles default Gooble Sending handshake request attempt #1 to server default Gooble Creating connection to com.apple.runningboard default Gooble Handshake succeeded default Gooble Identity resolved as xpcservice<org.tirania.test.swiftui.Third.Gooble([osservice<com.apple.FileProvider>:11146])> default Gooble Bootstrapping; Bootstrap complete. Ready for handshake from host. default Gooble [u 74075900-B5F2-4A1A-8E9F-0FE0A8E0380C] [(null)((null))] Prepare received as euid = 501, uid = 501, (persona not available) default Gooble [u 9207AE37-8A25-49EB-A34A-E08DFB9A197A] [org.tirania.test.swiftui.Third.Gooble(1.0)] Set sole personality. default Gooble [u 9207AE37-8A25-49EB-A34A-E08DFB9A197A] [org.tirania.test.swiftui.Third.Gooble(1.0)] Begin using received as euid = 501, uid = 501, (persona not available) default Gooble +[NSExtensionContext _allowedItemPayloadClasses] not implemented. Setting the allowed payload classes to {( NSO )} default Gooble Start service name com.apple.spotlight.IndexDelegateAgent error Gooble [ERROR] Creating internal error for "itemForItemID", original error was: NSError: FP -1000 "You need to authenticate before accessing this item." error Gooble [ERROR] Creating internal error for "fetchAndStartEnumeratingWithSettings", original error was: NSError: FP -1000 "You need to authenticate before accessing this item." default Gooble [u 9207AE37-8A25-49EB-A34A-E08DFB9A197A] [org.tirania.test.swiftui.Third.Gooble(1.0)] Removed sole personality. default Gooble [u 9207AE37-8A25-49EB-A34A-E08DFB9A197A] [org.tirania.test.swiftui.Third.Gooble(1.0)] host connection from pid 11146 invalidated Changing the base class I modified the sample to subclass NSFileProviderExtension instead of NSObject, and with this, my breakpoint on the constructor is hit, but still, none of my methods are called. The Xcode console shows a similar result to the previous version - makes me suspect that there is something missing that prevents my code from being invoked that is not hooked up. This was the reason I started to use dtrace in the first place, as the "The file couldn't be opened" sounded like a good candidate to find what was missing, but I can not find any suspicious attempts to access the file system in that case: 2022-07-13 09:58:25.646358-0400 Gooble[12084:288057] [org.tirania.test.swiftui.Third.Gooble/N{35}r] [ERROR] Creating internal error for "itemForItemID", original error was: NSError: Cocoa 256 "The file couldn’t be opened." 2022-07-13 09:58:25.652024-0400 Gooble[12084:288059] [org.tirania.test.swiftui.Third.Gooble/N{35}r] [ERROR] Creating internal error for "fetchAndStartEnumeratingWithSettings", original error was: NSError: Cocoa 3328 "The requested operation couldn’t be completed because the feature is not supported." The output from the Console app: default Gooble Hello, I'm launching as euid = 501, uid = 501, (persona not available) default Gooble Initializing connection default Gooble Removing all cached process handles default Gooble Sending handshake request attempt #1 to server default Gooble Creating connection to com.apple.runningboard default Gooble Handshake succeeded default Gooble Identity resolved as xpcservice<org.tirania.test.swiftui.Third.Gooble([osservice<com.apple.FileProvider>:11146])> default Gooble Bootstrapping; Bootstrap complete. Ready for handshake from host. default Gooble [u C81493C9-173C-43F5-8C30-BF24B6AB36F7] [(null)((null))] Prepare received as euid = 501, uid = 501, (persona not available) default Gooble [u 118918F0-BAB7-4945-9770-C0AD353BF587] [org.tirania.test.swiftui.Third.Gooble(1.0)] Set sole personality. default Gooble [u 118918F0-BAB7-4945-9770-C0AD353BF587] [org.tirania.test.swiftui.Third.Gooble(1.0)] Begin using received as euid = 501, uid = 501, (persona not available) default Gooble +[NSExtensionContext _allowedItemPayloadClasses] not implemented. Setting the allowed payload classes to {( NSObject )} default Gooble NotifyToken::RegisterDispatch(com.apple.LaunchServices.database) fired for session key LSSessionKey(system: 0 uid: 501) default Gooble Start service name com.apple.spotlight.IndexDelegateAgent error Gooble [ERROR] Creating internal error for "itemForItemID", original error was: NSError: Cocoa 256 "The file couldn’t be opened." error Gooble [ERROR] Creating internal error for "fetchAndStartEnumeratingWithSettings", original error was: NSError: Cocoa 3328 "The requested operation couldn’t be completed because the feature is not supported." default Gooble [u 118918F0-BAB7-4945-9770-C0AD353BF587] [org.tirania.test.swiftui.Third.Gooble(1.0)] Removed sole personality. default Gooble [u 118918F0-BAB7-4945-9770-C0AD353BF587] [org.tirania.test.swiftui.Third.Gooble(1.0)] host connection from pid 11146 invalidated
Jul ’22