Skip to content

Customization

The AppSDK comes with default settings to connect to the official Tapkey Trust Service instance but can be customized to connect to different instances as required. Customization is done via the TapkeyServiceFactoryBuilder, e.g.

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, TapkeyAppDelegate {

    private var tapkeyServiceFactory:TapkeyServiceFactory!;

    func application(_ application: UIApplication,
                     willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {

        ...

        // Build service factory singleton instance
        self.tapkeyServiceFactory = TapkeyServiceFactoryBuilder()

            // Change the backend URI if required.
            .setServiceBaseUri(serviceBaseUri: "https://example.com")

            //Change the tenant if required.
            .setTenantId(tenantId: "someTenant")

            .build();

        ...
    }

    ....

}