How to detect user inactivity in nativescript ios app


#1

Created a ios UIApplication Delegate and yes it works but how to achieve to achieve a callback on userInteraction is not clear to me

code provided here works fine for Android but not for ios

import { ios, run as applicationRun } from "application";
class MyDelegate extends UIResponder implements UIApplicationDelegate {
    public static ObjCProtocols = [UIApplicationDelegate];

    applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<string, any>): boolean {
        console.log("applicationWillFinishLaunchingWithOptions: " + launchOptions)

        return true;
    }

    applicationDidBecomeActive(application: UIApplication): void {
        console.log("applicationDidBecomeActive: " + application)
    }
}
ios.delegate = MyDelegate;


platformNativeScriptDynamic().bootstrapModule(AppModule);

Please suggest


#2

i tried to call th ebelow function to check user interaction inside MyDelegate class

applicationDidUpdateUserActivity(application:UIApplication):void {
                console.log("applicationgotupdated"+ application);
            }

but it never gets called…

Is there any way by which we can check userinteraction in ios


#3

any suggestion pls…i am still stuck with it