Skip to content

Generating Demo App Xcode Projects

Tawa Nicolas edited this page Jan 29, 2023 · 3 revisions

Introduction

This page describes what Demo App Xcode Projects are and how to generate them using Phoenix.

What is a Demo App Xcode Project?

They are projects that allow you to run apps using a subset of your modules.

When done correctly, modularisation can decouple your codebase in a way that allows you to use a subset of your codebase to compose apps that are focused on demoing features or services you used in the main project.

Why do we need Demo Apps?

Compilation Time

Working on a big project that requires modularisation normally comes with the cost of long compilation times.

Generating Xcode Projects with a subset of your complete codebase allows you to be more productive by minimising the time you spend waiting for Xcode to compile your code.

Testing your Component

You may be working on Features that require manual navigation steps before reaching them.

With Demo Apps, you could generate projects that immediately show you your feature, and allow you to quickly modify the state of the feature which you would like to test. Thanks to minimal compilation times, this helps you be more productive in making faster iterations.

How to generate the Xcode Project?

  • Select the Component to which you wish to build a Demo App.
  • Find the Generate Demo App button and click it.
Screenshot 2023-01-29 at 23 57 15
  • You will see a popup with a list that allows you to select which packages you would like to include in the project

Phoenix will preselect for you the Packages that the Component you select depends on, either directly or indirectly.

  • Click the Generate button.
  • Select the folder in which you would like your project to be generated.

You can then navigate to that folder and open the Xcode Project

In the Project navigator on the left, you will find the Swift Packages contained in the project. This allows you to work on the codebase that is relevant to your Component.

⚠️ Don't forget to add your Frameworks to the Frameworks, Libraries, and Embedded Content section.