PLATFORM AND VERSION
iOS
Development environment: Xcode 15.0, macOS 14.4.1, Objective-C
Run-time configuration: iOS 17.2.1,
DESCRIPTION OF PROBLEM
I am developing an application that uses NetworkExtension (VoIP local push function).
But iOS sometimes doesn't call didActivateAudioSession after following sequence.
Would you tell me why iOS doesn't call didActivateAudioSession ?
(I said "sometimes", but once it occurs, it will occur repeatedly)
myApp --- CXStartCallAction --->iOS
myApp <-- performStartCallAction callback --- iOS
myApp --- AVAudioSession
setCategory:
AVAudioSessionCategoryPlayAndRecord --->iOS
myApp --- AVAudioSession
setMode:
AVAudioSessionModeVoiceChat --->iOS
myApp <-- didActivateAudioSession callback ----iOS
I suspect that myApp cannot acquire an AVAudioSession if another app is already using AVAudioSession.
[QUESTION1]
Is my guess correct? Should I consider another cause?
[QUESTION2]
If my guess is correct, how can I prove if another app is already using an AVAudioSession?
This issue is based on a customer complaint, but the customer said they don't use any other apps.
Best Regards,
Extensions
RSS for tagGive users access to your app's functionality and content throughout iOS and macOS using extensions.
Posts under Extensions tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hello,
I've encoutered an issue with Safari App Extensions. My extension prints lots of suspect error logs in the Xcode console and inside Console.app. This happens basically whenever I make any interaction with the App Extension or with Safari. The most common and predictable error log I get is:
No current extension context; trying most recent context
(Subsystem: com.apple.SafariServices)
However, I also sometimes get the following error messages, albeit less frequently, which may be related:
No extension context for best match
No extension context for remote object
Error connecting back to host for remote object: NSCocoaErrorDomain, code: 4099
No known extension contexts for profile 00000000-0000-0000-0000-000000000000
Most recent extension context B7223E12-B563-45E0-97F8-50500BC6B994 does not have connection back to host; trying best match context
I haven't been able to find anything about these error logs in Apple documentation or on the Internet, so I did a bit of empirical investigation.
I reproduced the bug in the following basic scenario: I've created a new Safari App Extension project in Xcode by going to File > New > Project > Safari Extension App. I've selected "Safari App extension" for the type and "Swift" for the language. The project comes by default with a "SafariExtensionHandler.swift" file, which includes the following code:
override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) {
validationHandler(true, "")
}
No issues so far.
If I add the following call:
override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) {
validationHandler(true, "")
SFSafariApplication.getActiveWindow { window in
// code
}
}
There are still no error messages logged in the Console.
However, if I do this instead:
override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) {
validationHandler(true, "")
DispatchQueue.main.async {
SFSafariApplication.getActiveWindow { window in
// code
}
}
}
Then my Xcode console starts being spammed with "No current extension context; trying most recent context" error logs.
With some more testing, it seems that the most common/predictable situation that causes the error log seems to be when calling any Safari API (e.g. SFSafariApplication.getActiveWindow{} or even SFSafariApplication.setToolbarItemsNeedUpdate()) outside of a direct method call provided by the Safari App Extension API. So making API calls directly from inside validateToolbarItem(in:, validationHandler:) or messageReceived(withName:from:userInfo:) calls is fine, but anything else causes "No extension context" logs. The bug even reproduces if you make a Safari API call directly inside of an @IBAction method call caused by a button click inside the Safari popover of the Safari App Extension.
With this being the case, it seems to be impossible to make clean Safari API calls in an asynchronous or proactive way, which is problematic for our app extension use case and which seems to defeat the purpose of some of the API calls like SFSafariApplication.setToolbarItemsNeedUpdate(). Also, this seems to be a new issue.
I've tested these scenarios on various macOS versions that I had on hand (specifically, on macOS 10.15 Catalina, macOS 13 Ventura and macOS 14 Sonoma) and the bug seems to reproduce only on macOS 14 Sonoma. The Safari App Extension behaves as expected on previous macOS versions, with no suspect error logs.
Does anyone know what this issue is about?
Hi,
I am developing QuickLook Thumbnail Extension and QuickLook Preview Extension which work with embroidery files.
To prepare the view, I need to access stitches from the "stitch" file (supplied to my extension by system) and also to read the "colors" from related file (i.e. the file with different extension, but the same filename as "stitch" file). The embrodery is located stored in 2 files: squirrel.dst (stitchs) and squirrel.edr (colors).
Is it even possible to extend sandbox in extensions for this task?
I have tried to ask user to select folder in main.app (NSOpenPanel), create security-scoped Bookmark in main.app and access it from extension. However, this is not working - in the extension it is not possible to resolve the bookmark created in main.app.
I have also tried to use mechanism for accessing related files as shown at https://developer.apple.com/documentation/security/app_sandbox/protecting_user_data_with_app_sandbox, using NSFilePresenter/NSFileCoordinator. It works in main.app, but doesn't work in QuickLook Thumbnail Extension and QuickLook Preview Extension.
Is there any mechanism on Mac which would allow me to access more than the "supplied" file URL in QuickLook Thumbnail Extension and QuickLook Preview Extension?
Ladislav
I have an iOS app which uses Notification Service Extension (NSE) to process incoming notifications before it displayed to user.
In NSE, as part of initialization of my app, I need to iterate through a 2D array. There are roughly 65k iterations. I've noticed that this iteration fails somewhere in between and the NSE process crashes... I can say it crashes because the logs stopped in between the iterations. This results in 'unmodified notification' getting displayed immediately, whereas NSE is granted 30 sec of background execution.
My question is, why does this happen? The above iteration of 2D array works in app, but fails in NSE. Is there some kind of restriction on background extensions? - the documentation only talks about a time limit of 30sec. If there is some kind of restriction (like CPU and memory), how does one know this and code for it... since Apple did not provide any documentation. Or perhaps, there is a completely different reason?
Hi everyone!
I'm seeking help to understand crashes that, as I can see, come from the widget extension.
The brief stack trace that I can see under Xcode -> Window -> Organizer -> [My App] -> Crashes is pretty short (see attachment).
My widgets do fetch request to Core Data, but the operation is performed on the background thread and data is lightweight.
I have been debugging for days, but haven't found any weak code blocks that might take too much memory or crash due to simple language issues.
Will appreciate any help!
In the crash report file, I see the following logs (highlight a few of them due to lines limit):
Incident Identifier: 62A28083-43EE-47F2-A2E0-89A1FA89744A
Hardware Model: iPhone13,2
Process: MyAppWidgetsExtension [28359]
Identifier: MyAppWidgets
Version: 2.16.0 (290)
OS Version: iPhone OS 17.4.1 (21E236)
Exception Type: EXC_CRASH (SIGKILL)
Termination Reason: RUNNINGBOARD 0xdead10cc
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001e05c5af8 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001e05c5890 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001e05c57a8 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001e05c55e8 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x00000001980a001c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x000000019809df04 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x000000019809d968 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 Foundation 0x0000000196f2c4a8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8 Foundation 0x0000000196f2aff0 -[NSRunLoop(NSRunLoop) run] + 64 (NSRunLoop.m:398)
9 libxpc.dylib 0x00000001f40aa26c _xpc_objc_main + 336 (main.m:267)
10 libxpc.dylib 0x00000001f40ac7e4 _xpc_main + 64 (init.c:1294)
11 libxpc.dylib 0x00000001f40ac7a4 xpc_bs_main + 16 (init.c:1310)
12 BoardServices 0x00000001b0d38240 +[BSServicesConfiguration activateXPCService] + 68 (BSServicesConfiguration.m:113)
13 ExtensionFoundation 0x00000001a70bbdf0 -[_EXRunningExtension resume] + 260 (EXRunningExtension.m:298)
14 ExtensionFoundation 0x00000001a70bbc38 -[_EXRunningExtension startWithArguments:count:] + 396 (EXRunningExtension.m:269)
15 ExtensionFoundation 0x00000001a70cfa30 EXExtensionMain + 220 (EXExtensionMain.m:34)
16 Foundation 0x0000000197665ed4 NSExtensionMain + 204 (NSExtensionMain.m:21)
17 dyld 0x00000001bb5bed84 start + 2240 (dyldMain.cpp:1298)
Thread 2:
0 libsystem_kernel.dylib 0x00000001e05d381c guarded_pwrite_np + 8 (:-1)
1 libsqlite3.dylib 0x00000001c1ddc158 seekAndWrite + 456 (sqlite3.c:44255)
2 libsqlite3.dylib 0x00000001c1d95908 unixWrite + 180 (sqlite3.c:44333)
3 libsqlite3.dylib 0x00000001c1de4574 pagerWalFrames + 868 (sqlite3.c:66940)
4 libsqlite3.dylib 0x00000001c1d95628 sqlite3PagerCommitPhaseOne + 316 (sqlite3.c:70256)
5 libsqlite3.dylib 0x00000001c1d85d7c sqlite3BtreeCommitPhaseOne + 172 (sqlite3.c:80934)
6 libsqlite3.dylib 0x00000001c1d85944 vdbeCommit + 1136 (sqlite3.c:93952)
7 libsqlite3.dylib 0x00000001c1d5ec74 sqlite3VdbeHalt + 1352 (sqlite3.c:94362)
8 libsqlite3.dylib 0x00000001c1d7fd04 sqlite3VdbeExec + 42952 (sqlite3.c:103728)
9 libsqlite3.dylib 0x00000001c1d74c80 sqlite3_step + 964 (sqlite3.c:97699)
10 CoreData 0x00000001a01ba0e0 _execute + 128 (NSSQLiteConnection.m:4573)
11 CoreData 0x00000001a01e5510 -[NSSQLiteConnection commitTransaction] + 596 (NSSQLiteConnection.m:3250)
12 CoreData 0x00000001a040aac0 _executeBatchUpdateRequest + 1216 (NSSQLCore_Functions.m:1110)
13 CoreData 0x00000001a030a240 -[NSSQLBatchUpdateRequestContext executeRequestCore:] + 32 (NSSQLBatchUpdateRequestContext.m:88)
14 CoreData 0x00000001a01c8508 -[NSSQLStoreRequestContext executeRequestUsingConnection:] + 252 (NSSQLStoreRequestContext.m:183)
15 CoreData 0x00000001a01c82b4 __52-[NSSQLDefaultConnectionManager handleStoreRequest:]_block_invoke + 60 (NSSQLConnectionManager.m:302)
16 CoreData 0x00000001a01c81ec __37-[NSSQLiteConnection performAndWait:]_block_invoke + 48 (NSSQLiteConnection.m:733)
17 libdispatch.dylib 0x000000019ff66dd4 _dispatch_client_callout + 20 (object.m:576)
18 libdispatch.dylib 0x000000019ff762c4 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1100)
19 CoreData 0x00000001a01de8d0 -[NSSQLiteConnection performAndWait:] + 176 (NSSQLiteConnection.m:730)
20 CoreData 0x00000001a019d094 -[NSSQLDefaultConnectionManager handleStoreRequest:] + 248 (NSSQLConnectionManager.m:297)
21 CoreData 0x00000001a019cf64 -[NSSQLCoreDispatchManager routeStoreRequest:] + 228 (NSSQLCoreDispatchManager.m:60)
22 CoreData 0x00000001a019cd68 -[NSSQLCore dispatchRequest:withRetries:] + 172 (NSSQLCore.m:3975)
23 CoreData 0x00000001a01bc034 -[NSSQLCore executeRequest:withContext:error:] + 1208 (NSSQLCore.m:2951)
24 CoreData 0x00000001a01d06a0 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.541 + 4156 (NSPersistentStoreCoordinator.m:2994)
25 CoreData 0x00000001a01cf57c -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 264 (NSPersistentStoreCoordinator.m:641)
26 CoreData 0x00000001a01abc48 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1048 (NSPersistentStoreCoordinator.m:2768)
27 CoreData 0x00000001a018bbdc -[NSManagedObjectContext executeRequest:error:] + 700 (NSManagedObjectContext.m:2044)
28 CoreData 0x00000001a0265be8 __116+[NSCKRecordMetadata batchUpdateMetadataMatchingEntityIdsAndPKs:withUpdates:inStore:withManagedObjectContext:error:]_block_invoke + 128 (NSCKRecordMetadata.m:744)
29 CoreFoundation 0x000000019806dfb4 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24 (NSDictionaryHelpers.m:10)
30 CoreFoundation 0x000000019806de2c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 288 (NSDictionaryM.m:271)
31 CoreData 0x00000001a0265970 +[NSCKRecordMetadata batchUpdateMetadataMatchingEntityIdsAndPKs:
Hello, I'm experiencing an issue with enabling a Content Filter Network Extension from a command line tool. When I call the LoadFromPreferences method on NEFilterManager.shared() the completion handler is not called.
I've tried this with a simple semaphore and tried running it on a RunLoop, but none of this works.
Any help would be appreciated.
I've tried adding a small demo project illustrating the issue, but the add file option does not seem to work.
I'll paste the code here:
Semaphore Demo
class SemaphoreDemo {
let filterManager = NEFilterManager.shared()
var semaphore = DispatchSemaphore(value: 0)
func demo() {
print("Semaphore demo")
self.filterManager.loadFromPreferences { (error) in
print("Load from preferences callback")
if let error = error {
print("ERROR \(error.localizedDescription)")
return
}
let config = NEFilterProviderConfiguration()
config.filterDataProviderBundleIdentifier = "BUNDLE_IDENTIFIER"
config.filterSockets = true
self.filterManager.isEnabled = true
self.filterManager.localizedDescription = "LOCALIZED_DESCRIPTION"
self.filterManager.providerConfiguration = config
self.filterManager.saveToPreferences { (error) in
if let error = error {
print("ERROR \(error.localizedDescription)")
} else {
print("SUCCESS")
}
self.semaphore.signal()
}
}
self.semaphore.wait()
}
}
class RunloopDemo {
let filterManager = NEFilterManager.shared()
func demo() {
print("Runloop demo")
let currentRunLoop = CFRunLoopGetCurrent()
// let currentRunLoop = CFRunLoopGetMain()
self.filterManager.loadFromPreferences { [weak currentRunLoop] (error) in
print("Load from preferences callback")
if let error = error {
print("ERROR \(error.localizedDescription)")
return
}
let config = NEFilterProviderConfiguration()
config.filterDataProviderBundleIdentifier = "Bundle IDENTIFIER"
config.filterSockets = true
self.filterManager.isEnabled = true
self.filterManager.localizedDescription = "LOCALIZED DESCRIPTION"
self.filterManager.providerConfiguration = config
self.filterManager.saveToPreferences { (error) in
if let error = error {
print("ERROR \(error.localizedDescription)")
} else {
print("SUCCESS")
}
CFRunLoopStop(currentRunLoop)
}
}
CFRunLoopRun()
}
}
The callback is never called.
Thanks.
Default behaviour of the macOS when interacting via Finder with a network share is to create thumbnails to provide a nice user experience. This behaviour is implemented by QuickLook framework.
This triggers the full file download and quickly lead to cache using large disk space and even cache trashing.
We can disable QuickLook selectively by injecting specially prepared .DS_Store file with instruction/setup to disable thumbnails in that directory but still degrades user's experience only in the network share ecosystem.
Is there any way we can provide our own thumbnails or ask Finder to not download full file to generate the thumbnail?
I am writing to follow up with my lab in WWDC24.
I had 1:1 lab with Mr. Kavin, we had good 30 minutes lab and for follow up questions Kavin asked me to post it using feedback.
Following is my questin:
We have screenshare in our application and trying to use CFMessagePort for passing CVPixelBufferRef from broadcast extension to Applicaiton.
Questions:
How to copy planes of IOSurface backed CVPixelBufferRef onto another one without using memcpy, is there a zero-copy method?
How to get notified when an IOSurface backed CVPixelBufferRef data get changed by another process.
How to send an IOSurface backed CVPixelBufferRef from Broadcast Extension to application.
How to pass unowned IOSurfaceRef from the Broadcast Extension to appliction.
While Implementing Wallet Intent Extension, and after verification
The only message i get is
Cannot Add Card
There are no available cards to add.
Any help here is appreciated.
I'm the developer of a third-party keyboard app, Snippety - Snippets Manager, which is designed for using snippets rather than regular typing.
One of my users has encountered a strange issue: after installing my keyboard (even when it is not actively in use), the predictive text bar starts showing suggestions in Polish. This happens despite the Polish language not being installed on the device. The issue resolves as soon as my keyboard is uninstalled from the system settings.
Interestingly, my application (including the keyboard) does not support the Polish language, nor is Polish specified anywhere in the app. The app was developed and published from macOS in English. This seems to be an iOS bug.
The only language-related configuration in my keyboard is the PrimaryLanguage key in the Info.plist file, which I set to "mul" because the keyboard is not intended for typing. I also tried setting it to "mis", but the issue persists.
The video presenting this issue on an iPhone 15 simulator running iOS 17.5:
https://www.dropbox.com/scl/fi/xjdyucxpmv1cv0mnmwzvd/prdictive-text-issue.mp4?rlkey=aphznpdti08pz8xl84ojbyxz3&dl=0
Info.plist for my keyboard:
My project settings:
Steps to reproduce:
Configure iOS to use English language only, with English keyboard
Enable predictive text feature in the system
Install Snippety keyboard
Use the regular keyboard & start typing "dzie"
Actual result:
Polish predictions appear even though the Polish language is not installed or declared by the keyboard.
Expected result:
The predictive text should present predictions based on system settings.
What is even more weird, I discovered that when I add the keyboard in system settings, it automatically installs Polish language in the system settings. I even changed PrimaryLanguage to "de" (German) in Info.plist but it still installs Polish.
See: https://www.dropbox.com/scl/fi/aiv5g4z331zwy827zj47v/incorrect-language-installed.mp4?rlkey=16v5gqmb6mj8yuyyd7jwmjnsw&dl=0
Any ideas what could be wrong?
I also created a ticket: #FB13949087
I also found a similar issue from 2018 (O_O) reported here: https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard
I am writing this Web Extension for Safari. It is designed to run on both macOS and iOS.
The extension-specific javascript/css/etc files are shared between the platforms.
What I observe is that the extension is running fine on macOS. It also runs fine on the iOS Simulator.
However, on my device, just nothing happens when activating the extension. No errors are output to the console either.
I found it out the hard way, when I already released the extension in the AppStore, and installed it on a friend's iPhone.
Does anyone have a clue where I even could start debugging? Or better: maybe there is just a simple checkbox that that I should (un)check?
In the documentation of deferQueryRequestToNetwork method which is used to do a network request on message filter extension.
There is no mention of timeout period applied to network requests.
https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterextensioncontext/2880240-deferqueryrequesttonetwork
So my question is what is the timeout period of the deferQueryRequestToNetwork method?
And is there some changelog to know has this value changed in some iOS version.
In the documentation of deferQueryRequestToNetwork method which is used to do a network request on message filter extension.
There is no mention of timeout period applied to network requests.
https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterextensioncontext/2880240-deferqueryrequesttonetwork
So my question is what is the timeout period of the deferQueryRequestToNetwork method?
And is there a changelog that this timeout has changed at some point during iOS update?
I am trying to add more than one ControlWidget in iOS 18 and I get an error and not sure whether I am doing anything wrong or there is a bug (or maybe it's not supported by design?)
I get the following error:
encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'check.ios18-test.intent-ext-ui' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x600000cb7060 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: "
These are the two ControlWidgets I am trying to create:
struct GetPointIntent: AppIntent {
static let title: LocalizedStringResource = "Get Point"
func perform() async throws -> some IntentResult {
return .result()
}
}
struct LeftButton: ControlWidget {
static let kind: String = "check.ios18-test.left"
var body: some ControlWidgetConfiguration {
StaticControlConfiguration(kind: Self.kind) {
ControlWidgetButton(action: GetPointIntent()) {
Label("Plus", systemImage: "arrowshape.left")
Text("\(AppState.points)")
}
}
.displayName("Left")
.description("Left Move")
}
}
struct RightButton: ControlWidget {
static let kind: String = "check.ios18-test.right"
var body: some ControlWidgetConfiguration {
StaticControlConfiguration(kind: Self.kind) {
ControlWidgetButton(action: GetPointIntent()) {
Label("Plus", systemImage: "arrowshape.right")
}
}
.displayName("Right")
.description("Right Move")
}
}
@main
struct intent_ext_uiBundle: WidgetBundle {
var body: some Widget {
RightButton()
LeftButton()
}
}
The app builds but upon running I get the mentioned error from Xcode
I'm developing a single target watchOS app that obtains HealthKit information. I have the "Background Delivery" option checked under "Signing & Capabilities" for the watch target. The app does HKObserverQueries in the foreground that work as I would expect. But when I click the Digital Crown to return to clock face, the HKObserverQuery activity stops. I'm using Xcode 15.4, on Mac 14.5 and a Apple Watch Series 4 running 10.5.
Hi,
Can I use the MailKit API to add mention support to Mail App. Where I write "@deepak" and my extension suggests me emails starting with the name "deepak" from my contacts.
I see there is MEComposeSessionHandler.viewControllerin the mail kit API. But I think, according to the WWDC demo, it can only create UI in the toolbar section of the compose window.
Any help will we appreciated here!
We had developed an iOS Safari web extension (which uses non-persistent background scripts) that functioned properly until iOS 17.3. However, I've encountered inconsistent behavior on iOS 17.4.1, 17.5, and 17.5.1. Upon further debugging, I noticed that the background scripts often become idle and are unloaded frequently. They are not loaded again even for the registered webNavigation events and only trigger when interacting with the extension popup menu. This is also mentioned here.
I had tried this in both manifest versions 2 & 3. I had tried using service_worker for background scripts. But, none of it seems to resolve this issue.
Could you please clarify if this is a bug or an intended behavior?
Our extension relies on webNavigation events without users having to interact with the popup menu often.
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 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}}}}}
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?