Watcher Mode

Glassfy can operate in "Watcher Mode" where the application can access all the analytics and connectors without affecting existing purchasing code.

You can integrate Glassfy SDK and keep all your existing purcahse code taking advantange of all the Glassfy dashboard feature including analytics, connectors and receipt validation.

Watcher Mode

When you initialize the SDK set the optional watcherMode to true.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

  Glassfy.initialize(apiKey: "YOUR_API_KEY", userId: nil, watcherMode: true)

  [...]
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  [Glassfy initializeWithAPIKey:@"YOU_API_KEY"
                          userId:nil
                    watcherMode:YES];

  [...]
}
class App : Application() {
    override fun onCreate() {
        super.onCreate()
        Glassfy.initialize(this,
            "YOU_API_KEY",
            true,
            null)
    }
}
public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Glassfy.initialize(getApplicationContext(),
            "YOU_API_KEY",
            true,
            null);
    }
}
try {

  await Glassfy.initialize('YOU_API_KEY',watcherMode: true);

} catch (e) {
  // initialization error
  [...]
}
try {

  await Glassfy.initialize('YOU_API_KEY', true);

} catch (e) {
  // initialization error
  [...]
}
try {

  await Glassfy.initialize('YOU_API_KEY', true);

} catch (e) {
  // initialization error
  [...]
}

Did this page help you?