-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin seems to not work on ios 14 #11
Comments
Same thing happens to me here. I noticed that earlier a cookie with key Anything I can do to help @CWBudde ? Would be happy to try to solve it with a PR, just not sure how to approach it. |
@Babsvik I'm encountering the exact same behaviour. xcode11/iOS14 is fine, xcode12/iOS14 doesn't work. |
an update: I can confirm that our app built with a previous version of Xcode works in production on ios 14 and this plugin is sending cookies correctly. We continue our testing, if someone have an update please reply, this issue is still frustrating. Thanks Marco |
Hum just run into this one also. Starting research process now, does anyone have any updates that highlight or resolve this as yet? |
I downgraded now to Xcode 11.7. Downloaded and installed it from https://developer.apple.com/download/more/ then used: sudo xcode-select -s /Applications/Xcode-11.app/Contents/Developer/ NB: Note that I renamed the app to Xcode-11, so I can have both 11.7 and 12 installed. After I set it to the active version, I then verified it with: xcodebuild -version
---
Xcode 11.7
Build version 11E801a You can't deploy directly to the device running iOS14 using USB with Xcode 11.7. And Xcode 11.7 does not have simulators running iOS 14 (becomes available in Xcode 12). Again not sure how to proceed to solve this, but it seems like this is introduced with iOS14 built using Xcode 12. So building with Xcode 11.7 works for now. Until Apple deprecates Xcode 11.7 😅 |
Hi all, I think this should help: We are using ionic wkwebview with cordova and codepush. Prior to ios 14, this plugin used to work for cookies, it now does not. The file-xhr plugin is required (thanks to whoever suggested that). In addition to that, codepush builds with the new ios do not play ball on apps originally built using the older (<12) xcode versions. It would be nice to get this working properly again. I'm not sure if anyone else has an alternative for cookies in wkwebview? There must be an authorative answer. Pretty much every app will use cookies in cordova. |
@Babsvik - this may have to be my solution also. @lovetoast thanks I understand the xhr plugin may resolve it for direct app uploads/download but I am also using some code which has internal xhr logic and would prefer not to have to get involved in re-writing this. The issue seem strange as it appears more like a complier issue rather than an issue with the patching itself as it works for iOS14 in xcode 11. Just wish I knew more about this to even have a guess as to where to start looking. I think this thread will get more and more traction as people start compiling on xcode 12, If anyone finds anything or can point us in the right direction please share? |
Apologies, I thought this had already been posted, I believe this is the why: https://www.simoahava.com/privacy/intelligent-tracking-prevention-ios-14-ipados-14-safari-14/ |
As @lovetoast said, it is most probably ITP issue. In our app we are using session cookies to authorize src requests from img and video html tags The approach that works on iOS versions < 14:
So it seems that now ITP blocks third party cookies -> cookies which are set from different domain: e.g.
To confirm this theory, I used suggestion from here: apache/cordova-ios#922 (comment)
I added this code snippet into config.xml file. After app is built and transferred, kill it. Go to iOS setting, find your app at the bottom of the menu, open it and enable I know that allowing this manually doesn't help a lot, because end-user should not be aware of this problem, but I just want to show where the problem might be. |
Has anyone got this working with Xcode 12 and iOS 13 ? |
Hi guys, I wanted to share with you the solution I found for this issue. It worked well for my case, where the contents I was trying to access was from one single domain... Lets say mydomain.com In order to make the app work well with Xcode 12 and the latest iOS I had to add the hostname in the config.xml files. So, if you authenticate or load data as iframe from one specific domain only, this solution will work well. So, you have to add following line inside |
That also helped in our case. Allow Cross-Website Tracking is now disabled, but cookie authorization works. |
Yes indeed, you can't add it dynamically. |
Hello, https://bugs.webkit.org/show_bug.cgi?id=213510 I think that now it's quite clear (also thanks to all your previous replies) that this "thing" is related to ITP Apple "new feature" and it's an Apple choice introduced "by design". From that webkit post we find the app bound domains that maybe can be a solution (or maybe not cause it seems they are related more to whitelist plugin than cookies, we need to investigate more on that): From app bound domains page we find the presentation page of ITP on webkit.org here: The page state that:
so maybe the only solution for this issue is to use the storage access api: But we don't have so much skills in ios programming to understand how to create a complete solution or even if this could bring us to a solution. We continue to investigate this problem and hope for possible proposals/updates that can solve this issue for multiple domains (for one single domain defined at compile time @giorgos120 solution works great, thanks) |
I have just completed a build of one of my main apps on iOS 14 using xcode 12. I ended up using two tools to get past the issue. I did the PS: ensure your urls are encoded before passing to the xhr plugin - it gets upset with space chars in the string that may not upset standard xhr browser calls. |
This answer saved me. Also, setting the Hostname makes this plugin useless since the app starts handling any same-site cookies natively. |
Any one has any solution similar to this for the capacitor? I am using Ionic with Capacitor and it don't have this type of config.xml file for this |
Hi, Is there any solution to this issue? |
Are you saying you did not need any other plugin to get cookies to start working? This domain is the web server your are calling correct? not a localhost or ionic://localhost ??? UPDATE: |
Yes I'm saying I don't need any specific plugin to make cookies work. All I had to do was:
Environment: |
Are these somehow related to why my PHP session variables aren't persisting? I've just upgraded to WKWebView from UIWebView but my PHP session variables are not working now. My HTTP requests are working fine but some data cannot be retrieved since some session variables are blank. I do have
|
Just to sum up the discussion: The plugin doesn't seem to be working with XCode 12 and iOS 14 due to ITP (intelligent tracking prevention). There are a few alternatives. The best I have encountered so far ist the wkwebview proxy plugin. |
If anyone still have troubles with that I've also had this issue and nothing worked except I tried a simple thing which is:
where
And that's it. The session cookies beeing not persistent is fixed. |
Now, does the plugin work on xcode version >12 and ios14? |
The hostname is working, but I need to switch the hostname while the application is running. How do I modify this preference? |
no |
Using Ionic 5 and this does not work for me. I can switch the hostname and can login into my application, but afterwards all the buttons are dead. This error only occurs on --prod --release build so it will be hard to analyze the issue, therefore I am reversing the changes. But thanks for sharing your solution. |
Having this issue. Xcode 11 & 12 are now deprecated by Apple, so downgrading is not an option. Setting the hostname in config should work, but i have multiple domains in the test build + some iframes that come from a different domain. Static hostname is not helpful in this case unfortunately. Anyone has any ideas? |
It works if i add |
Hello, I'm using this amazing plugin for sync cookies between main app and iframes inside the app.
With 2 code lines I make everything work.... since now.
With ios 14 the plugin seems to have no effect any more but still working on ios 13 and ios 12 (tested on ios emulator and the new version of xcode).
Is there any way to make this little gem works on ios 14 too?
I expect that customers can be a little disappointed after they update ios the the new version...
Thanks,
Marco
The text was updated successfully, but these errors were encountered: