SDK Lifecycle

The SDK should be initialized once during application launch.

magify.setup()

After initialization, the SDK should be updated whenever the application becomes active.

magify.update()

For UIKit lifecycle integrations, this is commonly handled in:

func sceneDidBecomeActive(_ scene: UIScene) {
    magify.update()
}

This allows the SDK to refresh runtime state, synchronize campaigns and features, and update client-related information whenever the application returns to the foreground.

  1. Create a MagifyClient instance.
  2. Configure the SDK.
  3. Call setup() during application launch.
  4. Call update() whenever the application becomes active.

We recommend following this initialization and update sequence throughout the application lifecycle.

Next step

Now that the SDK lifecycle is configured, you can proceed to the Purchases section to learn how to synchronize subscription and purchase status.

Related articles

RevenueCat

LevelPlay / IronSource

BundleCreative

IPopupWithProducts

Advertisement

Configuration options