Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

Hi,

I've surfed several topics here.

  1. In a perfect world - when a user presses my 'Quit' button - I'd like the app to quit. It appears - that on an IOS device (please confirm) - that you can't issue the device.exit command - and have it leave the app?? Is that true? there's a navigator function that's supposed to do that?

  2. Minus that functionality - when pressing quit - I take the user back to my login screen.... and it should 'remember the user id and password' - which it does in the appery simulator - but not on an IOS device or in the IOS Simulator. It seems that there is a foundation event that occurs after my logout service -- the refreshes the controls (after i 'lose control' of the service -- in the 'complete' event of the service).

    The issue becomes the user id and password aren't remembered - displayed - even though I've moved the values back to the controls ...

    Any ideas on how I can fix this issue? I've toyed with this defect for over 2 hours now - and it seems I'm not being productive without more information.

    Best,
    Bruce

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Logout - on IOS

Hi Bruce,

  1. It's only phonegap functionality. You can read about it here: http://community.phonegap.com/nitobi/...

  2. Not sure i've understand your question.. But if you want to store id and password in the app - you can use:
    localStorage
    sessionStorage.

    so you can store id and password in LSV(for example) and on "page show" for login page - you can restore it from LSV.

    Regards.

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

Hi Yurrii,

Here's my challenge hopefully explained a bit better.

When I logout the user (by pressing a control on any page in my app), the desired functionality is to:

  1. Return the user to the login page, and run the logout service method - closing the db connection and clearing some localstorage vars.

  2. If not IOS - close the app. (Works on Android - but not on IOS - I get why).

  3. If IOS (which is my open challenge) - here's the differences I've encountered and my open challenge:

  4. When telling my app to go back to the login page - the Web browsers run the page show method - the IOS platform runs the page load method.

  5. When returning to the login page (and telling the page to run the logout method) - the browsers will successfully show my controls with the values I desire (the saved credentials will refresh to the controls - and then the controls show the values that were saved) like so: (Image when I launch the app from the appery editor in test mode, login and then run my logout):

    Image

    However, when I run the same code on the IOS platform (the simulator or the device) - even though the simulator console tells me my controls have the correct values, and the simulator tells me that the same code is running that is running on the browser - I can't get my controls to refresh visually - even though when the application queries them and I log the results to the IOS simulator console - the controls report back that they have the correct values.

    I'm miffed ! How do I get the IOS platform to behave the same way as shown above (my user population considers this a serious defect that I have to fix in order to get paid lol !). Here's the same page - running the same code (verified through the IOS simulator)... I've tried code Appery('input_emailaddress').show() and I've used the same .refresh() - and although the code runs - I can't get the values that the app thinks are on the controls - to show.....

    Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

also - in case you need it.... here's my public app link - and I've set the app to 'shared with support...'

http://appery.io/app/mobile-frame?src...

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

one last update and bit of information that you might find helpful or at least interesting - the controls above (in the bottom visual) actually believe they have values, such that , when pressing login - it uses the values that are actually there - and processes a new login with those credentials (even though the fields appear blank ).

Finally - the code for login does grab the values from the controls, and uses those values in the 'standard' login method.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Logout - on IOS

Hi Bruce -

Not necessarily application should behave the same way like in a browser, with all it's settings and plugins installed.
InAppBrowser provides only basic user experience functionality.

To make your field show values of username and password you need to store it in the localStorage and on page show event fill fields with its value.
On login success save values of username and password in the localStorage.

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

Illya, that's all done and has been working on all the platforms for months.

I absolutely know how to manipulate values from local storage and back and it works succssfully on all platforms except iOS.

If you're telling me you guys don't have time to look at the problem .. I get to hat ..... But I've debugged this as far as I have resources for. And it's a problem my users Need fixed.

I've got another critical issue with the 1.1 libraries that's also been sitting.

Best,
Bruce

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Logout - on IOS

Hello Bruce,

We are very sorry for delay, we are working on your request and try to post and update later today.

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Logout - on IOS

Evgene,

Thanks for the update. I needed to move forward and was left with an unexplainable functionality on the IOS device.

Rather than trying to work with what I had - I went with another tactic. I broke my login (and therefore where the app went on IOS and Android logout) screen into two pieces.... one that would handle the repeat login (with saved credentials) and another that would handle 'new credentials'.

This seems to have worked around the issue for the time being... so - It's still a problem - and you can of course re-create it from one of my backups - but unless someone else is having the same issue - let's call this solved for now.....you guys have a lot on your plate!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Logout - on IOS

Hello Bruce!

Appreciate an update, thank you!

Return to “Issues”