WrapFast Documentation

Get Started

In-App Purchases

Firebase

WishKit

AI Backend

Xcode Project

API Client

Support

The WrapFast iOS app boilerplate features examples of implementation using SwiftUI of:

Each one is in its proper tab within a Tab Bar.

WrapFast also includes another Tab for a Settings view.

Replacing Keys and Constants

All the keys, links and constant values in the project are retrieved from the Constants.swift file. You need to replace here:

Project Structure

The project is built using the MVVM pattern. Each functionality is separated in a group to keep it neatly organized

The boilerplate includes all the structure and foundation that allows you to create monetizable products rapidly:

Onboarding

WrapFast includes two types of Onboarding Views:

OnboardingFeature(image: Image(systemName: "imageName"),
                                      imageColor: .blue,
                                      title: "Your title",
                                      description: "Your description")
MultiplePagesOnboardingFeatureModel(imageName: "imageName", title: "Your title", description: "Your description")

After the Onboarding, it navigates to the Request Review View.

If you want, skip the request review and navigate directly to LoginView or any other view.

Even that requesting the review without trying the app could feel dumb, evidences have demonstrated that this converts a lot.

Other strategy is requesting review after a success moment. For example in a to-do list app, after completing one ore several tasks. In an AirBnB like app, after booking an apartment successfully and so on.

<aside> 💡 It's important to know that you only have 3 ATTEMPTS PER YEAR to request a review, so place them wisely.

</aside>

<aside> 💡 I also added recently this animated onboarding crAionOnboarding.swift that I made for one of my apps. If it fits your use case, feel free to use it and tweak regarding your needs 😃

</aside>

crAion’s Onboarding

crAion’s Onboarding

PaywallView

Showing the Paywall during the onboarding is highly recommended, as it is the comment where users are more willing to pay.

To build the paywall we use RevenueCat as we say in In-App Purchases

Add as many Paywall features as you want with the component:

PaywallFeature(title: "Feature title", description: "Feature description.")

What’s new view

This view is intended to showcase to the user new features or changes between versions.

Simulator Screenshot - iPhone 16 Pro - 2024-09-26 at 11.51.10.png

It compares the current version with the latest one saved, so if it is different or nil, it triggers the sheet showing the view.

In the boilerplate it is triggered from the Vision View, but you can place it wherever you need:

CleanShot 2024-09-26 at 12.17.05@2x.png

If it is the first version, or you don’t have anything you show across versions, just comment or remove the line calling the function.

Authentication

This View handle the authentication flow. It injects the AuthManager to handle the Sign in with Apple logic and the UserManager to handle the user creation and state.

Sign in flow:

  1. We do Sign in with Apple with Firebase Authentication and we store the Firebase Authentication User.
  2. We try to fetch the user data (User.swift) from Firestore. (User data can be whatever you need, it is up to you).
  3. If the user does not exist in Firestore (first login for example), we create a new one.
  4. We store free credits in Keychain (optional) and set that user has completed the onboarding flow to true—to not show again the onboarding to the users next time they enter the app.
  5. Set app authentication state to true. This triggers showing our main app views.

Managers

WrapFast boilerplate implements several managers and services to interact with different logic along the app. Each aspect of the application's functionality is encapsulated, promoting modularity, reusability, and separation of concerns, which are key principles of software design.

Here's a general definition of the roles each manager play:

Untitled