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 the Glassfy SDK and keep all your existing purchase code taking advantage of all the Glassfy dashboard features 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
[...]
}
Glassfy Configuration
You do not need to configure the entire Glassfy platform to start receiving events but you must ensure you configure the SKUs that you want to monitor in Watcher Mode by following this Guide. When setting up Glassfy in Watcher Mode, you must follow all of the steps in the Quick Start guide until Configure SKUs which is the final step in the Watcher Mode set-up.
Updated about 1 year ago