4

I have an iOS webview app which require access to third party cookies accessed from inside an iFrame, even if I clear the Prevent Cross Site Tracking on IPhone Safari Settings, it does not work!
But when I access the webview link directly using Safari (Desktop) and clear the Prevent Cross-Site Tracking, it works fine!
I have been trying for over a week now, and no luck
I have added NSCrossWebsiteTrackingUsageDescription to the info.plist on the iOS app and I can see the new settings for the app, but even if I allow cross-site tracking, still does not work!
I have also added WKAppBoundDomains to the info.plist as an array with different combination as below:

thirdparty.com
*.thirdparty.com
a.thirdparty.com
a.b.thirdparty.com

with no luck either!
I have been searching SO, Apple Forum and webkit for many days, seems some people have it working but i have no clue how did they get it to work as there were no clear solutions?
I am not sure why Safari (Desktop) behaves in a different manner to Safari (Mobile)!
I have tried on simulator and an iphone device, cleared all data and website cookies, still not working.
If you have successfully implemented WkAppBoundDomains or NSCrossWebsiteTrackingUsageDescription, please share your solution as I am out of ideas.
Your time is greatly appreciated
Xcode: 12, iOS: 14

Alan
  • 59
  • 6
  • Did you try [about disabling itp](https://stackoverflow.com/questions/64897054/using-nscrosswebsitetrackingusagedescription-to-request-user-disable-itp-for-wkw) – Ptit Xav Sep 10 '21 at 06:51
  • Yes I added that to the info.plist as per the question and the new setting appears under the app settings as disabled. After enabling the new app setting, it did not make any difference! You don't even need to add the settings.bundle as per the link you provided as it automatically appears without any extra configuration. – Alan Sep 10 '21 at 21:50
  • did you find solution @Alan – Naman Vaishnav Dec 15 '22 at 15:15
  • This works for me https://stackoverflow.com/a/64901589/2304737. Note that you need to implement Settings page for this to work. Adding it on Info.plist will do nothing. – mr5 Mar 22 '23 at 05:56

0 Answers0