xpc

Swift: XPC connection interrupted and app freezes?

只愿长相守 提交于 2021-02-16 13:26:07
问题 Ok, have no idea what is going on here but from what I understand from other questions (XPC connection interrupted in Xcode 7 for iOS 9) , XPC connection interrupted means theres a storyboard problem. Per a similar answer I opened the storyboard as source code and looked for repeated <keycommand> tags, but there aren't any. I had to copy and paste a storyboard from another project since something changed, and I believe this caused it. What are my options here? What could be causing this

How do you make a Swift class available in an XPC service?

烈酒焚心 提交于 2021-02-11 04:32:00
问题 I'm attempting to rebuild Apple's XPC "lowerCase" sample code from Objective-C to Swift. I understand XPC will, but I'm relatively new to Swift and Objective-C interoperability. When I use their exact sample code, which passes a String from the app to the target and back, it works. But when I try and replace that with my own custom class, Person , I get the error: NSXPCConnection: ... connection on anonymousListener or serviceListener from pid 4133: Exception caught during decoding of

How do you make a Swift class available in an XPC service?

半腔热情 提交于 2021-02-11 04:27:22
问题 I'm attempting to rebuild Apple's XPC "lowerCase" sample code from Objective-C to Swift. I understand XPC will, but I'm relatively new to Swift and Objective-C interoperability. When I use their exact sample code, which passes a String from the app to the target and back, it works. But when I try and replace that with my own custom class, Person , I get the error: NSXPCConnection: ... connection on anonymousListener or serviceListener from pid 4133: Exception caught during decoding of

How do you make a Swift class available in an XPC service?

孤街醉人 提交于 2021-02-11 04:25:41
问题 I'm attempting to rebuild Apple's XPC "lowerCase" sample code from Objective-C to Swift. I understand XPC will, but I'm relatively new to Swift and Objective-C interoperability. When I use their exact sample code, which passes a String from the app to the target and back, it works. But when I try and replace that with my own custom class, Person , I get the error: NSXPCConnection: ... connection on anonymousListener or serviceListener from pid 4133: Exception caught during decoding of

helper app sandboxing and security scoped bookmarks

天涯浪子 提交于 2021-01-28 03:23:01
问题 so Ive been tearing my hair out with this... I have a main app, and a helper app. both are sandboxed and are sharing data using App Groups. I talk to the helper app by way of NSXPCConnection. I have the helper app set up as a login item using SMLoginItemSetEnabled . the helper app runs as a daemon when the user has it activated. this all works well. the problem is with the security scoped bookmarks. The helper app needs to access system files. when i need to grant access to new locations,

CoreBluetooth XPC connection invalid

半腔热情 提交于 2020-12-01 02:00:43
问题 public class BLE: NSObject, CBCentralManagerDelegate { var centralManager:CBCentralManager! public override init() { super.init() self.centralManager = CBCentralManager.init(delegate: self, queue: nil) } public func centralManagerDidUpdateState(_ central: CBCentralManager) { switch central.state { case .unknown: print("unknown") case .resetting: print("resetting") case .unsupported: print("unsupported") case .unauthorized: print("unauthorized") case .poweredOff: print("powered off") case

CoreBluetooth XPC connection invalid

狂风中的少年 提交于 2020-12-01 01:59:30
问题 public class BLE: NSObject, CBCentralManagerDelegate { var centralManager:CBCentralManager! public override init() { super.init() self.centralManager = CBCentralManager.init(delegate: self, queue: nil) } public func centralManagerDidUpdateState(_ central: CBCentralManager) { switch central.state { case .unknown: print("unknown") case .resetting: print("resetting") case .unsupported: print("unsupported") case .unauthorized: print("unauthorized") case .poweredOff: print("powered off") case

CoreBluetooth XPC connection invalid

我与影子孤独终老i 提交于 2020-12-01 01:59:14
问题 public class BLE: NSObject, CBCentralManagerDelegate { var centralManager:CBCentralManager! public override init() { super.init() self.centralManager = CBCentralManager.init(delegate: self, queue: nil) } public func centralManagerDidUpdateState(_ central: CBCentralManager) { switch central.state { case .unknown: print("unknown") case .resetting: print("resetting") case .unsupported: print("unsupported") case .unauthorized: print("unauthorized") case .poweredOff: print("powered off") case

InterProcess Communication on MacOSX Lion

℡╲_俬逩灬. 提交于 2020-01-03 03:43:08
问题 I'm trying to figure out how to set up IPC between my custom app and a pre-made program. I'm using MacOSX Lion 10.7.2 and Xcode 4.2.1. It doesn't matter actually what program exactly, since I believe that a similar reasoning may be applied to any kind of external process. For testing purposes I'm using a simple bash script: #test.sh echo "Starting" while read out do echo $out done What I would like to achieve is to redirect input and output of this script, using my app to send inputs to it

How should Finder Sync Extension and Main App communicate?

送分小仙女□ 提交于 2019-12-28 13:39:08
问题 My use case: I have a 'MainApp' which does the syncing of files. I would like that 'MainApp' handles all server calls regarding syncing and other REST API calls such as document-sharing, etc. On the other hand, I would have a Finder Sync Extension which would show sync-status icon overlays. It would also have a file-context-menu-item 'Share' which would present a Share dialog where users can choose with whom to share the file. Questions: How should FinderSyncExtension and MainApp communicate?