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,078
  • 1
  • 36
  • 58
katsuya
  • 1,204
  • 3
  • 16
  • 21

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,423
  • 9
  • 68
  • 97
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