Can an iPhone application read cookies previously stored by Safari Mobile?
Answer: A: Short of Eric's recommendation to use private browsing, Safari does not offer an automatic means to remove all cookies when it is quit.
To check where are the app cookies stored on iPhone, On an iPhone, go to Settings -> Safari -> Advanced -> Website Data and you will see all cookies stored on your device.
SAFARI for iOS (iPhone and iPad) Step 1: Go to Settings, then scroll down and select “Safari”. Step 2: Scroll down to “Privacy & Security”. Step 3: Verify “Block All Cookies” is ticked (green/white), click to allow cookies. Step 4: Clear the browser cache and reopen the browser.
Safari stores it's cookies in ~/Library/Cookies . There you'll find a file named Cookies. binarycookies .
To actually answer your question:
No.
Mobile Safari's cookies are not accessible from SDK apps. And each SDK app is given its own WebKit cache and cookie stores, so while cookies will persist within the same app, they aren't accessible betweeen apps.
As of iOS 9 this is possible!
Use a sfSafariViewController.
You will need to setup:
You can clone this repo which has a fully working demo of this.
Hope this helps,
Liam
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With