👨🏻‍🏫 SwiftyLaunch Basics
How to work with SwiftyLaunch

How to work with SwiftyLaunch

SwiftyLaunch Basics - How to work with SwiftyLaunch

SwiftyLaunch is the best way to go from an idea to a full-fledged iOS App. It allows you to start building your idea on a solid foundation with a lot of functionality already pre-built for you instead of having to start from a blank canvas.

It is also an awesome tool for beginners, as the app that SwiftyLaunch generates for you includes lots of implementation examples, from which you can learn a lot about iOS App development-specific workflows, concepts, and best practices.

SwiftyLaunch not only allows you to launch fast, but also to properly scale your app if needed. It is built on top of Tuist (opens in a new tab), meaning that your app is structured in a way that is easy to maintain, scale, and collaborate on. You can even select Tuist manifest files to be included in your app after generation. To see how to use Tuist with SwiftyLaunch, check out the Tuist Integration guide.

Let us guide you through a common workflow when working with SwiftyLaunch.

1. Project Creation in SwiftyLaunch

After you've purchased SwiftyLaunch and settled on your next billion-dollar idea, you can open SwiftyLaunch, enter your basic app information, select all the SwiftyLaunch Modules that your app will need, and click on the "Generate App" button.

Basic App Information Input

Module Selection

This will generate a new Xcode Project, with a lot of the heavy lifting already done for you.

2. Post-Generation Setup

2.1. Connecting the App with Providers

Now that the project has been created, what's left to do is to connect all provider that SwiftyLaunch sets up for you in its modules. Every module that has an external provider will have a Config folder. There you will paste your API key in the info property list file. The complete initial setup process is described in the step-by-step setup guide

💡

What are modules? Learn here

2.2 Adding your information to App data

In the SharedKit module, go to the Constants.swift file. There, enter additional app-specific information, such as your support email, link to your privacy policy, and more.

See App-wide Constants for more information.

SharedKit Constants

3. Development

Now that you have set everything up, you can start developing your app. We recommend that you start building out your app-specific features in the App Module.

3.1. Adding New Features

When adding new features, we recommend that you follow the same structure as other SwiftyLaunch modules. This will make it easier for you to maintain and scale your app.

Following the common module structure (based on MVVM), add Views to the View folder, ViewModels to the ViewModels folder, and Models to the Model folder.

If after some time you realise that it starts to get messy, it would be wise to group the functionality into their own folder.

Example: You are working on a Workout App with Social Features and you have specific views, models, and view models that are only responsible for showing and handling your user's friends workout data. At first, you can start by placing it all in the common MVVM structure, but as the feature grows, you can move it to its own folder, which contains its own MVVM-related files.

Restructured, simplified hierarchy example

3.2 Adding New Modules

When you've built a feature that is large enough to be considered a module, you can extract it to its own module. This will make your app more modular and easier to maintain.

Read about Creating a new Module to learn how to do this.

3.3 Adding new Swift Packages

To add a new Swift Package, go to File > Swift Packages > Add Package Dependency....

Enter the Package GitHub URL and click on Add Package.

Adding a Swift Package

Then, select the target you want to add it to and click on Add Package. Later you can add it to more targets if needed.

Selecting a target

To check that the package has been succesfully installed, go to your project, and choose the selected target. It should have the package listed in the Frameworks, Libraries, and Embedded Content section.

Checking the package

4. Releasing your App

When you're ready to submit your app, make sure to check out the Release Checklist to make sure you didn't forget anything.