I use asiHttpRequest library to do data get and post.
I have built a login function with it to login to my site, after that, if I launcher a URL from my app to use mobile safari app browse the site, it still remains not authenticated.
I guess the reason is that my app does not share the same cookie storage with safari, is that correct? is that possible I share the cookies with other apps, especially the Safari?
You can NOT share cookies in your App with Mobile Safari. As @erpayo said, it's in Sandbox.
Maybe add a
UIWebView
into your App is the best solution. Do not open an URL in Mobile Safari but open it in theUIWebView
. It can get your cookies.no, it's not.
Cookies are sandboxed.
Maybe you can make some server side tracking using query string parameters, but it will become a security hole