MobileDev
MobileDev

Reputation: 363

SFSafariViewController and Chrome Custom Tabs Cookie Behaviour

We have a mobile app that sometimes jumps out to our website to show certain pieces of content.

Currently for these jumps we use SFSafariViewController on iOS and Chrome Custom Tabs on Android, we are trying to determine the behaviour using these controls around cookies. We aren't talking here about anything to do with authentication, we are thinking more about persistent cookies for things like has a user accepted a cookie banner message etc.

Are cookies persisted across launches of SFSafariViewController and Chrome Custom Tabs or does every invocation of those controls start a fresh?

Do either of these controls share persistent cookies with the Safari/Chrome?

We can obviously try and infer some of this via testing but wondered if anyone had any previous experience that could help with determining the behaviour.

Upvotes: 0

Views: 177

Answers (1)

andreban
andreban

Reputation: 4976

The answer for Chrome Custom Tabs is yes, Cookies are persisted across sessions and shared with sessions in Chrome itself on the same origin.

I haven't tested Safari View Controller but do assume a similar behaviour.

Upvotes: 0

Related Questions