Class used to configure the Nami SDK when an app starts.

public class NamiConfiguration : NSObject {

    public init(appPlatformID : NamiAppPlatformID ) {
        self.appPlatformID = appPlatformID.lowercased()
    }
    
    public var appPlatformID : NamiAppPlatformID
    public var passiveMode : Bool = false
    public var logLevel : NamiLogLevel = .error
    public var bypassStore : Bool = false
    public var applicationHandlesTransactions: Bool = false
    public var namiLanguageCode: NamiLanguageCode = NamiLanguageCodes.en
}
@interface NamiConfiguration : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull appPlatformID;
@property (nonatomic) BOOL passiveMode;
@property (nonatomic) BOOL applicationHandlesTransactions;
@property (nonatomic) enum NamiLogLevel logLevel;
@property (nonatomic) BOOL bypassStore;
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull namiCommands;
@end
class NamiConfiguration(
  val context: Context,
  val appPlatformId: String,
  val logLevel: NamiLogLevel,
  val developmentMode: Boolean,
  val bypassStore: Boolean,
  val namiLanguageCode: NamiLanguageCode?
)

NamiConfiguration.build(
  context: Context,
  appPlatformId: String,
  initializer: (Builder.() -> Unit)? = null
)
NamiConfiguration = {
  "appPlatformID-apple": string,
  "appPlatformID-google": string,
  "passiveMode": bool,
  "logLevel": string,
  "bypassStore": bool,
  "namiLanguageCode": string
}
class NamiConfiguration {
  final String appPlatformIDApple; // required
  final String appPlatformIDGoogle; // required
  final bool bypassStore; // default false
  final bool developmentMode; // default false
  final bool passiveMode; // default false
  final NamiLogLevel namiLogLevel; // default NamiLogLevel.warn
}
interface NamiConfiguration {
  NamiConfiguration ConfigurationForAppPlatformID (string appPlatformID);
  bool BypassStore { get; set; }
  bool DevelopmentMode { get; set; }
  NamiLogLevel LogLevel { get; set; }
}

Note that parameter names differ slightly by platform.

Parameters

  • appPlatformID / appPlatformId - the Application Platform ID from the Control Center.
  • passiveMode - If true the SDK will run in a passive data collection mode and will not handle store transactions or control any in-app experiences with campaigns and paywalls. Defaults to false.
  • logLevel - set the level of logging printed by the SDK for debugging. Supports debug, info, warn, and error levels. Defaults to error.
  • bypassStore - when true, transactions will not be sent to the store. This allows for simplified testing in development. Defaults to false.
  • namiLanguageCode - sets the language to be used for paywalls on the device. Select from NamiLanguageCodes.

iOS

  • applicationHandlesTransactions - when true, all Nami StoreKit transaction listeners will be disabled, allowing the application to handle incoming StoreKit transactions. Note in this case, that Nami must be told when purchases transactions take place to properly record purchases and grant entitlements.

Android

  • context - the Application context

React Native

Note that for React Native instead of one appPlatformID, there are two. One for Android and one for Apple. All other fields in the object are the same.

  • appPlatformID-apple - the App Platform ID from the Control Center for Apple.
  • appPlatformID-google - the App Platform ID from the Control Center for Android.