security - Password protected iOS app on screen lock -


i trying password protect ios app having passcode screen (similar lock screen) pop every time app has been in background. i've put required code in appdelegate's applicationwillenterforeground: , part ok. however, problem how present passcode screen. tried present uiviewcontroller modally root vc, creates problems if other modal vc present. second option create new uiwindow , make passcode vc rootviewcontroller. works, not sure if best practice or if there better solutions. looking in end solution similar 1 used in dropbox app.

so, question clean , straight: there security implications or bad practices creating uiwindow on top of main window in order show passcode screen? , there other suggestions on how password protect app dropbox it?

also, here code using:

- (void)applicationwillenterforeground:(uiapplication *)application {     if (self.loggedinviewcontroller && !lockvc) { //verify application logged in, , no passcode being shown         lockvc = [[cwixloggedinlockedvc alloc] init];       //create new passcord vc         passcodewindow = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; //create passcode window         passcodewindow.rootviewcontroller = lockvc;         //set passcode vc root vc         passcodewindow.windowlevel = uiwindowlevelalert;    //make sure passcode foremost in app         [passcodewindow makekeyandvisible];     } } 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -