Embracing the Future of iOS Development with SwiftUI and Swift Playgrounds

The conversation with indie developer Jan Mazurczak about making apps using just iPad & Swift Playgrounds

Ihor Malovanyi
8 min readJun 3, 2023

Since Swift Playgrounds 4, developers have been able to create and distribute apps on the App Store directly without using Xcode. Considering that Swift Playgrounds was initially intended to teach programming in Swift and quickly test code sketches, many people, including myself, are skeptical about these new features.

Swift Playgrounds is a revolutionary app for iPad and Mac that makes it fun to learn and experiment with Swift — Apple

Swift Playgrounds

A few weeks ago, I had this small Twitter conversation.

Nothing special, but one man, Jan Mazurczak, wrote that he has apps in production built with his iPad and Swift Playgrounds. It surprised me.

Yeah, I use Swift Playgrounds every day for code checking. But I was excited that the entire code process might be mobile.

Jan is an indie iOS developer. He has made apps since 2009 and has published several apps from his iPad. I wrote him and asked him to share his experience. And I am glad to share our conversation wrapped in this article.

Before starting reading, make sure you are not russian. By continuing reading, you confirm that you condemn the war in Ukraine unleashed by russia.

Glory to Ukraine! 🇺🇦

Introduction

In the rapidly evolving world of software development, efficiency and adaptability have become more crucial than ever. This article delves into the approach of Jan, a developer who has chosen to step outside the conventional methods of iOS development, embracing the simplicity and flexibility of Swift Playgrounds. Through this in-depth conversation, we explore how Jan’s working process has been shaped by this tool and his approach to creating software with minimal distraction. We’ll discuss the pros and cons of Swift Playgrounds, the process of app distribution and version control, and get a glimpse into Jan’s insights on the future of SwiftUI and Swift Playgrounds.

A Work Process With Swift Playgrounds

The work process is so important to make projects come alive. So, that’s why it was my very first question to Jan:

— What is your typical working process? Is it different from the usual development using Xcode?

— My favorite part is that Swift Playgrounds supports Swift Packages only as a dependencies management, and all Xcode fancy settings, custom scripts, and cocoa pods type of extensions are no longer a thing in Swift Playgrounds. Why is it good? Because if I switch the thinking model to that, suddenly I can work on any iPad without any particular setup except one free app installed from App Store. The tools set is something extra on top of what we do. I want something different to be as irrelevant to my process as possible so I can focus on the software I create instead of focusing on tools software that was meant to support me but consumes my time instead by adding complexity to my setup.

Instead of relying on Xcode’s complex settings and redundant features, Jan prefers to work efficiently on Swift Playgrounds.

Developers can work on any iPad without any particular setup except for installing the Swift Playgrounds app from the App Store. The tool allows to focus on the software creating rather than manipulating software development tools.

Developers can now focus on the creation of the software itself. By reducing reliance on complex tools, Swift Playgrounds allows developers to focus on the essential task: creating and refining their software. This perspective reemphasizes the importance of efficient and streamlined development environments, which ultimately reduce the barriers to creating software and allow developers to focus on crafting quality applications without the distraction of managing complex tools or settings.

Pros & Cons of Using Swift Playgrounds for iOS Development

— What are the pros and cons of using Swift Playgrounds for iOS development? How do you handle debugging and testing your applications using Swift Playgrounds? Yeah, I know it’s possible to run an app on iPad, but didn’t you miss UI inspector, graphs, profiling, breakpoints, etc.?

— Instead of breakpoints, I use print("") to see what’s happening runtime.
I don’t use UI inspector. SwiftUI is an inspector itself as it’s declarative, so you won’t add any dangling views.
I don’t need profiling. I don’t work with developers who can destroy the performance I designed, so I don’t need to check what’s wrong all over.
Sometimes I create many test functions that will execute on runtime and show a fatal error as soon as some check fails. This testing hook is plugged into one `onAppear` method, so it’s easy to disable for the production archive.
Using Swift Playgrounds is more straightforward and faster than Xcode, it ignores big-team needs (this is a plus because big teams are bad for the software), and it focuses on the software itself.
In other words, Xcode contains a lot of business-improving tweaks. At the same time, Swift Playgrounds remains a pure programming tool, so everything you do there is talking with a machine rather than using existing software to perform actions (like profiling, etc.). And I miss CloudKit support.

Jan uses a different paradigm to handle development, preferring direct interaction with the machine over more conventional, tool-assisted methods. In Jan’s view, simplifying the process leads to more efficient development, as it minimizes distractions and allows for direct focus on the software itself.

However, this approach may only fit some developers or project requirements, particularly for larger teams or more complex projects requiring more advanced features in fully-fledged IDEs like Xcode. In such cases, the limited functionality of Swift Playgrounds may be a hindrance rather than a boon.

Version Control & App Distribution

— How do you handle app distribution and updates?

— Distribution is happening in a couple of ways:
- directly from Swift Playgrounds for simple apps
- from Mac if some fancy provisioning is needed
- sometimes, I copy-paste parts into some older Xcode project after I have them prepared standalone on iPad
- and when I work on the package, I copy and paste the directory from the Swift Playgrounds app where I work on that package into the separate repository where files are available like the standard Swift package rather than a standalone app. Then, this type of library, if public, can be imported into another Swift Playground without cluttering it.

— How do you manage version control?

— I use a third-party app called Working Copy for git version control on iPad.

Working Copy — Git client

This approach emphasizes the potential of Swift Playgrounds as a portable, flexible development environment that can be integrated with other tools and platforms when needed. However, the process involves manual work, such as copy-pasting code between platforms, which might only be ideal for some developers or projects. Despite this, it’s an interesting perspective on how iOS app development can be adapted to different tools and workflows, giving developers more freedom to choose the best approach.

Developing Apps With SwiftUI & Swift Playgrounds: Future Perspectives

— How many times have you bargained between planned features and Playgrounds limitations? How was it?

— As an Indie developer, I can always think differently about the features I implement, so this is how I have rolled since 2009. Regardless of the tools, I prefer to make my features slightly different rather than implement hacks or third parties. I understand this isn’t necessarily the case in the business world, but I do programming because I love programming, and no capitalism will destroy it for me.
For beginners, I’d recommend installing Swift Playgrounds and kicking it off by forgetting all heavy constraints and focusing on software design. That’s it, and Swift Playgrounds is a starting point itself. I’d recommend it for both learning and actual development. Swift Playgrounds books delivered by Apple and other folks are introductions to programming in general, but experienced dev will skip that part.

Jan’s perspective here advocates for an approach to programming that emphasizes creativity, simplicity, and the joy of coding. By advocating for tools like Swift Playgrounds, they argue for a more accessible and flexible approach to software development, where the needs of the software, the preferences of the developer, and the possibilities of the development environment shape the final product. This philosophy might be particularly appealing for independent developers or those new to programming.

However, it’s worth noting that in more constrained environments, such as larger development teams or projects with strict requirements, this approach might need to be balanced with more traditional development methodologies and tools that can handle complex features and rigorous testing and debugging processes.

Conclusion

Swift Playgrounds offers a fresh perspective on iOS development, challenging the necessity of traditional, complex development tools. Jan’s methodology showcases a new way of thinking about software development, shifting focus back to the creation and design of the software itself. While Swift Playgrounds’ streamlined approach may not suit every developer or project, particularly those with more complex requirements, it undeniably opens up new avenues for individual developers, beginners, and those who value simplicity and flexibility. However, in more complex scenarios, a balance may need to be struck with traditional development tools that can provide rigorous testing and handle intricate features. Regardless, Jan’s experience with Swift Playgrounds offers a thought-provoking perspective, reemphasizing the importance of focusing on the joy of coding and the art of creating software.

— And finally, can you share your apps built using iPad and some interesting cases in the development process?

— At FLYP, I build a 3D engine and a good portion of features (including custom file format and some fancy stuff) entirely on iPad. Then I deliver it to the business part of the team as a Swift package, and they use it to display 3d and do stuff in the app you see in the App Store. And my legendary Finger Cut was also rewritten on iPad.

FLYP app

One more thing…

If you like my content and want to support me, please buy me a coffee and subscribe!

Also, I have the Telegram channel Swift in UA, where you can find more exciting things.

Thank you for reading. See you soon!

--

--