Hello,
I am developing a Finder plugin for a MacOS application. It was working fine during development and testing on os version 14.4. However, when I tried running the application on os version 10.15, it notworking.If I run the plugin binary directly, it will crash.
crash info:
Time Awake Since Boot: 1100 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [719]
Application Specific Information:
Configuration error: Couldn't retrieve XPCService dictionary from service bundle.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libxpc.dylib 0x00007fff71b04bfb _xpc_copy_xpcservice_dictionary.cold.1 + 14
1 libxpc.dylib 0x00007fff71af2fcd _xpc_copy_xpcservice_dictionary + 106
2 libxpc.dylib 0x00007fff71af2e27 xpc_main + 61
3 com.apple.Foundation 0x00007fff3a0a5e6f -[NSXPCListener resume] + 155
4 com.apple.pluginkit.framework 0x00007fff6258decb 0x7fff62575000 + 102091
5 com.apple.pluginkit.framework 0x00007fff6258dbf4 0x7fff62575000 + 101364
6 com.apple.pluginkit.framework 0x00007fff6258e2b2 0x7fff62575000 + 103090
7 com.apple.Foundation 0x00007fff3a11eb4c NSExtensionMain + 49
8 libdyld.dylib 0x00007fff718a5cc9 start + 1
This issue just requires creating the simplest APP project + FinderSyncExtension project in Xcode 14.4 on macOS. Set the minimum supported system to 10.15 to reproduce the issue.
How can I resolve it?
Extensions
RSS for tagGive users access to your app's functionality and content throughout iOS and macOS using extensions.
Posts under Extensions tag
194 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
macOS
MacOS 14 Apple Silicon
DESCRIPTION OF PROBLEM
GlobalProtect(GP) and AnyConnect(AC) are both VPN apps. They both create a TUN interface and set default route to this interface.
Test cases:
AC connect first and GP connect second, both work fine.
GP connect first and AC connect second, AC failed with some "route error".
Our question is why the route failed for AC if GP already set the default route? Does MacOS has some limitations for the default route?
STEPS TO REPRODUCE
GlobalProtect(GP) and AnyConnect(AC) are both VPN apps. They both create a TUN interface and set default route to this interface.
Test cases:
AC connect first and GP connect second, both work fine.
GP connect first and AC connect second, AC failed with some "route error".
I am developing a FileProvider extension on Mac. I was wondering what the most reliable way to evict a document as soon as possible after createItem is called for the respective item.
Our use-case for this is as follows:
Users can 'bulk-import' items into a FileProvider folder, and we want our application to immediately evict the item as soon as possible once the item's content is uploaded to the server. This is to save space on the user's machine.
So, what is the best way to accomplish immediate eviction after item creation?
I've tried calling evictItem from within the createItem function itself, but that yields many errors and can cause slowness.
I am developing a Mac File Provider Extension. When testing installation from-scratch, The File Provider Name does appear on the side bar. However, the text '[App Name] encountered an unexpected error. Items may be out of date .....Try Again' appears at the top of the Finder window when opening the File Provider's Domain. Along with this text, there is a persistent 'Loading...' that is displayed in the middle of the Finder view. The File Provider seems to immediately get in a bad state.
This does not happen at all during development.
I am also noticing some logs in console that indicate some sort of issue. These 3 seem to be relevant. Any ideas or insight what could be going on?
create-item(propagated:<root dbver:0 domver:<nil>>) why:itemChangedRemotely|diskImport sched:default.1717009685.233681#1717009069.3164978 error:<NSError: Cocoa 4101 "Couldn’t communicate with a helper application." Underlying={NSError: NSFileProviderInternalErrorDomain 7 "A connection to the extension “REMOVED ID” could not be made." Underlying={NSError: com.apple.extensionKit.errorDomain 2 "The operation couldn’t be completed. (com.apple.extensionKit.errorDomain error 2.)" UserInfo={(omitted)}}}}}>> → <requested:<p:root n:"i{31}e" dir child:0 m:rwxS ct:1717009068.969699 mt:1717009068.969699>> [duration 33ms44µs]
Failed to create extensionProcess for extension 'REMOVED ID' error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d28b0 {Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo=0x7fa0ce9d2900 (not displayed)}}}}}}
Launch failed with error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}
Hi
There is a critical code section between the app and its app extensions that needs to be synchronized and done atomically.
What would be a suitable solution to achieve locking and synchronization between app’s processes? Is there a way to share memory or an operation queue between the app and its app extensions?
Thank you
When using ExtensionKit, is it expected that an app would be able to open concurrent XPC connections to both an extension process (via AppExtensionProcess.makeXPCConnection) and that extension's scenes (via EXHostViewController.makeXPCConnection)?
I'm finding that if I make a connection to an extension process, communication with the process works fine until I try to make a connection to a scene in that extension ... at which point the extension receives SIGKILL and an OSLaunchdErrorDomain code 137 "Service does not support the specified action" error is logged to the console.
Similarly, if I first make one or more connections to extension scenes, communication with the scenes works fine until I try to make a connection to the extension process ... at which point the same result and error occur.
So it seems that I can either communicate with an extension process or that extension's scenes, but not both. Is this an expected limitation, or should I be able to communicate with an extension process and its scenes at the same time?
Hi,
I'm new to coding for MacOS but I'm building a Godot app that I wish to be able to have create a virtual camera on MacOS via button click.
I plan to use the GDExtension feature to interface with code for MacOS to do this. I was looking into what would be involved with this and came across the Camera Extension that can be bundled with MacOS apps that can be used to create a virtual camera.
Is it possible to bundle this extension with a library or framework that I can then interact with using C++ in a GDExtension (an external app). I realise the extensions can only be registered from within the Application folder so the assumption is that the Godot app would be installed there.
I have a Safari web extension that needs the ability to open the popup when the user interacts with a modal coming from the content script.
There is a native message handler that comes with the safari web extension when you first create it:
import SafariServices
import os.log
class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
func beginRequest(with context: NSExtensionContext) {
let item = context.inputItems[0] as! NSExtensionItem
let message = item.userInfo?[SFExtensionMessageKey]
os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@", message as! CVarArg)
let response = NSExtensionItem()
response.userInfo = [ SFExtensionMessageKey: [ "Response to": message ] ]
print("hit")
context.completeRequest(returningItems: [response], completionHandler: nil)
}
}
I have the permissions to send a native message, I've seen some examples online where you can access the SFSafariApplication module from SafariServices and open the popover. But I can't seem to access SFSafariApplication in this module.
Both view and modifier versions of the FamilyActivityPicker crash randomly when selecting some items (usually the other option) throwing these in the console:
[com.apple.FamilyControls.ActivityPickerExtension(1150.1)] Connection to plugin invalidated while in use
AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:22091 (
0 AXRuntime 0x00000001c603b0fc _AXGetPortFromCache + 800
1 AXRuntime 0x00000001c603cce0 AXUIElementPerformFencedActionWithValue + 700
2 UIKit 0x0000000230de3ec8 DDE6E0C5-2AC3-3C73-8CFE-BC88DE35BB5F + 1453768
3 libdispatch.dylib 0x0000000103ef0b98 _dispatch_call_block_and_release + 32
4 libdispatch.dylib 0x0000000103ef27bc _dispatch_client_callout + 20
5 libdispatch.dylib 0x0000000103efa66c _dispatch_lane_serial_drain + 832
6 libdispatch.dylib 0x0000000103efb408 _dispatch_lane_invoke + 408
7 libdispatch.dylib 0x0000000103f08404 _dispatch_root_queue_drain_deferred_wlh + 328
8 libdispatch.dylib 0x0000000103f07a38 _dispatch_workloop_worker_thread + 444
9 libsystem_pthread.dylib 0x00000001f0824f20 _pthread_wqthread + 288
10 libsystem_pthread.dylib 0x00000001f0824fc0 start_wqthread + 8
)
This also happens in production apps like the Opal.
The questions are:
At least how to detect it to be able to manually reload the sheet (like what Opal does and shows an alert when this happens)
How to prevent it in the first place?
I really appreciate any help you can provide.
I am developing a File Provider on Mac. I am marking some items within the domain as 'shared' via the NSFileProviderItemProtocol. However, the text 'Folder shared on iCloud by me' appears in Finder when these items are marked as shared.
Is this correct? My provider has nothing to do with iCloud, which is, of course, the cloud developed by Apple. Is there a way to change this text or remove it?
I've attached an image that shows the problem.
I'm developing an extension on Xcode, trying to test on my iPhone 7 plus.
When I connect my iPhone with my Mac that Xcode is running on, and click Run, the app shows up on my iPhone.
But when I check Settings > Safari > Extensions, it says "NO EXTENSIONS INSTALLED. Extensions customize the way Safari works. Extensions can change the appearance or behavior of web content, add buttons to Safari, and more."
I'm using :
Xcode : Version 14.0.1
Mac OS monterey : Version 12.7.5
iPhone 7 plus : Version
15.8.2
I am working on a banking application (includes iPhone and iPad) which includes add to wallet feature.
During the implementation I saw one document it is mentioned that for iPad app, the app must be extended to support Apple pay functionality.
Details from document says "Card Issuers with an iOS mobile banking app must support Card Issuer iOS Wallet extension functionality to enable Card issuer mobile app customers to provision new cards directly from the iOS Wallet app with all eligible Apple iOS devices. If the Card Issuer has a dedicated iPad App, that App must be extended to support Apple Pay functionality. "
Is wallet extension implementation required for Apple pay to work in iPhone and iPad?
Is wallet extension a mandatory implementation for Add to Apple Wallet feature to work and approved by Apple?
I am little confused in this.
Anyone who integrated Apple pay or done add to Apple Wallet feature recently without wallet extension faced any rejection?
Any help would be much appreciated.
Since updating to iOS v17.4.1 our safari extension no longer functions as it used to
We are experiencing issues where our content script is not getting initialized, On devices running iOS 17.4.1, the content script included in our extension does not appear to run. There are no logs from the content script in the console, whereas on other versions and devices, it operates as expected. Our Extension relies con communication between the background and content scripts in order for us to render various popups to our users, based on our logs as of iOS 17.4.1 this communication is not successful, we can see messages being sent from the background script but as mentioned above nothing on the content script side.
This behavior happens majority of the time and on random sites, sometimes opening the same site in a new tab would work but not always. There are also times where we would only receive our popups after opening the safari menu and interacting with our extension via this menu.
Please assist with a way forward
Hi,
how I should enable all kernel extension in Catalina 10.17 ? There is no "Allow" option or can't see it in start-up option.
I have an iOS SwiftUI app which uses some extensions like NotificationServiceExtension, NotificationContentExtension, WidgetExtension etc. I noticed that each extension uses its own process and has its own bundle with the .appex extension... and is packaged within the app bundle, with .app extension.
In my case, most of my logic is in C++ and when the app starts up, it needs to 'startup' the C++ layer. Now, in WidgetExtension, if it's going to read data from disk and update its interface, I need to initialise my C++ layer first. The same can be said for NotificationServiceExtension. This is leading me to include all my C++ artefacts into the extension target as well.
Here's my problem: If the size of my app (containing all my C++ artefacts) is 10MB and I'm using 20 extensions (say), the final size of the shipped app bundle is 10MB + (20 * 10MB) = 210MB, since extension bundle (.appex) is packaged within the app bundle (.app).
Since the app and the extensions are using the same C++ artefacts, I was hoping to have one binary in the bundle. The app and its extensions will point to this binary. When the app is launched, the app entry point (struct conforming to App protocol) is invoked, in case of widget, the widget entry point (WidgetBundle) is invoked and so on for each extension. This will reduce the final size of the app bundle. Is it possible to have one binary and the app target, all extension targets would use this binary for there functioning?
I created Keyboard extension and calling an api in it. Api is successfully called when i run the extension on iOS Simulator’s. But when i run the extension on iOS device Extension in loaded successfully but Api call is getting failed with error mentioned below.
2024-05-10 16:23:44.931827+0500 CustomKeyboardExtention[4073:48324] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:11 Err:-1 Errno:1 Operation not permitted
2024-05-10 16:23:44.932654+0500 CustomKeyboardExtention[4073:48324] [connection] nw_resolver_create_dns_service_locked [C1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
2024-05-10 16:23:44.935914+0500 CustomKeyboardExtention[4073:48324] Connection 1: received failure notification
2024-05-10 16:23:44.936849+0500 CustomKeyboardExtention[4073:48324] Connection 1: failed to connect 10:-72000, reason -1
2024-05-10 16:23:44.937747+0500 CustomKeyboardExtention[4073:48324] Connection 1: encountered error(10:-72000)
2024-05-10 16:23:44.942682+0500 CustomKeyboardExtention[4073:48324] Task .<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000])
2024-05-10 16:23:44.949787+0500 CustomKeyboardExtention[4073:48324] Task .<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x283aa35a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0, ipv4, dns, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask .<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://chatbotsf-vzt2zxsi7q-uc.a.run.app/chatbot/, NSErrorFailingURLKey=https://chatbotsf-vzt2zxsi7q-uc.a.run.app/chatbot/, _kCFStreamErrorDomainKey=10}
Error fetching data: URLSessionTask failed with error: A server with the specified hostname could not be found.
Hello, technical friends, I am developing a custom keyboard extension, currently encountered a technical difficulty, almost asked AI and Google have not solved my problem.
Problem description:
When my App was first installed, I opened Settings from the App, enabled full access, and crashed when I returned to the App. Run the App for the second time, open the Settings from the App, update the full access permission, and automatically re-run the App after returning to the App, and then the third, fourth, and NTH times will not crash.
Seems like ios will kill host apps for custom keyboard extensions after full access is updated?
I want my App installed for the first time to update full access to return App without crashing, but don't know how to fix this problem. I look forward to the technical experts working in Apple development to help me provide relevant technical methods and ideas so that I can solve this problem. Thank you very much!
When tracing debugging in xcode, after the App forces exit, the console prompts:
Message from debugger: Terminated due to signal 9
When I was monitoring CPU and memory usage, it was very low and I didn't see anything unusual.
Calling SKAction.follow(..) causes my SKSpriteNode to rotate 90 degrees CW and not stay horizontal as it follows my UIBezierPath?
I have this code (within my GameViewController Class) which implements the following of a SKSpriteNode along a UIBezierPath.
=====
Please note that a brilliant contributor solved the above challenge by creating a new Class, e.g., class NewClass: NSObject. Nevertheless, I need the solution to appear in an extension of my GameViewController
=====
func createTrainPath() {
trackRect = CGRect(x: tracksPosX - tracksWidth/2,
y: tracksPosY,
width: tracksWidth,
height: tracksHeight)
trainPath = UIBezierPath(ovalIn: trackRect)
} // createTrainPath
func startFollowTrainPath() {
var trainAction = SKAction.follow(
trainPath.cgPath,
asOffset: false,
orientToPath: true,
speed: theSpeed)
trainAction = SKAction.repeatForever(trainAction)
myTrain.run(trainAction, withKey: runTrainKey)
} // startFollowTrainPath
func stopFollowTrainPath() {
guard myTrain == nil else {
myTrain.removeAction(forKey: runTrainKey)
savedTrainPosition = getPositionFor(myTrain, orPath: trainPath)
return
}
} // stopFollowTrainPath
Hi there,
I have two extension in my App, a Finder Sync and a Share Extension. Because these are disabled by default and automatically enabling them is, according to my extensive research, not possible, I want to provide an easy way for the user to enable the extensions when the app is opened. I am currently displaying a popup, with a button to open the preferences.
I have struggled with this a bit, by now I managed to open the main preferences window using
NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference")!)
which is rather suboptimal though, since the user has to select the extensions option manually and isn't directly redirected there.
What I have also found is that the menu of the FinderSyncExtension can be opened directly by using FIFinderSyncController.showExtensionManagementInterface()
which is unfortunately suboptimal as well, because it only shows the managment interface of the finder extension and not the overview of all extensions.
Is there any way to either enable the extensions programatically, or if not, is there a way to show the "Added Extensions" portion of the Extensions menu in the system preferences?
Hi, in my Extension FilterDataProvider class that is inherited from NEFilterDataProvider i am trying to insert logs into my CoreData entity, but when i insert it gives me error
"NSCocoaErrorDomain: -513
"reason": Unable to write to file opened Readonly
Any suggestions please to update the read write permission
i already have tried this way but no luck
let description = NSPersistentStoreDescription(url: storeURL) description.shouldInferMappingModelAutomatically = true description.shouldMigrateStoreAutomatically = true description.setOption(false as NSNumber, forKey: NSReadOnlyPersistentStoreOption)
?