Congrats our team to launch a private browser in 1Locker app! Protecting your privacy is more important than ever, and we’re ruthlessly protecting your photo, video, and browsing history.

I’ve built and released 20+ apps as an indie developer / startup founder since 2009. Building the apps is always fun, you learn about the users, create beautiful designs, write Swift code, fine-tune the app’s performance; finally you’re ready to hit the Submit button in AppStoreConnect.

Then you realize you still need to build a website for your app 😰.

You’re aiming your app for millions of users; only a few of them will actually pay attention to your website. But you’re required to build it and host it somewhere. …

In our last article, we walked through the experience of building the UI part of a production app, with SwiftUI. In this article (Part 2), we’ll cover how the UI module is interacting with the services: MeasurementService, HistoryDataService.

Initiating MeasurementService

MeasurementService is at the heart of the app’s data flow:
- It initiates hardware camera
- It takes the raw readings from camera, and passes raw readings to HeartRateCalculator, to actually calculate heart rate
- It periodically reads output from HeartRateCalculator, and update the stored latestHeartRate value (a state)
- Its states are observed by UI module

This is how we config…

SwiftUI has been loved ❤️ by the iOS developers, for its simple and declarative syntax. Except that not many people use it in production 😞. The minimum iOS 13 requirement, and the potential disruptive syntax change in the near future, all scared developers away.

We all know the best way to learn, is to get your hands dirty; and I believe getting your hands dirty in the face of the market, is even better. So I took the challenge to build a heart rate monitor app with SwiftUI, and published it in the App Store. …

Chen Li

Entrepreneur, prev engineering at Instagram & Apple. Twitter @chen_mobile.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store