Set up Nami in your App

Now that the Nami SDK has been added to your project, let's set up Nami in your app.

Apple

Add Nami to your application delegate

  1. Open the file AppDelegate.swift or AppDelegate.m in your project and import Nami.
22562256
  1. Configure Nami by passing the SDK your Nami App Platform ID.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

  // Configure Nami
  let namiConfig = NamiConfiguration(appPlatformId: "YOUR_APP_PLATFORM_ID_GOES_HERE")
  
  // optionally adjust the level of logging of the SDK
  //    .debug, .info, .warn, .error, defaults to .warn
  namiConfig.logLevel = .info
  
  Nami.configure(with: namiConfig)
  return true
}

πŸ“˜

Nami App Platform ID

Need to find your Nami App Platform ID? Follow these instructions.

πŸ‘

Nami Best Practice

If you plan on using more advanced configuration of the Nami SDK, we recommend moving all the Nami setup code to its own method.

Also, if you have existing code in didFinishLaunchingWithOptions, it is best to call the Nami configure method as soon as possible so the system can initialize and your app will be ready to process purchases.

🚧

You Must Have Products Setup in App Store Connect

In order for one of our cloud-based paywalls to raise when you test the SDK, your paywalls must have a product that is set up correctly in App Store Connect.

If you need help creating in-app purchase products, check out Apple's documentation here.

🚧

iOS 14+ Simulators

If you are running the Nami SDK in a simulator running iOS 14 or newer, you will not see your product SKUs on a paywall unless you either run in bypass store mode or create a StoreKit configuration file.

Read more on bypass store here.
For details on creating a StoreKit configuration file, read this article.

Android

πŸ“˜

Instructions for setting up Android 3.0.0 code coming soon. Contact support to learn more.

React Native

πŸ“˜

Instructions for setting up React Native 3.0.0 bridge coming soon. Contact support to learn more.


What’s Next

Set up your in-app purchase experience in the Nami Control Center.