iOS from zero to App Store at Procuret
Tags: swift, swiftui, ios
Published: 2023-05-28 21:03:41

---
title: iOS from zero to App Store at Procuret
published: true
description: Learnings from bringing a new fintech app to the App Store
tags: swift, swiftui, iOS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d097xymz5p4m6h50g2uo.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-25 20:40 +0000
---

[Procuret](https://procuret.com) is a business-to-business payments platform. Like many fintech startups, we bootstrapped with a web app. Web apps offer near-instant deployment, tight iteration loops, and a permission-less development environment. Perfect for finding product-market-fit.

Native iOS apps offer great accessibility, blazing performance, and a type-safe development environment. They are ideal for offering a higher quality experience when product-market-fit has been achieved. Given Procuret's growth, it is natural for us to move focus from web to native.

I got started writing apps in [SwiftUI](https://developer.apple.com/xcode/swiftui/) when it was first released. It was not production ready. Four years has made a huge difference. SwiftUI is now in a great spot. We found almost everything just works.

![Procuret iOS in Xcode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jktondluoiinmb8fqcbk.png)

One senior (myself) and one junior ([Kayla Hoyet](https://www.linkedin.com/in/khoyet/)) worked on the app. Combined we spent about 6 months "full-time-equivalent" to build it, spread out over one calendar year. We wrote 24,000 lines of code.

Of that, 8,000 lines is the [open-source API library](https://github.com/procuret/procuret-swift). Take a look to see how we structure our data.

We were thrilled to discover how easy it is to deploy to iPad as well as iPhone. The iOS app for both platforms is a single build.

![Procuret on iPad](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lu98hgoh1hcm2u2kbopf.jpg)

At runtime, we query the [`horizontalSideClass`](https://developer.apple.com/documentation/swiftui/environmentvalues/horizontalsizeclass) to determine how much data to display. The Instalment Schedule is a great example. In the screenshot below, note that we display their bare minimum amount of data for iPhone, but robust data on iPad.

![Comparison of Procuret iOS running on iPad & iPhone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4kexzhirtg0q4vvfppyr.png)

With 20/20 hindsight, I wish we had trusted [`NavigationPath`](https://developer.apple.com/documentation/swiftui/navigationpath) from the start. It was introduced in iOS 16 and works very well. Initially I was wary of it, but we adopted it aggressively late in the development cycle.

```swift
// A very common pattern that `NavigationPath` makes easy:
// Popping back to the root view from deep in a `NavigationStack`.

@State var navigationPath: Array<Destination> = []
@State var shouldPopBackToRootView: Bool = false

// later on...

.onChange(of: self.shouldPopBackToRootView) { newValue in
    if newValue == true { self.navigationPath = [] }
}
```

We found the App Store Review process navigable, fast, and clear. Our Test Flight builds were typically approved within 18 hours. App Store approval came within 36 hours.

SwiftUI is very good. It puts native app deployment within reach for small teams. It is fast to write, resistant to bugs, and a pleasant working environment for the developer.

If you have questions about iOS app development, ask here in the comments or [@hugh_jeremy](https://twitter.com/hugh_jeremy) on Twitter. Check out [Procuret on the App Store](https://apps.apple.com/au/app/procuret/id1634745293) to access our flexible payment options. It is available to businesses in Australia and New Zealand.