Post

Replies

Boosts

Views

Activity

Core Image drawing corruption
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?
7
0
1.4k
Jul ’23
Is there a way to get the built-in list of anchor certificates from the OS?
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?
8
0
1.2k
Mar ’23
SwiftUI app cycle and opening an app document
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?
1
0
1.2k
Feb ’22
NWConnection send buffer and when to send more data
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?
16
0
4.8k
Sep ’21
Mount encrypted (password protected) volumes
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?
Replies
1
Boosts
0
Views
977
Activity
Feb ’24
Core Image drawing corruption
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?
Replies
7
Boosts
0
Views
1.4k
Activity
Jul ’23
Is there a way to get the built-in list of anchor certificates from the OS?
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?
Replies
8
Boosts
0
Views
1.2k
Activity
Mar ’23
SwiftUI app cycle and opening an app document
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?
Replies
1
Boosts
0
Views
1.2k
Activity
Feb ’22
NWConnection send buffer and when to send more data
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?
Replies
16
Boosts
0
Views
4.8k
Activity
Sep ’21