Spiro - Swift Playgrounds 4 app created on the iPad

Overview

Spiro

Swift Playgrounds 4 app created on the iPad^.

^ Xcode also used as explained below.

🏙 Screenshots

   

🤔 What is Spiro?

An interactive animating spirograph generator.

I wanted to create an app to explore the development and deployment experience of Swift Playgrounds 4 on the iPad.

🧐 Why open source?

To share learnings.

To show how powerful/easy SwiftUI can be to create an app, especially now with Swift Playgrounds 4.

Most of the code was obtained from Creating a spirograph with SwiftUI, so it makes sense to keep things transparent/open and hopes that it can help someone else out there.

🙇🏻 Credits

Huge sincere thanks goes to Paul Hudson and his 100 days of SwiftUI series where I have learnt most of my SwiftUI knowledge.

The code to draw these lovely hypotrochoids was obtained from https://www.hackingwithswift.com/books/ios-swiftui/creating-a-spirograph-with-swiftui

🧑🏻‍💻 Getting Started

Swift Playgrounds 4 on iPad

There are many different methods to get Spiro.swiftpm to run on Swift Playgrounds 4 on the iPad.

Method Steps
Share from macOS via AirDrop Clone this repo, share the Spiro.swiftpm via AirDrop to your iPad, it will open on Swift Playgrounds 4 on the iPad.
Share using iCloud Drive Clone this repo, copy Spiro.swiftpm into your iCloud Drive, on the iPad open Swift Playgrounds 4, tap on Locations and locate Spiro.swiftpm within iCloud Drive.
Working copy app (using just the iPad) Download https://apps.apple.com/us/app/working-copy/id896694807, Clone this repo within the working copy app, Open Swift Playgrounds 4 and working copy side by side using multitasking, Drag Spiro.swiftpm from working copy into "My Playgrounds".

💻 Xcode on macOS

Open Spiro.swiftpm via Xcode. Playgrounds 4 app running on macOS cannot open the project.

🧑🏻‍🏫 Learnings

Here are some things I've learnt along the way.

☁️ iCloud vs git

. iCloud syncing git
Pro All automated and integrated into macOS and iPadOS Version control, history, branch workflow, multiple contributors, etc
Con No version control, no visual way to resolve conflicts Requires 3rd party app (with paid subscription) to manually use git, or manually sharing project file back to macOS to manually commit, etc

After creating a new project in Swift Playgrounds 4 on the iPad, I noticed that is used iCloud drive to sync to the macOS. This allows us to work across both iPadOS and macOS on the same project.

However there is no version control, history, branching all the good things that come with git that are used on a daily basis for professional apps.

This image shows an issue of resolving conflicts based purely on device and timestamp.

After some investigation, I found this tweet https://twitter.com/WorkingCopyApp/status/1471231127264415744.

Working copy is an app that allows git access with drag and drop support...

...so we can drag the project file from Working copy to Playgrounds when we want to work on the iPad...

...and drag it back from Playgrounds to Working copy to commit any changes back to git.

🥺 Submission issues

Issues have been reported to Apple: FB9832713

After upgrading to Swift Playgrounds 4 and testing the submission functionality, I was given the following error.

Upon accepting the latest terms and agreements I tried again with the feature complete version of the project and was faced with the following error.

I proceeded to create the app like any other app by creating an explicit App ID via the Certificates, Identifiers & Profiles on the Apple developer portal. I have also created the new app via App Store Connect selecting the bundle ID I have just created. Upon attempting to submit again, I was given the following error.

This did not seem right, after checking the team settings under App Settings, everything was correct so I decided to try again.

It appeared to be successful, however after a short while, an email was received.

Upon inspecting the project on both Swift Playgrounds 4, and on Xcode, there was no such entitlement option (as Swift Playground 4 apps are simplified compared with normal Xcode projects files).

It was at this point that I decided to use Xcode to submit the binary.

And it was submitted successfully this time. 💪🏻

🤔 Development on Xcode

By opening the project on Xcode, we can see that it is vastly simplified compared to ordinary Xcode projects. (no deployment target, launch screen, build number, build settings, build phases, etc.)

🤓 Minimum deployment target

After submitting to App Store Connect, we can inspect the build metadata and note the minimum deployment targets.

☁️ Xcode Cloud?

We can also note that Xcode Cloud does not support this project type yet.

🚀 What is next?

Just some ideas to further improve this project.

Thing Description
Canvas https://developer.apple.com/documentation/swiftui/canvas to optimise drawing performance.
Smoother animations The primary animation is performed by linearly incrementing or decrementing the distance. This will be smoother and provide an ease in ease out effect by using the values of a sine wave (improving that jarring sudden shift in direction).
Infinite animation Super imposing 2 spirographs offset by half of the animation (so they both fade in, grow, and fade out) will make the animations appear like an infinite zoom effect.
Amount scroller Using the amount field on the spirograph, we can show the gradual drawing effect to create the spirograph, this could be a nice addition to restore but directly conflicts with the primary animation.
You might also like...
React Native Todo List example app which uses Redux for managing app state
React Native Todo List example app which uses Redux for managing app state

react-native-redux-todo-list A sample todo list app developed by using React Native and Redux. How to run the app Install react-native If you don't ha

Google-Blogger-iOS-App - Using Google Blogger API to build an iOS app like Medium

Google Blogger iOS App Using Google Blogger API to build an iOS app like Medium!

Codepath-intro-prework - Hello World iOS App | Prework Project for CodePath Intro to Mobile App Development
Codepath-intro-prework - Hello World iOS App | Prework Project for CodePath Intro to Mobile App Development

Hello World iOS App App Description Prework Project for CodePath Intro to Mobile

Turn your Swift data model into a working CRUD app.
Turn your Swift data model into a working CRUD app.

Model2App is a simple library that lets you quickly generate a CRUD iOS app based on just a data model defined in Swift. (CRUD - Create Read Update De

A sample app that implements MVVM architecture using Swift, ViewModel, Alamofire
A sample app that implements MVVM architecture using Swift, ViewModel, Alamofire

MVVM Architecture Android: Template This repository contains a sample app that implements MVVM architecture using Swift, ViewModel, Alamofire, and etc

Swift sample app for running privileged operations on macOS using a helper tool
Swift sample app for running privileged operations on macOS using a helper tool

SwiftAuthorizationSample demonstrates how to run privileged operations on macOS using a helper tool managed by launchd. This sample was created with t

Dice-rolling app made in Swift
Dice-rolling app made in Swift

Dicee Our Goal The objective of this tutorial is to introduce you to the core programming concepts that will form the foundation of most of the apps y

Food Recipes App Built With Swift
Food Recipes App Built With Swift

Food Recipes Application This is my first IOS App. The first page is sign in and sign up page. I controll informations with regex in sign up page. If

A sample app demonstrates how to use Atlantis on Swift Playground (iOS/macOS)
A sample app demonstrates how to use Atlantis on Swift Playground (iOS/macOS)

Atlantis with Swift Playground A sample app demonstrates how to use Atlantis on

Owner
An Trinh
iOS Developer
An Trinh
Swift Playgrounds for interacting with Collected.Press

CollectedSwiftPlaygrounds Swift Playgrounds for interacting with Collected.Press WebSocket Client Connects via a WebSocket to https://collected.press

Royal Icing 1 Oct 24, 2022
Project 03 I created for "iOS & Swift - The Complete iOS App Development Bootcamp"

Dicee This is the third project I created for "iOS & Swift - The Complete iOS App Development Bootcamp" Our Goal The objective of this tutorial is to

Lukas Goodfellow 0 Dec 23, 2021
🏀 iOS and Android NBA app created with React Native

Swish An iOS and Android NBA app created with React Native. If you would like to request a feature, find a bug, have a question, or would like to leav

James Kuczmarski 108 Nov 11, 2022
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

Raúl Montón 16 Dec 21, 2022
Hỗ trợ làm màn hình thanh toán trên ứng dụng iOS/ iPad OS.

Hỗ trợ làm màn hình thanh toán trên ứng dụng iOS/ iPad OS. Rate star nếu bạn thấy tốt, hoặc báo cáo cho tôi qua Issues

null 5 Dec 28, 2021
iPad Comic reader based on ComicFLow

Overview Finally a comic reader for iPad done right! ComicFlow was designed with one goal in mind: providing the best experience for comic fans with l

Pablo Clemente Pérez 0 Dec 2, 2021
The QuoteKit is a Swift framework to use the free APIs provided by Quotable created by Luke Peavey.

QuoteKit The QuoteKit is a Swift framework to use the free APIs provided by Quotable created by Luke Peavey. It uses the latest async/await syntax for

rryam 17 Jun 23, 2022
🛠 A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern.

Model-View-Presenter template A flexible and easy template created to speed up the development of your iOS application based on the MVP pattern. This

Tamerlan Satualdypov 22 Nov 9, 2022
A movie api created using Vapor, Fluent (ORM) and Postgres

A movie api created using Vapor, Fluent (ORM) and Postgres

Vijay 0 Jan 10, 2022
This is a fully functioning Guess The Flag game I created as part of my 100 days of SwiftUI course with Paul Hudson.

GuessTheFlag This is a fully functioning Guess The Flag game that was a part of my 100 days of SwiftUI course with Paul Hudson. In this app my challen

Alex Diaz 0 Jan 19, 2022