1

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?

Brandon Schlenker
  • 5,068
  • 1
  • 34
  • 58
katsuya
  • 1,194
  • 3
  • 15
  • 20

2 Answers2

3

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

Community
  • 1
  • 1
Alastair Pitts
  • 19,107
  • 9
  • 66
  • 96
1

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 ;)

Kevin Liu
  • 11
  • 2