Jasonette / JASONETTE-iOS

📡 Native App over HTTP, on iOS
https://www.jasonette.com
MIT License
5.27k stars 352 forks source link

State not retained with $href in a webview with native transition #354

Open ronakshah2895 opened 5 years ago

ronakshah2895 commented 5 years ago

While creating a jason for a web container with native transition as described here things work perfectly fine with android but not on IOS. The website which I am using for the web container requires user to login to view the website. Now after the user logins he successfully sees the next view but when he clicks on some other link on the page it again asks the user to login after a native transition to the new view which is the issue. Links with just "type": "$default" works well. All the pages which do not require the user to login also works perfectly. I even tried this with the JASON app for IOS and the issue replicates. Also everything works fine on android so this is an issue with just IOS builds. On looking further into the issue I found out that Jasonette use WKWebkit to display Web View on IOS devices which does not automatically preserve cookies. You could read a discussion on stack-overflow here. As I am new to the project I cannot exactly find out a way to fix the issue. If someone could take up this issue or guide me in a direction so that I could push a fix then that would be great.

Regards, Ronak Shah

darenr commented 5 years ago

I think you're on your own Ronak, Ethan seems to have abandoned this project - there's been no activity for a while, not bug fixes, the support forum has gone.

Does the problem reproduce on IOS 12?

It would be helpful to submit a test case using jasonbase.com for your json to illustrate the problem then someone might pick it up. There's effort put in to prevent what you're asking for in fact, the views are supposed to be sandboxed, but as you point of this was largely not deliberate because it "works" as you want it to on Android. But there was effort made to make each view completely isolated and independent. As I understand your issue you want cookies for the domain retained across the app for web components.

clsource commented 4 years ago

I believe this needs further discussion about the cache. Maybe you could use the $cache action and inject using $agent.

Please go to https://github.com/jasonelle/jasonelle if you want to use the latest code :)