Posts

Post not yet marked as solved
1 Replies
267 Views
Is there an API that allows mounting a volume, just like DADiskMount(), but that also accepts a password or automatically requests keychain access for encrypted volumes? Could be APFS or CoreStorage volumes. How do you mount those programmatically?
Posted Last updated
.
Post not yet marked as solved
2 Replies
783 Views
I have written two custom Core Image metal kernels which I'm using to produce a CIImage (by chaining several filters). I'm drawing the output image in a simple view and whatever I use (CIImage, NSImage, CGImageRef), the image appears corrupted on screen, like some sort of graphics corruption (I've tried on two different machines with different systems). However if I add a simple step to write the image to disk from the CIImage then read it from disk and draw it in that very same view, then all is fine and the image appears correctly. What could possibly be happening here?
Posted Last updated
.
Post not yet marked as solved
8 Replies
635 Views
I am looking for a way to get the immutable list of anchor certificates from the OS. The aim would be to pass this list to SecTrustSetAnchorCertificates() in order to fail validation in case of man-in-the-middle attacks via a trusted certificate added to the keychain. This would hit a middle ground between doing nothing and doing full certificate pinning. Is there a way to achieve this?
Posted Last updated
.
Post not yet marked as solved
1 Replies
782 Views
I am writing a SwiftUI app cycle macOS app and trying to open a custom app document. I have added the appropriate entries to the Info.plist file and the document does open in my app. I am using NSApplicationDelegateAdaptor to provide an application delegate. The application(_ application: NSApplication, open urls: [URL]) app delegate method does get called but urls is an empty array. Furthermore an additional app window opens when opening my document. My app is not a document based app and my custom document is not associated with a class or an NSDocument thing. Is this broken in SwiftUI app cycle based apps or am I missing something? Is there a solution?
Posted Last updated
.
Post not yet marked as solved
16 Replies
2.9k Views
It was my understanding that it is ok to blindly send more data from the completion handler of the connection send() method. I've been testing this and the connection will enqueue enormous amount of data in-memory (gigabytes) and still happily call the completion handler for more. Seems like this is not the way to go, but then, how would I know when it is ok to send more data on the connection?
Posted Last updated
.
Post not yet marked as solved
4 Replies
680 Views
I need to provide information from my application to my network protocol framer to be used during the handshake but cannot find a way to do this. I'm not sending any message yet so cannot use NWProtocolFramer.Message. Is there any way to do this? I'm also looking for a way to provide information obtained during the handshake back to the application, ideally I would be able to attach such information to the connection itself so it can be retrieved later by the application. Only way I can think of for now is calling framer.deliverInput() during the handshake to deliver a fake message but that doesn't sound great. Is there a better way? I would love if there was some sort of storage attached to the connection itself that could be used to exchange information between the application and the protocol framer.
Posted Last updated
.
Post not yet marked as solved
4 Replies
614 Views
It was my understanding that the protocol framer would accumulate data until it is consumed, which I would do by returning a non-zero value from the framer.parseInput() block or by calling deliverInputNoCopy(). However it does not seem to be the case, at least not across severals calls to handleInput(). Per my testing, I am unable to parse the needed amount of data across several calls to handleInput(). Is it correct that the non-consumed data is dropped between calls to handleInput() and our implementations need to take care to accumulate partial data across several handleInput() calls? And if it is correct, I'm also quite confused by the TicTacToe sample code because it does not seem to worry about receiving a partial header. Is this a bug in the sample code?
Posted Last updated
.
Post not yet marked as solved
3 Replies
605 Views
Hello, I wrote a server and client using the Network framework and added the same protocol framer on both sides. It seems to work just fine. But then I wanted to add another protocol framer in the stack and things stop working. I can see that both protocols are started but for some reason the protocol at index 1 does not receive output on the client side and the server receives nothing. For purpose of testing I have simply duplicated and renamed the first protocol (which I know worked by itself) in order to create the second protocol. So I am not sure what's going on here. Any idea?
Posted Last updated
.