Post

Replies

Boosts

Views

Activity

Comment on *Really* unusual XPC/Swift question
Ok. I've got this code, and proxy still ends up as nil. I'm still playing with it so hopefully I'll figure out on my own what I'm doing wrong. import Foundation class ConnectionHandler: NSObject, NSXPCListenerDelegate {     override init() { super.init() print("ConnectionHandler.init()")     }     func listener(_ listener: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) -> Bool { print("ConnectionHandler.listener()") newConnection.resume() return true     } } let handler = ConnectionHandler() let listener = NSXPCListener.anonymous() let endpoint = listener.endpoint listener.delegate = handler listener.resume() @objc protocol Hello {     func hello() } class HelloClass: NSObject, Hello {     override init() { super.init()     }     func hello() { print("In HelloClass.hello()")     } } let hello = HelloClass() let connection = NSXPCConnection(listenerEndpoint: endpoint) connection.exportedInterface = NSXPCInterface(with: Hello.self) print("Connection = \(connection)") connection.resume() let proxy = connection.remoteObjectProxyWithErrorHandler({ error in   print("Got error \(error)") }) as? Hello print("Proxy = \(proxy)") dispatchMain()
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21
Comment on Is there a way to track leaking file descriptors?
Although I haven't tried on iOS -- this was for macOS.
Replies
Boosts
Views
Activity
Apr ’22
Comment on A dumb question about NEVPNStatusDidChangeNotification
I haven't tried it yet, but NWPathMonitor / nw_path_monitor_t look promising.
Replies
Boosts
Views
Activity
Mar ’22
Comment on Having trouble getting the endpoint-security entitlement working
grrrr apple did not email me despite this thread being marked as watched.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Comment on Process arguments from audit token
That is beautiful code.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Comment on NEAppProxyFlow and IPv4 vs IPv6
I should clarify myself -- I have no problem with that! I often tend to use very, very precise working to make sure that what I'm saying is not confused for something else.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Yet another dumb Network Extension (App Proxy Provider) question!
Hm, maybe that wasn't. I changed it to subclass NETransparentProxyProvider, and my handleNewFlow method isn't being called at all. And all networking (even a ping I started beforehand) dies. Hm hm hm hm.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Yet another dumb Network Extension (App Proxy Provider) question!
Ah! THAT WAS IT! In one of my test programs, I was using NETransparentProxyProvider, but in this one I wasn't. That explains why I got confused between the behaviour I saw, the documentation that I read, and what I expected! You rock, my person.
Replies
Boosts
Views
Activity
Aug ’21
Comment on IP packet class in Swift
As I said, "I was just hopeful someone had already saved me a bit of work." It's mostly gruntwork; any cleverness is in how you handle IPv4 and IPv6, and how you handle adding TCP, UDP, ICMP, etc., on top of those.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
Or NO, the start seems to succeed, but then I get nothing else. Still investigating, but at least I have made progress! Maybe I should commit this.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
YES. Of all things I forgot to set a team. Yay me! Now it says not connected, which means I get to try to start it, YOU ARE SO AWESOME.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
Hm. Now I am getting error 9, which is validationFailed. So that means something is wrong with my signing, or one of the plists. That's an improvement from error 1, anyway. ;)
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
I never get a chance to call manager.connection.startVPNTunnel because the managers argument is empty ([]). But! I haven't tried NETransparentProxyManager, so I will try that!
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
I've submitted FB9454265. And am reusing this comment to say something useful!
Replies
Boosts
Views
Activity
Aug ’21
Comment on Very ignorant VPN network extension question
No, I am trying this for macOS. However, it was the only example I could find. :)
Replies
Boosts
Views
Activity
Aug ’21
Comment on *Really* unusual XPC/Swift question
Ok. I've got this code, and proxy still ends up as nil. I'm still playing with it so hopefully I'll figure out on my own what I'm doing wrong. import Foundation class ConnectionHandler: NSObject, NSXPCListenerDelegate {     override init() { super.init() print("ConnectionHandler.init()")     }     func listener(_ listener: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) -> Bool { print("ConnectionHandler.listener()") newConnection.resume() return true     } } let handler = ConnectionHandler() let listener = NSXPCListener.anonymous() let endpoint = listener.endpoint listener.delegate = handler listener.resume() @objc protocol Hello {     func hello() } class HelloClass: NSObject, Hello {     override init() { super.init()     }     func hello() { print("In HelloClass.hello()")     } } let hello = HelloClass() let connection = NSXPCConnection(listenerEndpoint: endpoint) connection.exportedInterface = NSXPCInterface(with: Hello.self) print("Connection = \(connection)") connection.resume() let proxy = connection.remoteObjectProxyWithErrorHandler({ error in   print("Got error \(error)") }) as? Hello print("Proxy = \(proxy)") dispatchMain()
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21