problem about xpc-Collection of common programming errors
indragie
osx cocoa launchd xpc launch-agent
How would you use a LaunchAgent inside the sandbox? I want to distribute a UI-less LaunchAgent app bundle inside my main application that I can launch on demand. The reason I want this instead of an XPC service is for the KeepAlive option, which will prevent launchd from automatically killing my process when its idle. This option doesn’t exist on XPC services.The documentation says that there’s a plist that needs to be copied into ~/Library/LaunchAgents, and this is obviously not possible inside
indragie
objective-c cocoa xpc nsxpcconnection
Is it possible to run multiple instances of the same XPC service using the XPC APIs found in Foundation.framework (NSXPCConnection, etc.)? The docs don’t provide much insight on this matter. EDIT: Did a quick test, and it seems like only one instance of the service is running even though I created two XPC connections. Is there any way to have it run another instance?
indragie
objective-c osx foundation xpc nsxpcconnection
The documentation for the interruptionHandler block of NSXPCConnection states:An interruption handler that is called if the remote process exits or crashes.However, the Daemons and Services Programming Guide states:XPC services are managed by launchd, which launches them on demand, restarts them if they crash, and terminates them (by sending SIGKILL) when they are idle. This is transparent to the application using the service, except for the case of a service that crashes while processing a mess
ride.inc
osx cocoa xpc
I implemented XPC as Apple reccomends it for high risk operations. The problem is that when XPC crashes it displays crash dialog to the user. I know that this code can sometimes crach, that is why I mplemented XPC in the first place. So is there any way I can suppress the crash report?If you need any details please add comment, I will update the thread ASAP.
Ole Begemann
objective-c facebook osx xpc
I am requesting access to a facebook account from within an XPC Service with the following code:self.accountStore = [[ACAccountStore alloc] init];ACAccountType *facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];NSArray *facebookPermissions = [NSArray arrayWithObjects:@”email”, nil];NSDictionary *facebookClientAccessInfo = [NSDictionary dictionaryWithObjectsAndKeys:facebookAppId, ACFacebookAppIdKey,facebookPermissions, ACFacebookPermiss
Web site is in building