In my Application I want to call Logout Function if user is idle for certain amount of time how to accomplish
this answer doesn't work for me http://stackoverflow.com/questions/273450/iphone-detecting-user-inactivity-idle-time-since-last-screen-touch if i subclass my app delegate class from UIApplication and implement
- (void)sendEvent:(UIEvent *)event
It gives me error
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'There can only be one UIApplication instance.'
I can't find the other instance of UIApplication in my application
so far i have done
instead of
@interface IdleAppDelegate : NSObject <UIApplicationDelegate> {
I have changed it to
@interface IdleAppDelegate : UIApplication<UIApplicationDelegate> {
and in the main instead of
int retVal = UIApplicationMain(argc, argv, nil, nil);
I've changed it to
int retVal = UIApplicationMain(argc, argv, @"IdleAppDelegate", @"IdleAppDelegate");
Is there anything remaining to do?
I'm getting the above error... am I missing something...?
Please Help
Thanks