HjalmarCarlson
HjalmarCarlson

Reputation: 868

Setting cookies for native app webviews

I have an interesting issue related to cookies in the iOS native webview.

When app like Twitter, Pulse & other news readers link to our content cookies are not retained outside of a single session even though our cookies are set for 60 minutes.

My assumption is that each time an article is loaded a new instance of the webview is loaded and all cookie data is removed, even though the user is still in the same session. In the same apps on Android the cookies persist through the full session in app, not just the webview session.

Has anyone seen this issue on iOS? Is there an alternative to cookies that might persist through an entire app session?

Upvotes: 0

Views: 3118

Answers (1)

Bob Kinney
Bob Kinney

Reputation: 9040

This is expected behavior. iOS sandboxes application data including cookies. Some recommended reading:

Understanding cookie storage

Apple URL Loading System Overview

Where are an UIWebView's cookies stored?

Upvotes: 1

Related Questions