I recently realised that Safari in iOS manages cookie separately for Safari.app and other apps that embed UIWebViews. I concluded so because I developed browser based app and saw the following behaviour:
开发者_开发百科- login to web service which then sets session id to cookie.
- when I go to safari app and access the web service, I was asked to log in again.
Is it true that Safari in iOS manages cookie separately for safari app and other browser based app?
Yes, you are correct.
Every app is sandboxed, meaning is has no access to any other app (which Mobile Safari is).
Thus, cookies set in a browser-based app will not affect the Mobile Safari app.
See this question for a possible workaround (kinda): Setting a cookie in an iPhone App
It looks like you are trying to track your mobile app installations. I would recommend checking out yoz.io because they are free and do not require an sdk.
Enjoy ;)
精彩评论