Hello,
I'm trying to get my app to communicate with a FinderSync extension using XPC.
In my app, I run the listener:
_xpcListener = [[NSXPCListener alloc] initWithMachServiceName:_serviceName];
_xpcListener.delegate = self;
[_xpcListener resume];
Where _serviceName="a.b.c.d.e.f"
In Info.plist of the app bundle, I have:
keyMachServices/key
dict
keya.b.c.d.e.f/key
true/
/dict
In the FinderSync ext, I try to connect to the XPC service:
_xpcConnection = [[NSXPCConnection alloc] initWithMachServiceName:_serviceName options:0];
...
[_xpcConnection resume];
It works in debug, but not when the app is installed.
In this case, _xpcConnection.invalidationHandler is called.
The FinderSync ext belongs to the app bundle.
The .entitlements of the App:
?xml version="1.0" encoding="UTF-8"?
!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "..."
plist version="1.0"
dict
keycom.apple.security.application-groups/key
array
stringa.b.c.d.e/string
/array
/dict
/plist
The .entitlements of the FinderSync:
?xml version="1.0" encoding="UTF-8"?
!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "..."
plist version="1.0"
dict
keycom.apple.security.app-sandbox/key
true/
keycom.apple.security.application-groups/key
array
stringa.b.c.d.e/string
/array
/dict
/plist
The app is notorized:
% spctl --assess -vvvv /Applications/myApp.app
/Applications/myApp.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: ...
In the Console, just after the start of the listener, there is this error (3 times) for myApp process:
Trust evaluate failure: [leaf TemporalValidity]
So I checked its certificates, but they are valid:
% codesign -dvvvv --extract-certificates /Applications/myApp.app
% openssl x509 -inform DER -in codesign0 -text
...
Validity
Not Before: Jun 22 11:59:25 2020 GMT
Not After : Jun 23 11:59:25 2025 GMT
..
% openssl x509 -inform DER -in codesign1 -text
...
Validity
Not Before: Feb 1 22:12:15 2012 GMT
Not After : Feb 1 22:12:15 2027 GMT
...
% openssl x509 -inform DER -in codesign2 -text
...
Validity
Not Before: Apr 25 21:40:36 2006 GMT
Not After : Feb 9 21:40:36 2035 GMT
...
The computer date is Ok:
% date
Thu Apr 8 09:20:44 CEST 2021
In the console, there is also this error for tccd process:
Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for accessing={identifier=a.b.c.d.e, pid=12245, auid=501, euid=501, binary_path=/Applications/myApp.app/Contents/PlugIns/Extension.appex/Contents/MacOS/Extension}, requesting={identifier=com.apple.appleeventsd, pid=328, auid=55, euid=55, binary_path=/System/Library/CoreServices/appleeventsd},
I tried to add this com.apple.security.automation.apple-events entitlement to App and ext, but it didn't fix the problem.
How can I debug this issue?
Thank you.
Post marked as Apple Recommended
Quinn, you've often suggested that to validate the other side of an XPC connection, we should use the audit token. But that's not available from the XPC object, whereas the PID is. So everyone uses the PID.
While looking for something completely unrelated, I found this in the SecCode.h file
OSStatus SecCodeCreateWithXPCMessage(xpc_object_t message, SecCSFlags flags,
SecCodeRef * __nonnull CF_RETURNS_RETAINED target);
Would this be the preferred way to do this now? At least from 11.0 and up.
Like I said, I was looking for something completely unrelated and found this and don't have the cycles right now to try it. But it looks promising from the description and I wanted to check in with you about it in case you can say yes or no before I get a chance to test it.
Thanks
Post not yet marked as solved
Hi!
I'm looking for some insight and guidance on using the Foundation.Process type with a PTY (Psuedo Terminal) so that the subprocess can accept input and behave as if it was running via a terminal.
The reason for needing a PTY is that for programs like ssh or in my case (xcodes) which ask for user input including passwords, running these via Foundation.Process does not display the prompts to the user as the output is usually buffered (this works fine in the Xcode debugger console but when running via a real terminal that is buffered the prompts are never displayed in the terminal)
Looking at other threads it seems like correct approach here is create a PTY and use the filehandles to attach to the Process.
While I've got this to work to the point where prompts are now shown, I cant seem to figure out how to pass input back to the process as these are being controlled by the PTY.
Here is my Process setup:
let process = Process()
// Setup the process with path, args, etc...
// Setup the PTY handles
var parentDescriptor: Int32 = 0
var childDescriptor: Int32 = 0
guard Darwin.openpty(&parentDescriptor, &childDescriptor, nil, nil, nil) != -1 else {
fatalError("Failed to spawn PTY")
}
parentHandle = FileHandle(fileDescriptor: parentDescriptor, closeOnDealloc: true)
childHandle = FileHandle(fileDescriptor: childDescriptor, closeOnDealloc: true)
process.standardInput = childHandle
process.standardOutput = childHandle
process.standardError = childHandle
With this setup I then read the parent handle and output any result it gets (such as the input prompts):
parentHandle?.readabilityHandler = { handle in
guard let line = String(data: handle.availableData, encoding: .utf8), !line.isEmpty else {
return
}
logger.notice("\(line)")
}
When process.run() is executed the program runs and I can see it asks for Apple ID: input in my terminal, however, when typing input into the terminal the process does not seem to react to this input.
I've tried forwarding the FileHandle.standardInput:
FileHandle.standardInput.readabilityHandler = { handle in
parentHandle?.write(handle.availableData)
}
But this doesn't seem to work either.
What is the recommended way to setup a PTY with Foundation.Process for executing arbitrary programs and having them behave as if they were being run in a terminal context?
Most of the resources I found online are about other languages and I'd like to stick with Foundation.Process vs. doing anything custom in C/C++ if possible as it just makes it easier to reason about / maintain. The resources for Swift on this topic are very lacking and I've checked out some open source projects that claim to do this but most require manually sending input to the PTY handle vs. accepting them from the user in a terminal.
Any insight / help is very much appreciated!
Post not yet marked as solved
We see warnings like this logged by our processes using XPC:
(Foundation) [com.apple.runtime-issues:Foundation] *** -[NSXPCDecoder validateAllowedClass:forKey:]: NSSecureCoding allowed classes list contains [NSObject class], which bypasses security by allowing any Objective-C class to be implicitly decoded. Consider reducing the scope of allowed classes during decoding by listing only the classes you expect to decode, or a more specific base class than NSObject. This will become an error in the future. Allowed class list: {(
"'NSObject' (0x7ff844ee0d88) [/usr/lib]"
)}
As far as we can see, there is no explicit NSObject in allowed classes for any XPC connection. Where does this list and NSObject come from?
Post marked as Apple Recommended
I built an app which hosts a CMIOExtension. The app works, and it can activate the extension. The extension loads in e.g. Photo Booth and shows the expected video (a white horizontal line which moves down the picture).
I have a couple of questions about this though.
The sample Camera Extension is built with a CMIOExtension dictionary with just one entry, CMIOExtensionMachServiceName which is $(TeamIdentifierPrefix)$(PRODUCT_BUNDLE_IDENTIFIER)
This Mach service name won't work though. When attempting to activate the extension, sysextd says that the extensions has an invalid mach service name or is not signed, the value must be prefixed with one of the App Groups in the entitlement.
So in order to get the sample extension to activate from my app, I have to change its CMIOExtensionMachServiceName to
<my team ID>.com.mycompany.my-app-group.<myextensionname>
Is this to be expected?
The template CMIOExtension generates its own video using a timer. My app is intended to capture video from a source, filter that video, then feed it to the CMIOExtension, somehow. The template creates an app group called "$(TeamIdentifierPrefix)com.example.app-group", which suggests that it might be possible to use XPC to send frames from the app to the extension.
However, I've been unable to do so. I've used
NSXPCConnection * connection = [[NSXPCConnection alloc] initWithMachServiceName:, using the CMIOExtensionMachServiceName with no options and with the NSXPCConnectionPrivileged option. I've tried NSXPCConnection * connection = [[NSXPCConnection alloc] initWithServiceName: using the extension's bundle identifier. In all cases when I send the first message I get an error in the remote object proxy's handler:
Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named <whatever name I try> was invalidated: failed at lookup with error 3 - No such process."
According to the "Daemons and Services Programming Guide" an XPC service should have a CFBundlePackageType of XPC!, but a CMIOExtension is of type SYSX. It can't be both.
Does the CMIOExtension loading apparatus cook up a synthetic name for the XPC service, and if so, what is it? If none, how is one expected to get pixel buffers into the camera extension?
Post not yet marked as solved
XPC is the preferred inter-process communication (IPC) mechanism on Apple platforms. XPC has three APIs:
The high-level NSXPCConnection API, for Objective-C and Swift
The low-level Swift API, introduced with macOS 14
The low-level C API, which, while callable from all languages, works best with C-based languages
General:
DevForums tag: XPC
Creating XPC services documentation
NSXPCConnection class documentation
Low-level API documentation
XPC has extensive man pages — For the low-level API, start with the xpc man page; this is the original source for the XPC C API documentation and still contains titbits that you can’t find elsewhere. Also read the xpcservice.plist man page, which documents the property list format used by XPC services.
Daemons and Services Programming Guide archived documentation
WWDC 2012 Session 241 Cocoa Interprocess Communication with XPC — This is no longer available from the Apple Developer website )-:
Technote 2083 Daemons and Agents — It hasn’t been updated in… well… decades, but it’s still remarkably relevant.
TN3113 Testing and Debugging XPC Code With an Anonymous Listener
XPC and App-to-App Communication DevForums post
Validating Signature Of XPC Process DevForums post
Related tags include:
Inter-process communication, for other IPC mechanisms
Service Management, for installing and uninstalling Service Management login items, launchd agents, and launchd daemons
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Post not yet marked as solved
Hello everyone,
With the MacOS update to Venture 13.2, I get the following error message when closing a MacOS app in xCode:
[client] No error handler for XPC error: Connection invalid
Today I set up a brand new MacOS system which has nothing more installed as except for MacOS Venture 13.2 and xCode 14.2 (14C18).
The error already occurs when I start an app that only contains template code.
I also started the app without xCode and then closed it through the menu. Then I do not receive an error message.
With the Ventura version 13.1 on an AirBook with M1, the problem did not exist.
On my Intel iMac, the error causes the iMac to no longer start normally.
Thank you very much for your support.
Post not yet marked as solved
I am working as an iOS Developer since 2 years.
I am getting log on console like: [MADService] Client XPC connection invalidated
sometimes.
I am unable to get when and for what reason i am getting this.
need some help.
Thank you
Post not yet marked as solved
Hello! I'm new here, and probably this will sound weird but, I'm trying to write a C++ program using an XPC service to attempt to communicate with a macOS app I'm developing in Swift. At the macOS app side I think I'm successfully registering and connecting to the service, as launchd reports the following in its log:
2023-05-31 17:20:21.898621 (pid/15637 [On Air]) <Notice>: Service stub created for com.ruieduardolopes.onaird-join
At the C++ side I'm trying to get a simple example working, as follows, but currently without any success...
#include <xpc/xpc.h>
int main(int argc, const char* argv[])
{
xpc_connection_t conn = xpc_connection_create_mach_service("com.ruieduardolopes.onaird.join", NULL, 0);
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
xpc_connection_set_event_handler(conn, ^(xpc_object_t object) {});
xpc_connection_resume(conn);
xpc_dictionary_set_string(message, "SS", "AAAAAA\n");
xpc_connection_send_message_with_reply(conn, message, dispatch_get_main_queue(),
^(xpc_object_t object) {});
return (EXIT_SUCCESS);
}
I get the following error in the logs:
2023-05-31 17:27:45.636894 (system/com.ruieduardolopes.onaird) <Notice>: internal event: WILL_SPAWN, code = 0
2023-05-31 17:27:45.636903 (system/com.ruieduardolopes.onaird) <Notice>: service state: spawn scheduled
2023-05-31 17:27:45.636904 (system/com.ruieduardolopes.onaird) <Notice>: service state: spawning
2023-05-31 17:27:45.637017 (system/com.ruieduardolopes.onaird) <Notice>: launching: ipc (mach)
2023-05-31 17:27:45.637256 (system/com.ruieduardolopes.onaird [15908]) <Notice>: xpcproxy spawned with pid 15908
2023-05-31 17:27:45.637264 (system/com.ruieduardolopes.onaird [15908]) <Notice>: internal event: SPAWNED, code = 0
2023-05-31 17:27:45.637265 (system/com.ruieduardolopes.onaird [15908]) <Notice>: service state: xpcproxy
2023-05-31 17:27:45.637269 (system/com.ruieduardolopes.onaird [15908]) <Notice>: internal event: SOURCE_ATTACH, code = 0
2023-05-31 17:27:45.648927 (system/com.ruieduardolopes.onaird [15908]) <Notice>: service state: running
2023-05-31 17:27:45.648940 (system/com.ruieduardolopes.onaird [15908]) <Notice>: internal event: INIT, code = 0
2023-05-31 17:27:45.648948 (system/com.ruieduardolopes.onaird [15908]) <Notice>: Successfully spawned onaird-join[15908] because ipc (mach)
2023-05-31 17:27:45.687251 (system/com.ruieduardolopes.onaird [15908]) <Notice>: exited due to SIGTRAP | sent by exc handler[15908]
2023-05-31 17:27:45.687261 (system/com.ruieduardolopes.onaird [15908]) <Notice>: service has crashed 1 times in a row
2023-05-31 17:27:45.687263 (system/com.ruieduardolopes.onaird [15908]) <Notice>: service state: exited
2023-05-31 17:27:45.687267 (system/com.ruieduardolopes.onaird [15908]) <Notice>: internal event: EXITED, code = 0
2023-05-31 17:27:45.687269 (system) <Notice>: service inactive: com.ruieduardolopes.onaird
2023-05-31 17:27:45.687281 (system/com.ruieduardolopes.onaird [15908]) <Notice>: service state: not running
2023-05-31 17:27:45.687290 (system/com.ruieduardolopes.onaird) <Notice>: Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
2023-05-31 17:27:45.687339 (system/com.ruieduardolopes.onaird) <Notice>: internal event: WILL_SPAWN, code = 0
2023-05-31 17:27:45.687343 (system/com.ruieduardolopes.onaird) <Notice>: service state: spawn scheduled
2023-05-31 17:27:45.687344 (system/com.ruieduardolopes.onaird) <Notice>: service throttled by 10 seconds
The plist file I'm currently loading to /Library/LaunchDaemons is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.ruieduardolopes.onaird</string>
<key>Program</key>
<string>PATH_TO_ONAIR_JOIN_XPC_SERVICE_BINARY</string>
<key>BuildMachineOSBuild</key>
<string>22C65</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>onaird-join</string>
<key>CFBundleExecutable</key>
<string>onaird-join</string>
<key>CFBundleIdentifier</key>
<string>com.ruieduardolopes.onaird-join</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>onaird-join</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>13.3</string>
<key>DTSDKBuild</key>
<string>22E245</string>
<key>DTSDKName</key>
<string>macosx13.3</string>
<key>DTXcode</key>
<string>1430</string>
<key>DTXcodeBuild</key>
<string>14E222b</string>
<key>LSMinimumSystemVersion</key>
<string>13.1</string>
<key>MachServices</key>
<dict>
<key>com.ruieduardolopes.onaird.join</key>
<true/>
</dict>
<key>XPCService</key>
<dict>
<key>ServiceType</key>
<string>Application</string>
</dict>
</dict>
</plist>
Can anybody help me?
Thanks in advance,
Rui
Post not yet marked as solved
We have 2 process in our macOS application
Daemon process written in golang
Swift application
Currently, the communication between both the process are done with Unix domain socket. However, we are seeing significant amount of delay when large amount of data communication. We are looking for some faster communication. Probably XPC is the answer. But not sure how to use XPC between two process which are written in different language. Any sample code would be great help.
Post not yet marked as solved
Hi!
First time using XPC on a Mac app, and I'm stuck on a problem I can't understand. I have an app with multiple frameworks, and I'm adding an XPC service to one of the pre-existing frameworks. Right now the service is just the template that uppercases a string. I took all the necessary steps, I believe (adding the service as a target dependency, and copying it to the XPC Services folder). However, when I run it in Debug mode, I always get: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named <fully qualified service bundle ID> was invalidated: failed at lookup with error 3 - No such process." I also tested on a different, pre-existing framework, and the same thing happens.
Here's the weird parts: if I create a new framework and follow exactly the same steps, it works. I've compare the build settings between both frameworks and everything seems similar. And if I run in Release mode, the original service on the problematic framework also works! If I create a project with similar setup (app + framework with service inside it), it also works.
Looking at Console.app, I don't see anything that explains what's happening, but I may be filtering for the wrong thing.
Any help on why this fails specifically on my pre-existing frameworks and only on Debug mode is much appreciated. :)
Thank you,
Miguel Arroz
I have a regular GUI-based app that communicates with an Endpoint System Extension installed by another app.
Both the GUI app and Endpoint System Extension have the same Team ID and are part of the same App Groups.
But I still need to do one of the following to the GUI-based app to allow it to communicate with the Endpoint System Extension over XPC:
Disable the sandbox
Add com.apple.security.temporary-exception.mach-lookup.global-name to entitlements
For some reason I thought there was another way to resolve this. Am I missing anything?
(My goal is to allow an app distributed through the Mac App Store to communicate with my Endpoint System Extension if it exists, and I am worried about the "temporary-exception" entitlement needed to support this.)
Post not yet marked as solved
Hello,
I'm struggling to understand how I can use NSXPC API to communicate between two processes on iOS. The problem which I want to solve is how to pass some information from VPN tunnel to the VPN app.
I'm looking at the XPC documentation and for iOS I can create NSXPCListener only with the following functions:
service()
anonymous()
Both return NSXPCListener instance. But the question remains, how to connect to such an instance?
In NSXPConnection API I see only one option for iOS:
init(listenerEndpoint: NSXPCListenerEndpoint)
Other constructors accepting serviceName or machServiceName are available only form macOS.
I feel like the problem of communicating between two processes should be easy, but surprisingly I did find it quite difficult on iOS. Can you please advice if this is a proper API for my use case? Or maybe is there some better one, which I'm not aware of?
If this is a proper API, how should I create a connection between two apps? How to pass a listener from one process to the other?
Post not yet marked as solved
I have a NSXPCListener in an app and like to connect to from a command line tool. I can’t get it to work so I wonder if it is not supported of if I miss something.
Any help is greatly appreciated.
Assume this over-simplified @protocol I'm using for my XPC-service:
@protocol MyMinimalProtocol <NSObject>
- (void)getStatusWithReply:(void (^ _Nullable)(NSDictionary * _Nonnull))reply;
@end
The Client side would then
NSXPCConnection *connection = [[NSXPCConnection alloc] initWithMachServiceName:myServiceLabel options:NSXPCConnectionPrivileged];
connection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MyMinimalProtocol)];
connection.interruptionHandler = ^{ NSLog(@"XPC: connection - interrupted"); };
connection.invalidationHandler = ^{ NSLog(@"XPC: connection - invalidated"); };
[connection resume];
[connection.remoteObjectProxy getStatusWithReply:^(NSDictionary * response) {
NSLog(@"XPC service status received - %@", response);
}];
So far - so good.
My XPC service receives the asynchronous call, schedules it's "status gathering operation" on internal background queue, and returns.
Later - when information is available, my XPC service executes the reply-block then, on the remote calling side - I see the log line with the status, as expected.
BUT!!!
If I add another different code-block argument to the method e.g.
@protocol MyMinimalProtocol <NSObject>
- (void)getStatusWithReply:(void (^ _Nullable)(NSDictionary * _Nonnull))reply andFailureBlock:(void (^ _Nullable)(NSError * _Nonnull))failureBlock;
@end
Then all hell breaks loose. Both XPC service and the client crash with hilarious crash reasons I can't decipher.
Here's "Client side" caller crash (excerpt - forgive the methods are NOT the simplified ones above)
XPC Client(Caller) side crash - excerpt
while on the "XPC Service" side, crashes like these:
XPC service side crash excerpt
I wonder if there's something inherently wrong with having two code-block arguments for an XPC remote method?
Another issue. The client XPC calls are asynchronous. They return immediately. The XPC service implementing the remote-call also returns immediately - and it executes the "reply block" far (a minute!) later, on another queue.
However, if the XPC service attempts to execute the code-block MORE THAN ONCE, then the client-side code-block is only called ONCE. rest of the executions look benign in the XPC-service side - but never happen on the calling (client) side.
Any idea why? can this be overcome?
Any thoughts/ideas/references to documentation will be greatly appreciated. I couldn't find any good source on this.
Thanks.
Post not yet marked as solved
Hello, I encountered such a problem, the scenario is like this:
I have a launchctl startup daemon called xpcserver.app, which uses NSXPC to start an xpc Server. There is a Client program that links to the nsxpc service of this xpcserver.app, and when I establish the connection, I call an interface implemented by xpcserver named setName:(nsstring*)name. I was sure that my xpcserver implemented the corresponding interface, but when the client called the interface to pass the value, it triggered the error "unrecognized selector sent to instance". When I restarted the client, the call to the interface successfully implemented the function.
May I ask why? Using the NSXPC started service, hope to solve, thank you
Post not yet marked as solved
I randomly get this crash in my webview application when loading data. There is no pattern to it, it can happen in all areas where images are being loaded into vram.
Post not yet marked as solved
I randomly get this crash in my webview application when loading data. There is no pattern to it, it can happen in all areas where images are being loaded into vram.
Here is the error:
2023-09-16 19:57:55.404378+0200 Bluelife[3284:194440]
[Process x10d004350 - [PID=3445]
WebProcessProxy: :didClose: (web process 0 crash)
2023-09-16 19:57:55.404500+0200 Bluelife3284:194440]
[Process] 0x10d004350 - [PID=3445
WebProcessProxy::processDidTerminate0rFailedToLaunch:
reason=Crash
2023-09-16 19:57:55.404579+0200 Bluelife[3284:194440]
[ProcessSuspension] 0x10c01dfe - ProcessAssertion:
Failed to acquire RBS Background assertion
'XPCConnectionTerminationWatchdog' for process because
PID 0 is invalid
2023-09-16 19:57:55.410251+0200 Bluelife[3284:194440]
[Process] 0x130856218 - [pageProxyID=14, webPageID=15,
PID=3445] WebPageProxy: :processDidTerminate: (pid
3445), reason=Crash
2023-09-16 19:57:55.411392+0200 Bluelife[3284:211863]
[ProcessSuspension] 0x10c01dfe -
ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=0, error: (null)
2023-09-16 19:57:55.424321+0200 Bluelife[3284:194440]
[Loading] 0x130856218 - [pageProxID=14, webPageID=15, PID=3445] WebPageProxy::dispatchProcessDidTerminate:
reason=Crash
Post not yet marked as solved
Hi team,
We found that the app reported a lot of crash stacks, and the top of the stack had the libxpc library feature, but we could not find the reason. These issues have only emerged since iOS 16 and are growing, can you provide some clues or provide some solutions? Thanks
Crash backtrace can be seen as follows.
_
OS Version: 16.6.1 (20G81)
Report Version: 104
SDK start time: 2023-09-20 18:42:40
RDM SDK Version: 2.7.27.1
RDM user id : 119902290602
RDM DeviceId: 0DB20076-F323-468F-9EEC-080B77A00E05
RDM APP KEY: 7c35edbf90
Last Exception :
0 libxpc.dylib 0x000000020a019e98 __xpc_dictionary_insert + 96
1 libxpc.dylib 0x000000020a019e84 __xpc_dictionary_insert + 76
2 libxpc.dylib 0x000000020a01b944 __xpc_dictionary_deserialize_apply + 68
3 libxpc.dylib 0x000000020a01b8cc __xpc_dictionary_apply_wire_f + 136
4 libxpc.dylib 0x000000020a018da4 __xpc_dictionary_deserialize + 108
5 libxpc.dylib 0x000000020a00cdf4 __xpc_array_deserialize + 204
6 libxpc.dylib 0x000000020a01b9ec __xpc_dictionary_unpack_value + 120
7 libxpc.dylib 0x000000020a01bbf0 __xpc_dictionary_unpack_value_and_vend + 28
8 libxpc.dylib 0x000000020a01a4c4 __xpc_dictionary_look_up + 156
9 libxpc.dylib 0x000000020a01b094 _xpc_dictionary_get_array + 20
10 libdns_services.dylib 0x000000020a0b9a28 ____dnssd_client_connection_block_invoke_2 + 320
11 libxpc.dylib 0x000000020a015af0 __xpc_connection_call_event_handler + 152
12 libxpc.dylib 0x000000020a015f20 __xpc_connection_mach_event + 992
13 libdispatch.dylib 0x00000001b1657f6c __dispatch_client_callout4 + 20
14 libdispatch.dylib 0x00000001b16746ec __dispatch_mach_msg_invoke + 468
15 libdispatch.dylib 0x00000001b165f40c __dispatch_lane_serial_drain + 372
16 libdispatch.dylib 0x00000001b1675438 __dispatch_mach_invoke + 448
17 libdispatch.dylib 0x00000001b165f40c __dispatch_lane_serial_drain + 372
18 libdispatch.dylib 0x00000001b16600a4 __dispatch_lane_invoke + 384
19 libdispatch.dylib 0x00000001b166acdc __dispatch_workloop_worker_thread + 648
20 libsystem_pthread.dylib 0x0000000209fc1ddc __pthread_wqthread + 288
Exception Type: SIGSEGV SEGV_ACCERR
Exception Codes: fault addr: 0x0000000000000036
Crashed Thread: 7 _
Post not yet marked as solved
Hi team,
We found that the app reported a lot of crash stacks, and the top of the stack had the libxpc library feature, but we could not find the reason. These issues have only emerged since iOS 16 and are growing, can you provide some clues or provide some solutions? Thanks!
Crash backtrace can be seen as follows.
_ OS Version: 16.6.1 (20G81) Report Version: 104
SDK start time: 2023-09-20 18:42:40 RDM SDK Version: 2.7.27.1 RDM user id : 119902290602 RDM DeviceId: 0DB20076-F323-468F-9EEC-080B77A00E05 RDM APP KEY: 7c35edbf90
Last Exception : 0 libxpc.dylib 0x000000020a019e98 __xpc_dictionary_insert + 96 1 libxpc.dylib 0x000000020a019e84 __xpc_dictionary_insert + 76 2 libxpc.dylib 0x000000020a01b944 __xpc_dictionary_deserialize_apply + 68 3 libxpc.dylib 0x000000020a01b8cc __xpc_dictionary_apply_wire_f + 136 4 libxpc.dylib 0x000000020a018da4 __xpc_dictionary_deserialize + 108 5 libxpc.dylib 0x000000020a00cdf4 __xpc_array_deserialize + 204 6 libxpc.dylib 0x000000020a01b9ec __xpc_dictionary_unpack_value + 120 7 libxpc.dylib 0x000000020a01bbf0 __xpc_dictionary_unpack_value_and_vend + 28 8 libxpc.dylib 0x000000020a01a4c4 __xpc_dictionary_look_up + 156 9 libxpc.dylib 0x000000020a01b094 _xpc_dictionary_get_array + 20 10 libdns_services.dylib 0x000000020a0b9a28 ____dnssd_client_connection_block_invoke_2 + 320 11 libxpc.dylib 0x000000020a015af0 __xpc_connection_call_event_handler + 152 12 libxpc.dylib 0x000000020a015f20 __xpc_connection_mach_event + 992 13 libdispatch.dylib 0x00000001b1657f6c __dispatch_client_callout4 + 20 14 libdispatch.dylib 0x00000001b16746ec __dispatch_mach_msg_invoke + 468 15 libdispatch.dylib 0x00000001b165f40c __dispatch_lane_serial_drain + 372 16 libdispatch.dylib 0x00000001b1675438 __dispatch_mach_invoke + 448 17 libdispatch.dylib 0x00000001b165f40c __dispatch_lane_serial_drain + 372 18 libdispatch.dylib 0x00000001b16600a4 __dispatch_lane_invoke + 384 19 libdispatch.dylib 0x00000001b166acdc __dispatch_workloop_worker_thread + 648 20 libsystem_pthread.dylib 0x0000000209fc1ddc __pthread_wqthread + 288
Exception Type: SIGSEGV SEGV_ACCERR Exception Codes: fault addr: 0x0000000000000036 Crashed Thread: 7 _