(NEW) ⚙️ BackendKit
Overview

BackendKit Overview

            • BackendFunctions.swift
            • index.ts
  • BackendKit is a convenient way to add backend functionality to your application. It utilizes Firebase Functions (via TypeScript) to provide a serverless backend for your application. BackendKit's starting point is in the index.ts file inside the Backend directory. There you can see all the API Endpoints exposed to the client (App).

    Exposed Backend functions:

    BackendKit Functions Backend Example

    Here's how we access the backend from the client side:

    BackendKit Functions Client Example

    These functions are also seemlessly integrated with frameworks that you select during setup, such as:

    AuthKit & DatabaseKit

    AuthKit and DBKit are required to be installed in order to use BackendKit. They provide the necessary authentication and database functionality that BackendKit relies on.

    InAppPurchaseKit

    InAppPurchaseKit is built on top of RevenueCat. We provide a convenient doesUserHavePremium() function which calls the RevenueCat API to check if the user has a premium subscription. Because we connect all User IDs from different providers, we can simply do so by passing the Firebase user id. This function can be used to lock a user out of premium features if they do not have a premium subscription.

    NotifKit

    NotifKit is built on top of OneSignal. An included example code exports the function sendNotificationToUserWithID() which sends a notification to a user with a given user id. It accepts the main parameters of a notification, such as title and body, as well as additional paramers to be able to route the push notification to be shown as an in-app notification when the app is open. Read more on that in Routing Push Notifications to In-App Notifications

    AnalyticsKit

    Easily capture Analytics the same way they are captured in your iOS App. Pass all the required information to the captureEvent() function and it will be sent to your PostHog Analytics Dashboard together with your iOS App's events. (Events can be filtered by event_source: app or backend) Also automatically integrated into NotifKit and AnalyticsKit if they are included.

    AIKit NEW

    SwiftyLaunch 1.3+

    AIKit integration on the backend includes a bunch of convenience functions that are used in the example AI Mini-Apps. Read more about them in AIKit.