- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cybersource iFrame in Cordova iOS App
Hello,
I'm trying to implement the Cybersource iFrame in our Cordova iOS application, however the WKwebview that hosts the application does not allow the http or https scheme, and I cannot use another scheme to access the iFrame with localhost. Is there an alternative way of allowing Cybersource to work with our application given these limitations?
07-27-2022 10:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can install cordova-plugin-ios-xhr and set
<preference name="allowFileAccessFromFileURLs" value="true" /> <preference name="allowUniversalAccessFromFileURLs" value="true" />
for files to work with file://
07-27-2022 11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When trying to open an iframe, the code tries to get the original window.open clobber using modulemapper.getOriginalSymbol(window, 'open');
But the clobber you registered in plugin.xml is 'window.open'
This causes an infinite loop resulting in stack overflow.
A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md /omeglz Then we maintainers don't have to try to code it, but can rely on something that you say recreates the problem.
07-28-2022 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://github.com/regevbr/cordova-plugin-inappbrowser-bug /echatandom reproduces the bug.
When you start it on android you can see
inappbrowser.js:1 Uncaught RangeError: Maximum call stack size exceeded at module.exports (inappbrowser.js:1) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96) at module.exports (inappbrowser.js:96)
When you inspect it.
Basically we have a named iframe which is empty at the beginning
<iframe src="" name="test_iframe"></iframe>
Then we perfrom open on it when the device is ready
onDeviceReady: function() { this.receivedEvent('deviceready'); window.open('https://api6.ipify.org/','test_iframe'); },
Could you check if the delete window.open thing described here https://github.com/apache/cordova-plugin-inappbrowser#windowopen /echatspin if it fixes it?
08-29-2022 12:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If the content is served in an iframe from a whitelisted domain, that domain will have access to the native Cordova bridge.
10-31-2022 11:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can install cordova-plugin-ios-xhr and set
<preference name="allowFileAccessFromFileURLs" value="true" />
<preference name="allowUniversalAccessFromFileURLs" value="true" />
for files to work with file://
11-21-2022 03:54 AM