TIME SYNC / FILM SLATE

For multiple purposes, we needed to find a way to sync multiple iOS devices together and send data between them. For time sensitive matters like synchronizing cameras and audio during shoots, we came up with a method to reliably sync devices clocks.

As Apple doesn’t actually allow apps to change the system clock’s behavior, we came up with our own NTP syncing implementation using algorithms described here and here. As a short rundown, we send a total of 300 packets via the MultiPeer Connectivity framework and use these to gather a mean deviation between both devices. This is stored locally on the device that initiated the sync, allowing for multiple devices to sync to one “master” device/time.

Please note that syncing has to happen one device at a time due to the nature of how our framework handles the packet exchange. We may add batch syncing at a later time.

After this we can send timestamps at which the slate should fire to and from all devices and execute the trigger function at that point in time.

Current bugs: SwiftUI handles @Published UI updates in a way we do not quite understand yet. This leads to the first trigger occasionally being offset. While all devices show the same time throughout the call of the function, SwiftUI delays toggling between the standard and “triggered” screen. As this may lead to confusion among users as to whether the devices are in fact synced correctly, we are looking into this.

asdeeee
sdfggggggd