1

We're trying to render a Screen Flow programatically from a LWC. This is done by creating an aura app (with lighting:flow) in an a Visualforce page. This Visualforce page is then loaded in an iframe in the LWC.

This actually works really well, BUT only on desktop. On the Salesforce mobile app, the Visualforce page doesn't load at all (it's just a blank square).

If we take the same Aura component and simply place it on the same screen as the LWC/Visualforce comp via the Lightning App Builder, the same flow loads fine on both Desktop/Mobile. It doesn't seem that the Aura component is the issue. When we remove all the Aura code from the Visualforce page to check and just place a bit of text inside, the page still doesn't load. That's why we're pretty sure it's the Visualforce/iframe-in-lwc that's the issue

For browsers, it works in Safari 15.2. We can't get the LWC/Visualforce comp to load in the Salesforce Mobile App (v234.040) running Spring '22 (partial copy)

Anyone got any ideas? We've added every url imaginable to the CSP and Trusted Domains for inline Frames

5
  • Does the visualforce page load properly outside of your lightning component? Also what browser/mobile app are you using?
    – Kasper
    Jan 19 at 2:10
  • @Kasper, I've updated the question.
    – Carl-Johan
    Jan 19 at 8:05
  • I think you might be running afoul of Apple's new cross domain protections. There may be a switch in the iOS app settings for Saleforce to enable the app to load data from any domain and that would get things going.
    – Matt Lacey
    Jan 19 at 9:38
  • Is any of this part of a namespace (managed package) btw?
    – Matt Lacey
    Jan 19 at 9:38
  • not part of a manged package
    – Carl-Johan
    Jan 19 at 9:49

1 Answer 1

1

For anyone experiencing this in the future.

For Visualforce pages to load, two things were needed:

  1. Uncheck "Include the instance name in Visualforce URLs when third-party cookies are blocked" (docs)
  2. Toggle "Allow Cross-Website Tracking" in the specific device (only tested on iPhone) via Settings > Salesforce > Allow Cross-Website Tracking

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.