How can i make the react native webview execute the paypal sdk script it only loads the Paypal button render - webview

I have tried running the same code in ReactJs and it works the Paypal SDK script gets executed and paypal is loaded but in React Native webview it cant execute the Script

Related

React Native WebView offline-first or local content

I am building React Native application with integrated AppCenter SDKs (analytics, crash reporting, CodePush for in-app updates). This application is only a 'wrapper' for our online web presentation. The requirement is to make it offline-first with possibility to update the wrapper or web presentation.
My idea was to attach web presentation files to React Native project and WebView with local HTML source. BUT - it works only in emulator. React Native packager (or bundler) is possible to render full HTML file with all it's internal dependencies (JS, fonts, CSS, other assets). Like this:
import htmlSource from './presentation/index.html'
<WebView
source={htmlSource}
style={styles.webview}
/>
This works fine on emulator, but when I create a production build, JS bundle does not contain any HTML dependencies so presentation is only raw HTML without styles and any other assets. So I am not able to render full presentation with WebView. Creating CodePush release (for in-app update) is the same - without assets.
Do you have any ideas how to make this working? I need to be able to render presentation when device is offline but when is connected, be able to update it.
We do not want to make a full deploy process to App Store, because of its long review/verify process.
Why it works on emulator but in production build it does not work? Is it possible to make a bundle different way to attach all HTMl file dependencies? Or is it possible to offline-cache the WebView content if I point to URL address?
Thanks for any ideas.
react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output release_ios/index.ios.jsbundle --assets-dest release_ios/
then drag your local css、assets... to assets

PayPal Express Checkout - PayPal button not getting rendered on iOS

I am building a hybrid application using cordova. Also I am using Express checkout to integrate PayPal with the application referring this example
This code is working well on Android but not working on iPhone. The PayPal button is not getting rendered.
Is there any other way to integrate PayPal in hybrid apps?
More than likely it's the external javascript that's causing you an issue. Check for XSS permissions to load them. Also ensure that javascript is enabled for your web view.
You can also debug a Cordova application (or any web view in iOS) using the developer menu in Safari and see any Javascript or XSS errors in that layer.

How can I call with native Swift methods from Electron app using javascript?

I am looking to add in-app subscriptions to the mac desktop app so I can submit to app store.
I have the code written for iOS using the cordova plugin: https://github.com/AlexDisler/cordova-plugin-inapppurchase
But for electron there exists no such plugin.
So I can use the native swift code from the plugin, but need a way to write a custom plugin so I can call swift methods from javascript running the Electron app.
Please let me know how to approach this, or point me to the correct resources.
Thanks You

Updating Electron app

The Electron framework from GitHub has a feature that lets you automatically update your app by using some server utility called Squirrel. What I am wondering is whether an Electron app can simply just update itself without depending on any server utility. Since an Electron app is basically a web-based app using HTML and Javascript, couldn't you just create an "empty" app that has no UI or code other than some bootup Javascript code that downloads the entire UI and other scripts to run the app?

DropBox authenticate in cordova / phonegap (android)

Im trying to add dropbox support in my phonegap app, but i can't authenticate. (via dropbox-js/https://github.com/dropbox/dropbox-js)
I use:
client.authDriver(new Dropbox.Drivers.Cordova({rememberUser:true}));
The app opens a login/confirmation-dialog/ok but locks in the last step
in browser works fine with:
client.authDriver(new Dropbox.Drivers.Redirect({rememberUser:true}));
Is there any solution compiling with adobe phonegap build?

Resources