Posts

Showing posts with the label react-native

FBSDKCoreKit/FBSDKCoreKit.h file not found

Image
FBSDKCoreKit/FBSDKCoreKit.h file not found I don't seem to be able to find the libRCTFBSDK.a file: So I get the error: FBSDKCoreKit/FBSDKCoreKit.h file not found I have most definitely added the frameworks to the frameworks folder, choosing not to copy if needed. And I have definitely added the file paths to framework search paths and it is the correct file path: framework search paths In the top image should librctFBSDK be in that list?? Have the same issue here. I was using these instructions: developers.facebook.com/docs/react-native/getting-started Also I've been trying to install the lib with using of instructions on github page, but also got no success (with some different errors). – andrfas Sep 19 '17 at 16:45 @andrfas Take a look at my answer. It worked for me. It might not apply to you be b...

React Native App Icon Not Showing As Specified in Res Folder

React Native App Icon Not Showing As Specified in Res Folder I have been working with react native for quite a while. I am having this weird issue with the application icon. I am only targeting Android for now. I have replaced the ic_launcher.png in all "android/app/src/main/res/mipmap-*" folders. After deploying the app on emulator or a real device the app icon is showing a black droid icon like the image link (Black droid icon instead of app icon) I tried this on actual devices too same issue. Note: When i open the list of apps from phone settings the app icon is showing fine in the list of apps see image link (Icon showing fine in app list from android settings) Could anyone direct me what the issue might be? I tried cleaning and rebuilding. Also tried clearing all cache and reinstalling app. Also generation of signed apk has the same behavior. Just wanted to know that, all replaced icons are of same size? If yes then please try cleaning the gra...

Download file using Blob in react-native

Download file using Blob in react-native Since React-native v0.54 and Expo SDK v26 , Blob are now supported. v0.54 SDK v26 I'm trying to download a file available on a URL to my phone (if possible, in my Downloads directory on Android) Downloads All i can find for now is existing solution using react-native-fetch-blob which seems not necessary anymore. react-native-fetch-blob If anyone could provide a brief example on how to start implementing this feature on Expo snack Expo snack By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

React Native and Objective C delegates

React Native and Objective C delegates I am quite new to react native and and the bridging mechanism with native code, especially when the framework has delegates. Assume I am trying to bridge the following framework: @protocol BRPtouchNetworkDelegate; @class PLNetworkModule; @interface BRPtouchNetworkManager : NSObject <NSNetServiceBrowserDelegate,NSNetServiceDelegate> @property(retain, nonatomic) NSMutableArray* registeredPrinterNames; @property(assign, nonatomic) BOOL isEnableIPv6Search; - (int)startSearch: (int)searchTime; - (NSArray*)getPrinterNetInfo; - (BOOL)setPrinterNames:(NSArray*)strPrinterNames; - (BOOL)setPrinterName:(NSString*)strPrinterName; - (id)initWithPrinterNames:(NSArray*)strPrinterNames; - (id)initWithPrinterName:(NSString*)strPrinterName; @property (nonatomic, assign) id <BRPtouchNetworkDelegate> delegate; @end @protocol BRPtouchNetworkDelegate <NSObject> -(void) didFinishSearch:(id)sender; @end The following is the bridge module I implemented: ...

How do I Navigate between multiple .js file in my React Native App?

How do I Navigate between multiple .js file in my React Native App? As a newbie in React Native, I'm trying to find a way to Navigate between the pages. everything that I found from google was about navigating between classes inside App.js and some other that has separated files was not working for me. I found a lot of examples of using 'Navigator','StackNavigator','React-native-router-flux' but none of them worked for me. this is what I need to learn: login page: ./src/pages/Login.js Homepage: ./src/pages/Home.js login page(username & password) ------> if true -----> Homepage 1 Answer 1 Just install plugin npm install --save react-navigation import plugin and files in your app.js import { createStackNavigator, } from 'react-navigation'; import LoginScreen from './src/pages/Login.js'; import HomeScreen from './src/pages/Home.js'; const ...

Content not visible native-base

Image
Content not visible native-base I have simple anatomy with header, content and footer inside container, But only header is visible and nothing visible in content (with header and content only) <Header>....</Header> <Content><Text>Some content</Text></Content> But, if I place all ie. header, content and footer. Then footer replaces header and only footer is visible. Content is not at all visible in any case. native-base -v 2.3.1 2 Answers 2 You should wrap everything in a View, with a style set like so: <View style={styles.container}> <Header>...</Header> <Content> <Text>Some content</Text> </Content> <Footer>...</Footer> </View> And then in your stylesheet: const styles = StyleSheet.create({ container: { flex: 1, // You should only need this height: '100%', // But these would...

Mapping / Looping inside dumb component in React

Mapping / Looping inside dumb component in React I create a dumb component that used by so many data, but same display. The problem is, is it better dumb component to accept only native data type or array of object? since my data property is difference each table. <ScrollView> {listOfData.map(()=>( <Dumb title={data.title} description={data.description} > ))} </ScrollView> pros: No object properties dependancy cons: Need Loop in smart component which make it messy vs <ScrollView> <Dumbs data={listOfData} > </ScrollView> pros: More simple in smart component cons: The dumb component only accept specific data properties So which one better? I do use a second one and mapping it in my component.ts first to change object properties, but it make component.ts messy 2 Answers 2 I think the nicest way would be: <ScrollView> {listOfData.map((data) =...

Expo/GenyMotion throws “ADB server didn't ACK” when running project

Image
Expo/GenyMotion throws “ADB server didn't ACK” when running project I'm trying to set up a React Native project using GenyMotion and Expo on Ubuntu. However, when I click the 'Device' button in Expo to package the app onto the emulator, I get the following error in the Expo console: I initially tried to use React Native through Android Studio, with the inbuilt Android emulator, so I thought the issue might that my computer hasmultiple ADB versions (when I ran $ adb --start-server from the terminal, it'd run the Android Studio binary, not the GenyMotion one). So I: $ adb --start-server Android/Sdk/ $ adb --start-server $ sudo apt-get remove adb android-tools-adb Set the filepath for the Android SDK in GenyMotion to my GenyMotion Android SDK. But I'm guessing is the same as the default setting, so I don't know if I needed to do this? Removed all path variables related to Android Studio from my .bashrc file, including $ANDROID_HOME . (should I instead set $AN...

Cannot resolve symbol PermissionListener in react-native-image-picker

Cannot resolve symbol PermissionListener in react-native-image-picker import com.facebook.react.modules.core.PermissionListener; Cannot resolve symbol PermissionListener. friends i am a newbie in react-native and getting this issue in react-native-image-picker. i have added api 'com.facebook.react:react-native:0.20.1' in my gradle file. any solution friends? plz mention which library are you using? write what you have done? – Sagar Chavada yesterday have you write 'react-native link' – Sagar Chavada yesterday i have added library project implementation project(':react-native-image-picker'). but in this library project – Hi...

How to add a whole schema into the another schema in Realm database using react native>

How to add a whole schema into the another schema in Realm database using react native> I am working in the Shoping cart app. I have shown the Item image description and price in the dashboard. When the user want to add an item to the cart i have given a ADD button. But i don't know how to add the item into the cart. I am using realm database for react native (An hybrid mobile app). Can any one help me. Do you store the cart in a Realm? If so, you can have a property which is a list of items. – geisshirt Jul 3 at 21:25 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

react-native-fcm don't receive notification when app is opened

react-native-fcm don't receive notification when app is opened Why can't i receive notication from react-native-fcm when the app is opened? Here is my payload const proState={}; proState.notiUID=recKey; proState.notiPayload={ data: { senderKey:senderKey, id: senderKey+':chat', type: 'chat' }, notification: { title: proState.senderSnap.fullname, body: proState.lastmsg, sound: 'default', id: senderKey+':chat', tag : senderKey+':chat', priority : "high", data: senderKey }, }; const optionss = { priority: "high", show_in_foreground: true }; return admin.messaging() .sendToTopic(proState.notiUID, proState.notiPayload,optionss) I only receives notifications when the app is minimized or closed 1 Answe...

When textInput focused, first touch on flatList doesn't work, however the second works

When textInput focused, first touch on flatList doesn't work, however the second works When I type something into TextInput, then I touch one of FlatList items first time. It should console.log('item press'), but it not. Only the second touch It consoles. Does someone know the reason? This is my code. <TextInput placeholder='test' value={this.state.inputText} onChangeText={(inputText) => this.setState({inputText})} style={{marginBottom: 20, fontSize: 17, width: 300, textAlign: 'center'}} /> <FlatList data={[{key: 'item 1'}, {key: 'item 2'}]} renderItem={({item}) => <TouchableHighlight onPress={() => console.log('item press')} underlayColor='#dddddd'> <View style={{height: 40}}> <Text style=...

React Native: Different styles applied on orientation change

React Native: Different styles applied on orientation change I'm developing a React Native application to be deployed as a native application on iOS and Android (and Windows, if possible). The problem is that we want the layout to be different depending on screen dimensions and its orientation. I've made some functions that return the styles object and are called on every component render's function, so I am able to apply different styles at application startup, but if the orientation (or screen's size) changes once the app has been initialized, they aren't recalculated nor reapplied. I've added listeners to the top rendered so it updates its state on orientation change (and it forces a render for the rest of the application), but the subcomponents are not rerendering (because, in fact, they have not been changed ). So, my question is: how can I make to have styles that may be completely different based on screen size and orientation, just as with CSS Media ...