I have been trying to work out how to directly share videos to social media through my React Native (Expo) app, but I can't figure it out. I don't want to use "[share]" (https://www.stackoverflow.com/) from React Native, as that goes through a bottom modal first and then allows the user to choose the platform.
For example, I want to be able to click on a "share on Instagram" button and get directly directed to the Instagram app through my React Native app. I have tried the "expo-facebook" login as an example, but that doesn't work anymore with my Expo SDK version.
Please, does anyone have any suggestions or ideas for what I can do? I want to use it to share videos on YouTube, posts on Instagram, tweets on Twitter, and posts on Facebook.
Thank you in advance!
I have tried using "react-native-share" ([link] (https://react-native-share.github.io/react-native-share/docs/install)), but I can't link the native modules as I'm using Expo (I believe this is at least why). I ran "npm install react-native-share" and then tried to run "react-native link react-native-share" or "expo link react-native-share," but this didn't work.
I also tried using "expo-facebook," but the module has been deprecated ([link]: https://docs.expo.dev/versions/v45.0.0/sdk/facebook/).
Related
I would like to know whether it is possible to integrate the same design(checkout form) i.e,(https://checkout.stripe.dev/preview) in ReactJs. I have used the doc but able to add card number, expiry and cvv but unable add remaining fields.
PS: package used: npm i #stripe/react-stripe-js, npm i #stripe/stripe-js
You can get build a Checkout form that looks very close in React by using the PaymentElement. You can follow this guide (selecting Web as the platform and React as the frontend) to get started.
My basic static React Redux TypeScript app works locally on Windows, and then it also works when I deploy to GitHub Pages for every device I've tested except iPhone 6 iOS 12.0.1 (where it is a blank white screen).
I've researched many articles, such as:
React/redux app renders blank screen on Safari
React/Node Uncaught SyntaxError: Unexpected token <
Why deployed react app on gh-pages is showing blank page on different browsers while showing correctly on my browser?
https://stackoverflow.com/a/57027870/470749
https://community.netlify.com/t/react-application-builds-deploys-into-a-blank-page/2571
https://github.com/facebook/create-react-app/blob/061d1e46fcd4766d38b45499c3d29cfaa2b7d0af/packages/react-scripts/template/README.md#github-pages
https://caniuse.com/#feat=es6
Most of them try to solve the case where all devices show a white page. But that's not my scenario.
Others talk about how older browsers need polyfills, but I've already added try/catch blocks around my use of fetch.
I've also tried changing to "homepage": "." in package.json, but again, I don't think that's related to the issue because most browsers already work, so I know that the assets are being accessed.
Any ideas?
Finally I remembered that I could use the free http://xip.io/ service to browse from my iPhone to the "local" React server hosted on my Windows machine.
That way, I could see error messages that wouldn't be visible on production (at GitHub Pages).
I discovered that the error was "ReferenceError: Can't find variable: IntersectionObserver".
So the solution would be to use a polyfill.
See helpful links:
https://stackoverflow.com/a/55767479/470749
https://stackoverflow.com/a/59368511/470749
https://github.com/mhartington/lazy-load-image/issues/1#issuecomment-372384646
https://webkit.org/blog/8582/intersectionobserver-in-webkit/
https://caniuse.com/#feat=intersectionobserver
"IntersectionObserver API is supported on iOS Safari since 12.2." That explains why it worked on other iPhones but not mine.
Context
New electron user here. I just cloned and installed the recommended React + Electron repo: https://github.com/electron-react-boilerplate/electron-react-boilerplate
Now I want to use Material-UI. So I thought I just follow the instructions here:
https://material-ui.com/getting-started/installation/
After I did this, the app doesn't show me anything from Material-UI. I created a Component with a simple App Bar. But it does show nothing.
So I found out that there is another package.json in the folder /app/package.json
I cd'd into it and redid the installation. Restart the dev server but still nothing shows up (no appbar, just white screen).
Here is a screenshot:
Also according to the docs I should add a link for the roboto font to the html file. Where is this supposed to go? I put it into the only html file I found in app/app.html.
How can one set up Material-UI with Electron or rather this specific boilerplate?
I couldn't find anything up to date for this question.
I found the error. Turns out I imported MenuIcon but material doesn't export it. So when I get rid of it, the appbar renders correctly.
Unfortunately I can't share the website in question, I just hope someone can steer me in the right direction without seeing either it or too much of the code.
The React Native(iOS only) app is built with;
react 16.0.0-alpha.12
react-native 0.47.1
The website is built with;
React 16.0.0
Babel is set up correctly, and babel-polyfill is baked in too.
Description
The use-case is that we need to load, say, the FAQs page from the company ReactJS-based site in the mobile phone app's webview component.
However, the webview does not load the bundle.js for the website. CSS, HTML ect loads, but not the React bundle. Running JS inline in a script tag as a test works, but only if I remove the bundle.js file from src.
So something about the ReactJS build does not play nicely when loaded in a RN Webview. The site loads just fine via the mobile phone browsers however.
I'm trying to include this admob plugin.
I've tried everything, but whatever I do, the window.plugins.AdMob is always undefined.
I checked it on my android device and also on the ios simulator (I know it's not working in the browser).
What I did:
I added the plugin with the following command:
cordova plugin add com.google.cordova.admob
Then I tried following the instructions from the plugin, but also used the code example from here.
But whatever I do, window.plugins.AdMob is always undefined.
I also tried loading it with a 3000ms timeout (because some answers say that the plugin is not initially ready and takes some time).
I really don't have a clue what to try next or what step I missed.
I also tried the google analytics plugin and followed the tutorial here but again, the "analytics" object is undefined. What do I miss here?
Instead of using window.plugins.AdMob, please directly use AdMob, or window.AdMob.
It's defined in the plugin.xml:
<js-module src="www/AdMob.js" name="AdMob">
<clobbers target="window.AdMob" />
</js-module>
The example code you see, is for the old AdMob plugin.
1.install admob phonegap plugin
cordova plugin add https://github.com/admob-google/admob-cordova
init admob plugin
init plugin after deviceready event
admob.initAdmob("admob banner ID","admob interstitial ID");
3.show admob ads
admob.showBanner(admob.BannerSize.BANNER,admob.Position.TOP_APP);//show banner at the top of app
Take a look at this https://github.com/Dharmoslap/ng-cordova. You can use AdMob Pro as well.