Nonstrict
Home Blog
Join forces

Engineering

Studio Display Camera occasionally fails to produce frames

Every one in 24 times, when trying to record the camera of the Apple Studio Display, no video is produced and the camera turns itself off. The camera just silently fails without reporting any error.

Tom Lokhorst

Tom Lokhorst

March 31·1 min read

Engineering

Distorted Audio when recording external microphones using AVCaptureSession

In certain situations, when recording audio on macOS using AVCaptureSession and AVAssetWriter, the resulting audio file can sound distorted. This issue is caused by AVCaptureSession reporting CMSampleBuffers of different audio formats.

Tom Lokhorst

Tom Lokhorst

February 20·3 min read

Engineering

Stretching audio by small amounts using Swift

Stretching an audio file to a certain length can be useful to fix lipsync issues. Our previous approach didn't work for stretching small durations over a large amount of time. We now have a new solution.

Tom Lokhorst

Tom Lokhorst

December 3·4 min read

Engineering

Handling audio capture gaps on macOS

Audio capture on macOS can sometimes contain gaps. This article explains how to detect and handle these gaps to maintain proper audio/video sync when recording to files.

Mathijs Kadijk

Mathijs Kadijk

November 23·3 min read

Engineering

Sending the initial workout configuration through HealthKit

`HKWorkoutSession` will throw 'Remote session delegate is not set up' errors at you when sending data too soon. So how do we share data before starting the actual workout?

Mathijs Kadijk

Mathijs Kadijk

May 20·3 min read

Engineering

Request and check local network permission on iOS and visionOS

The local network permission has, in contrast to other permissions, no simple way to request the permission or check its autorization state. We use `NWBrowser` to roll our own permission helper.

Mathijs Kadijk

Mathijs Kadijk

March 29·5 min read

Apps

Launching Bezel for Apple Vision Pro

Today we launch our app Bezel for Apple Vision Pro! 🚀 Bezel makes your iPhone appear as a 3D model in your space with the screen wirelessly mirrored.

Mathijs Kadijk

Mathijs Kadijk

February 2·1 min read

Engineering

Using Darwin Notifications to communicate with App Extensions

On iOS, Darwin Notifications can be used to send and receive notifications between an app and its extensions. We wrap the old C-style functions to be easier to use from Swift.

Tom Lokhorst

Tom Lokhorst

December 11·3 min read

Engineering

Transferable drag & drop with only a FileRepresentation not working on macOS

Supporting file dragging in macOS is a breeze with SwiftUI using the new Transferable protocol. However only having a FileRepresentation doesn't work for apps like Finder.

Mathijs Kadijk

Mathijs Kadijk

December 8·4 min read

Engineering

Incorrect output when writing a single AVTimedMetadataGroup

Timed metadata can be written to a track using AVAssetWriter. However if you append only one AVTimedMetadataGroup the results will be unexpected due to buggy behaviour.

Mathijs Kadijk

Mathijs Kadijk

December 4·3 min read

Engineering

Working with custom metadata in mp4 files

It is very useful, but also quite a pain to work with custom metadata in mp4 files with AVFoundation. Let's bridge the undocumented gaps and get it to work.

Mathijs Kadijk

Mathijs Kadijk

November 28·5 min read

Engineering

Stretching an audio file using Swift

Stretching an audio file to a certain length can be useful to fix lipsync issues. It isn't immediatly obvious how to do this using Swift. Here is a simple way to do it.

Mathijs Kadijk

Mathijs Kadijk

November 23·4 min read

Apps

Launching Bezel

Today we launch our macOS app Bezel! 🚀 It helps you to show an iPhone on your Mac. Just plug it in the cable and it shows up, simple as that.

Mathijs Kadijk

Mathijs Kadijk

September 26·1 min read

Talks

A Mac-tastic indie adventure

Mathijs gave a talk at CocoaHeadsNL about our journey as a company so far. What have we done in the last year, and what are our dreams for the future.

Mathijs Kadijk

Mathijs Kadijk

September 25·38 min read

Engineering

Display reconfigurations on macOS

Observing display reconfiguration changes on macOS. Moving from C function-pointer based API to a modern Swift AsyncStream.

Tom Lokhorst

Tom Lokhorst

July 10·3 min read

Engineering

Working with C callback functions in Swift using parameter packs

Moving from a C function-pointer based callback API to Swift closures with generics. And a look at the future with parameter packs.

Tom Lokhorst

Tom Lokhorst

June 27·5 min read

Engineering

AVAssetWriter leaking memory when segment data is used in Swift

Segment data delivered to AVAssetWriterDelegate is leaked when the delegate is implemented in Swift. You either need to implement the delegate in Objective-C or deallocate the data yourself. This issue is fixed by Apple in macOS 13.3.

Mathijs Kadijk

Mathijs Kadijk

June 21·3 min read

Engineering

A look at ScreenCaptureKit on macOS Sonoma

The new macOS introduces three new features: Presenter Overlay to add your webcam to a screen share, a new screenshot API, and a built-in picker UI to select a window or screen to share.

Tom Lokhorst

Tom Lokhorst

June 14·5 min read

Engineering

AVAssetWriter crash creating CMAF compliant segments

Using AVAssetWriter to create CMAF compliant segments in realtime is unstable on Intel macs when the frame rate is dynamic. You either need to switch away from CMAF, disable expectsMediaDataInRealTime or ensure a stable frame rate.

Mathijs Kadijk

Mathijs Kadijk

May 26·3 min read

Engineering

Mentioning SCStreamError crashes on older macOS versions

A public service annoucement for those using ScreenCaptureKit in an app that also needs to run on macOS < 12.3 (Monterey).

Tom Lokhorst

Tom Lokhorst

March 13·2 min read

Engineering

Recording to disk using ScreenCaptureKit

Saving a screen capture to disk has some interesting edge cases when using ScreenCaptureKit. The documentation and WWDC videos don't really cover using the captured frame samples. We created an example.

Tom Lokhorst

Tom Lokhorst

January 31·7 min read

Engineering

Using async/await in a commandline tool on older macOS versions

Building a commandline tool using Swift concurrency isn't as straight forward as you'd hope. Running on macOS pre-12 linker errors appear and back deployment is undocumented. We figured it out and documented it in this article.

Mathijs Kadijk

Mathijs Kadijk

January 30·7 min read

Engineering

Recording to disk using AVCaptureScreenInput

On older macOS versions, ScreenCaptureKit isn't available. We created an example project demonstrating screen recording using the older AVCaptureScreenInput.

Tom Lokhorst

Tom Lokhorst

January 29·2 min read
E-mail GitHub Mastodon Mathijs Kadijk on Mastodon Tom Lokhorst on Mastodon Twitter LinkedIn

Copyright 2023-2024 Nonstrict B.V. based in Amersfoort, The Netherlands — KVK 89067657 — All Rights Reserved.