top of page
Search
  • Writer's pictureOm Chachad

What it’s like building an app entirely on iPad Swift Playgrounds | Pencilera

Last week, over on Starlight Apps LLP, I launched an exciting new app called Pencilera. It’s an app that turns your Apple Pencil into a camera remote for times when you want to capture the moment but don’t want to get into the tedious process of setting up timers. It utilizes the Double Tap and Squeeze gestures found on the Apple Pencil 2 and Apple Pencil Pro, respectively.


Here’s a small video I crafted with the help of some of my friends to showcase Pencilera in action.





Thanks to Arsh Jiwani and Joshua Bosco for helping me film the video, the launch couldn’t have been the same without them. I had a lot of fun directing and editing the video, it’s one of the best examples of “less is more”, it beautifully captures the app’s functionality in a short and simple manner.




The launch of Pencilera was the best launch I’ve ever had for any of my apps! The community has shown an incredible interest in the app, and it was featured by various websites like 9to5Mac and Mac Life. It also got ranked on the Apple App Store for iPad, in the Top Free Apps section for Photo and Videos in nearly all regions and All Categories in some regions. Going up to #5 in Luxembourg, #7 in Germany, #9 in Austria, #87 in the United States, and #122 in India to name a few. I’m incredibly thrilled by the response, and excited to keep building the app to add more functionality. I’m also working on a fix for the app which prevents it from working on the new M4 iPad Pro.



The app icon is one of the most intricate ones I’ve designed yet. I really appreciate my friend Arnav Hattiholi for his guidance and feedback for some aspects of the icon’s design. I wish I could show you how the icon has shaped over time, because it really was quite the journey. Unfortunately, the icon files were lost and I had to recreate it from the ground up, so I can’t really show you the earlier versions.



I had the idea for this app from a problem I was facing in my day to day life. My school doesn’t allow us to carry smartphones, and I’ve had to use an iPad whenever we take any group photos. Setting timers would get frustrating because you have to hold your pose and smile for 10 seconds, and if someone blinks, you have to repeat the process all over again. I walked a few meters away from my iPad and used the double tap gesture to ensure it had enough bluetooth range, and as it turns out, it did. I recognised and seized the opportunity to turn my Apple Pencil into a camera remote so I could simply double tap when everyone was ready. I was rather surprised by the fact that no one had built such an app before, so I knew I had to be the first. Throughout the process of building the app, I demoed it to my friends and teachers and so many of them couldn’t believe that this wasn’t a native feature, and that’s when you know you’ve built a great app.




When building Pencilera, I decided I would try something different with this app. I took up the challenge to build this app from start to finish, entirely on an iPad, using Swift Playgrounds. I felt like it would only be fitting for a simple iPad app to be built on iPad. As is the case with my other apps, this one is also open sourced, which means anyone can learn from it or contribute to it.


Now, it’s also important to note that I made the process of coding on the iPad a little easier for myself by taking an Apple Sample Project for Capturing Photos and basically modifying it to the needs of this application. This reduced the burden of me having to manually build everything out from the ground up on iPad. Either ways, here’s how the experience was building on iPad Swift Playgrounds, everything from the good, the bad, to the ugly.


The Good

The Swift Playgrounds App is an interesting one! It’s a simplified version of Xcode, and makes certain things a lot easier than traditionally making the app in Xcode. It comes with a lot of interactive templates that we can use to learn things from, which matches with the App’s purpose of being a student friendly app. There’s also an easily accessible set of presets to quickly add controls and views without having to type them out, this makes it great for learning if you’re new to SwiftUI.


If you’re prototyping and don’t have the time to design a custom app icon, the inbuilt icon generated lets you create placeholder icons that are far more interesting than the plan old blank icon. However, it’s important to keep in mind that you do need to design an icon for production, these icons can only be used during the prototyping stage.


The Swift Playgrounds File is stored on iCloud by default, meaning it is synced across your devices. If you have multiple iPads or want to work between an iPad and Mac, that’s possible too! It also requires a lot less storage for caching, unlike the Mac which gobbles up tens of gigabytes of space within seconds.


The best part about building in Swift Playgrounds is being able to instantly deploy the app on device and test it, and not requiring two devices to do so. Despite having an A14 iPad Air, it still builds the app instantly. You can see your code come to life within seconds, and it especially makes a difference for an app like mine which is completely dependent on a physical device, both in terms of having a camera and an Apple Pencil connected via Bluetooth. This characteristic of the app helped speed up the process by quite a bit. It’s also amazing to be able to code on just a lightweight iPad, and not having to carry around a heavy Mac at all times. I could make changes to my app on the go without having to pull out my Mac, it reduces the friction in developing apps.



The app also turns the software keyboard into one designed specifically for programming. However, I’m not sure anyone would want to code without a physical keyboard attached to their iPad, but it gets the job done for when you need to make small changes on the go.



When publishing the app, the process is much simpler, the build number is automatically inferred and you do not need to manually change it every time when uploading to App Store Connect. It’s a neat quality of life feature that I wish we had on Xcode, especially for Mac apps since the convention for build numbers on Mac is rather annoying to work with.


The Bad

Swift Playgrounds natively only supports SwiftUI, and there’s no UIKit support unless you wrap everything from UIKit into a UIViewControllerRepresentable and work with it that way. I don’t use UIKit myself, so that wasn’t an issue for me, but if you do, then this is important to keep in mind.

The Previews don’t work for individual views, and instead just show the default WindowGroup. Individual previews used to work when the app initially came out but looks like they simply do not work anymore. I really do hope they fix this soon.


Swift Playgrounds completely lacks a version control system. I had to use an app called Working Copy which allowed me to push commits to GitHub from my iPad and roll stuff back if I needed to, and even then, there would be no way for me to see the changes I made within Swift Playgrounds itself like I can see in Xcode. This comes with the downside of not being able to store the project in Swift Playgrounds, and you have to open the project from the Files app every single time. This is something Apple certainly needs to work on, but I would imagine a versioning system isn’t the biggest priority for students trying to build their first app on here.


All the files are organized alphabetically, and we can’t manually adjust their order. This can get annoying in terms of organizing files, and folders are the only way to clean things up.


There’s a limited amount of support for frameworks and capabilities, and there’s basically no support for App Extensions whatsoever. There’s no Info.plist file that you can add stuff to, for times when you want specific control over your apps capabilities . This is particularly frustrating because it restricts my use of this app to only basic applications like this one. None of the other apps I’ve built could have been built using Swift Playgrounds.


The Ugly

The compiler is quite frankly abysmal, it fails to find where the error stems from and when there is one, it will try to build for minutes before just saying “An error was found”. This gets rather annoying since it means I have to manually go through all code to find an error sometimes, and it just turns out to be a missing bracket.


There’s no way to change the supported platforms such as only allowing it on iPad and not iPhone, I had to AirDrop the .swiftpm file to my iMac and modify the package contents via TextEdit to remove support for iPhone. This can especially be annoying for people who don’t have a Mac, which is most likely a majority of the audience for this app.


A lot of the packages I wanted to use when making this app simply refused to work, and the error messages that it gave out were rather unhelpful. Turns out, any package that has a sample Xcode project inside it will fail to compile. I had to specifically find packages that did not have sample Xcode projects so that I could use them for Pencilera.



Well, so is it possible to build an app on iPad?

Surprisingly, the answer turns out to be yes. In fact, I didn’t use any of the latest M1, M2 or M4 iPads, I used a 2020 iPad Air with an A14 chip, and it goes to show that you don’t need the latest and greatest to build something cool either, you can make great use of what you already have.

Unfortunately, there is a catch to me saying yes earlier in this answer, and it’s the fact that Swift Playgrounds is still largely limited. The functionality of the Swift Playgrounds has been growing over the years since Apple has been moving away from configurations panels in Xcode and has embraced configuring stuff in code, especially for things such as SwiftData or AppIntents; and while this has allowed Swift Playgrounds to be able to do a lot more than it otherwise could, you still can’t add any App Extension and the capabilities you can add are also limited to 20 that Apple has provided. You could decide for yourself whether Swift Playgrounds is enough for you based on the Pros and Cons I described throughout this blog post; you’ll have no problems building simpler applications, especially Single View Applications, and it’s a great way to possibly build your first app and start learning. Swift Playgrounds is in fact geared towards students, and the learning resources that are included make it a great way for folks to start learning how to code and familiarise themselves with the Swift programming language and the SwiftUI Framework.



The App Review “Nightmare”

The App Review process was quite brutal for Pencilera, it took over 25 days for the app to finally be approved. It took 1.5 weeks after initially going to In Review for them to first reject it for Legal reasons. I complied to their requests by changing the app icon to a generic stylus-like image rather than an Apple Pencil, which as it turns out, I like better than the original icon. I also had to change the App Store Screenshots since they also featured an Apple Pencil, however I believe that Apple should be allowing such images to be present in the screenshots, especially for apps that revolve around Apple Pencil for their primary functionality. (FB14750075). Anyways, I’m so happy to see that it was eventually approved, I was a little scared about whether Apple would consider such use of the Apple Pencil as appropriate for the App Store or not; turns out they did!


I had so much fun working on this app, seeing the smiles on people’s faces when they had that “Aha moment” after double tapping the pencil and seeing the photo being taken truly put a smile on mine too. I had so many cool reactions captured using Pencilera, in fact, I’m turning all these photos into a collage that I’ll put up in my room, because it’s a testament to my dedication towards building not just apps, but building delightful experiences.





I’m also incredibly thrilled by how well the launch was, people loved the idea and it went on to be ranked on App Store charts in the first two days of launch. If you haven’t already checked Pencilera out, I urge you to do so. It’s completely free to use and comes with an optional set of tips that you can use to help support the development of the app.


Thanks so much for reading, I hope you enjoyed it! I wasn’t able to post for the last two weeks since I was busy with the launch of this app and other school stuff. I’m also announcing that I’m shifting my posting day from Friday to Saturday since that works out much better for me. See you next week!


0 comments

Comments


bottom of page