Posts

Showing posts with the label react-native-ios

React native map integration

I am trying to integrate map in react native. I am following the below tutorial. https://github.com/airbnb/react-native-maps I gone through all the installation instruction. I am using react-native version : 0.44.0 and react-native-map version : 0.13.0 I made sure that react-native-link is linked with android and iOS. While rendering the mapview in ios simulator, map is not showing and only i am able to a blank map with red outline. Please check my below code and let me know, where i am wrong. var MapView = require('react-native-maps'); <MapView initialRegion={{ latitude: 37.78825, longitude: -122.4324, latitudeDelta: 0.0922, longitudeDelta: 0.0421, }} /> Try adding a View and some heights and ...StyleSheet.absoluteFillObject <View style={{height:400}}> <MapView style={{ ...StyleSheet.absoluteFillObject,height:400 }} initialRegion={{ latitude: 37.78825, longitude: -...

get ApplicationContext on react-native

I have a watchKit app connected with a react-native iOS app with react-native-watch-connectivity. I want to use the applicationContext to communicate between the devices. From react-native, I use watch.updateApplicationContext({ dataFromRN: "data" }) to define it and I can get it in iWatch side. But when I use updateApplicationContext(["data":"data"]) in iWatch side, an updated context event is catch by react-native but the data is not updated. // iWatch try session?.updateApplicationContext(["dataFromWatch":"data"]) print(session?.applicationContext ?? "") ["dataFromWatch": "data"] but in react-native, I have the following output for this event: // react-native iOS receiveApplicationContext(err, applicationContext) { console.log("receiveApplicationContext()", applicationContext) receiveApplicationContext() {dataFromRN: "data"} dataFromRN is a previous a...

React Native Camera

Hey there! So, I'm testing React-Native and this problem have come up, and not sure what it wants. I have upgraded it, and also download latest versions. This is the error: npm WARN react-native-camera@0.6.0 requires a peer of react@>=15.4.0 but none was installed. It won't allow me to download it running the following command npm install react-native-camera --save Thanks for your time. Hey i had the same problem with react native camera First make sure the version is up to date.Either latest or next. Unless update it as npm install npm@latest -g Then reinstall camera again(No need to uninstall anything, because it is not installed yet) Here is the same issue that i opened in github now Closed because it solved the problem :) EDIT: i'm sure you got this error when you start to run npm install react-native-camera@https://github.com/lwansbrough/react-native-camera.git --save command right ? so it failed and never installed so...

React Native and Webpack

I played around with the react native tutorial provided by Facebook. The React Native seemed to have a bundler already. I planned to use Webpack as my bundler and Typescript. How do I use webpack on the current React Native Version?

React Native - React Native Architecture

Does React Native Application Development can be implement with Software Architecture such as MVC, MVP, MVVM ? Thank you. Yes. React Native is just the "V" in those software design patterns you're mentioning. If you consider other libraries around React, like Flux, then maybe my answer isn't 100% accurate. I recommend reading this: https://medium.com/javascript-inside/what-if-react-was-really-only-the-v-in-mvc-5854fd6f601c Here's a more complete answer, considering the App not being just React Native but also the backend and the data models involved: https://medium.com/of-all-things-tech-progress/understanding-mvc-architecture-with-react-6cd38e91fefd Hope it helps. Best way to do it is, by using Redux or Relay Architecture

React Native Version Mismatch

Getting the following message when i init a new project and then launch the x-code emulator. "React-Native Version Mismatch" Javascript Version 0.50.1 Native version: 0.50.0 Make sure you have rebuilt the native code... Does anyone know what is going on here and can help me? Thanks! This is what I've done with it: Close all terminals and run build again. You may forgot to close nodejs terminal from another project, and they happen to have installed different react version. So the code fetch from nodejs server conflicts with native one. Just go to your android/app/build.gradle and then add to the dependencies section: dependencies{ compile ("com.facebook.react:react-native:0.50.3") { force = true } } /// the react native version can be found in package.json In case you created your react-native app using create-react-native-app. You should have a app.json (expo). and a package.json file, check if the expo vers...