Syrmo is an IoT (Internet of Things) startup that provides skateboarders with insights into tricks they perform. How is this possible? A small device is attached to the skateboard. It is kind of a ‘smart riser pad’.
This device senses the movement of the skateboard and has an algorithm that can differentiate between different kinds of skateboarding trick. Once a trick is detected, the device sends movement data via Bluetooth LE to its companion smartphone app.
One of the many features Syrmo has is the ability to provide a 3D animated replay for every trick. Skateboarders can analyze how they perform their tricks by changing camera angles, zoom and playback speed.
Now let’s talk about some programming stuff
Soon after we had our first version of the 3D animated replay working, iOS 8 was launched and the new WKWebView API became available. We were really excited about this because we did not have to hack UIWebView to support WebGL and the performance was way better.
Well, that’s not entirely true, it is not just a pod. You also need to install the webview reloader server. A small npm package that serves files over an HTTP server and sends a push event (using socket.io) to the client to tell it that the source code has changed. When the web view receives a push event from the server running on your dev machine, it reloads its content.
Check it out! The project’s page has an example of how to configure your WKWebView in order to support the auto-refresh feature. As always, pull requests are welcomed.