configure
Initialize the client-side Nami SDK with your App Platform ID. Required for Nami to see paywalls and campaigns defined in the Nami Control Center.
Initialize the Nami SDK with configure. Pass in the NamiConfiguration object to tailored the SDK for your purposes.
import NamiApple
let appPlatformId = "YOUR_APPLE_APP_PLATFORM_ID"
let namiConfig = NamiConfiguration(appPlatformId: appPlatformId)
namiConfig.logLevel = .debug // If omitted, defaults to WARN
namiConfig.namiLanguageCode = NamiLanguageCodes.fr // If omitted, defaults to device
Nami.configure(with: namiConfig)
import com.namiml.Nami
import com.namiml.NamiConfiguration
import com.namiml.NamiLogLevel
val appPlatformId = "YOUR_GOOGLE_OR_AMAZON_APP_PLATFORM_ID"
Nami.configure(
NamiConfiguration.build(this, appPlatformId) {
logLevel = NamiLogLevel.DEBUG // If omitted, defaults to WARN
namiLanguageCode = NamiLanguageCode.FR // if omitted, uses device language
}
)
import { Nami } from 'react-native-nami-sdk';
// Configure as early as possible in index.js.
// For each platform (Android, Apple), you need to provide an App Platform ID (api key)
// created in the Nami Control Center > Platforms.
let configDict = {
'appPlatformID-apple': 'YOUR-APPLE-APP-PLATFORM_ID',
'appPlatformID-android': 'YOUR-GOOGLE-APP-PLATFORM_ID',
logLevel: 'DEBUG',
};
Nami.configure(configDict);
AppRegistry.registerComponent(appName, () => App);
import 'package:nami_flutter/nami.dart';
import 'package:nami_flutter/nami_configuration.dart';
import 'package:nami_flutter/nami_log_level.dart';
var appleAppPlatformId = "YOUR_APPLE_APP_PLATFORM_ID";
var androidAppPlatformId = "YOUR_GOOGLE_OR_AMAZON_APP_PLATFORM_ID";
var namiConfiguration = NamiConfiguration(
appPlatformIdApple: iosAppPlatformId,
appPlatformIdGoogle: androidAppPlatformId,
namiLogLevel: NamiLogLevel.debug);
Nami.configure(namiConfiguration);
using NamiSDK;
var appPlatformId = Application.platform == RuntimePlatform.Android ? "YOUR_GOOGLE_OR_AMAZON_APP_PLATFORM_ID" : "YOUR_APPLE_APP_PLATFORM_ID";
// if appPlatformId is null or omitted it will use the keys from settings
var configuration = new NamiConfiguration.Builder(appPlatformId)
.LogLevel(namiLogLevel.Debug) // if omitted, users Warn log level
.NamiLanguageCode(NamiLanguageCode.FR) // if omitted, uses device language
.Build();
Nami.Init(configuration);
Last updated