react-native-ios

React Native - trigger scrolling of FlatList outside the FlatList

孤者浪人 提交于 2019-12-11 06:52:20
问题 I have a vertical FlatList component and two buttons as TouchableOpacity , how do I perform scrolling of the FlatList with the buttons, i.e. 'scrolling the FlatList towards bottom` and 'scroll the FlatList towards top'? Minimal Example: <View> <FlatList/> <TouchableOpacity> <Text>Scroll towards Top</>Text </TouchableOpacity> <TouchableOpacity> <Text>Scroll towards Bottom</>Text </TouchableOpacity> </View> 回答1: This is not difficult to accomplish, The <Flatlist/> component already have methods

React Native Image Picker: “undefined is not an object (evaluating 'ImagePickerManager.showImagePicker')”

孤街醉人 提交于 2019-12-11 04:27:07
问题 I followed the Readme from react-native-image-picker with both manual and automatic linking (tried both separately). When I launch simulator from terminal using react-native run-ios I get the error. When launching from Xcode it works fine, I can access the CameraRoll picker no problem. Here are the versions I'm using: "react-native": "0.43.3", "react-native-image-picker": "^0.26.3", I saw a similar thread here stackoverflow and it seems I'm not the only one having this issue. Thank you for

React Native Fetch Blob File Empty

我怕爱的太早我们不能终老 提交于 2019-12-11 02:49:44
问题 We are having a problem with React Native Fetch Blob when a PDF is over 1mb in size. The file is being uploaded to Azure Blob Storage and works fine when the PDF is less than 1MB but as soon as the file is over 1MB the upload fails and the file in the container is empty. We are using the module in an IOS React App but we also have a web app. When we upload the PDF via the web app everything is fine so it seems that this is something specific to the mobile app. Further testing shows that if we

Crop image with react-native

大兔子大兔子 提交于 2019-12-10 20:56:19
问题 Hello World, I trying to crop an image like explain on the React-native Doc <Image source={{uri: this.props.image, crop: {left: 50, top: 50, width: 100, height: 100}}} style={{height: 100, width: 100}}/> But it's doesn't work the image is not cropped. Any idea? 回答1: From the docs: On the infrastructure side, the reason is that it allows us to attach metadata to this object. For example if you are using require('./my-icon.png'), then we add information about its actual location and size (don't

TextInput not working as expected when programmatically entering text

三世轮回 提交于 2019-12-10 18:27:44
问题 The below code does not work properly in iOS (iPhone 6). When I press ‘Push Me’, the word is not displayed completely and the cursor is also not shown. On further investigation, I found out that onChangeText and onContentSize change are not triggered. Pressing any key on the key board after pressing the ‘Push Me’ button displays the full word. I want the full word to be displayed when the button is clicked. It works, if I use value prop to update the TextInput. But I need to display formatted

Implement gRPC in an iOS React Native app

China☆狼群 提交于 2019-12-10 17:47:51
问题 As described in this issue, we can't implement a gRPC client using the Node implementation because " RN is not pure Node ". So I started working on an Objective-C implementation using the Native Modules. [service postWithRequest:request handler:^(RequestConfirmation * _Nullable response, NSError * _Nullable error) { if (response) { // This prints correctly in my JS console RCTLogInfo(@"%@", response.message); // This generates an error, see below resolve(response); // This works NSDictionary

E2E: Select an image from a UIImagePickerController with Wix Detox

爱⌒轻易说出口 提交于 2019-12-10 14:42:41
问题 Description I need to write an e2e test that in some point it has to select an image in UIImagePickerController, I tried to use element(by.type('UIImagePickerController')). tapAtPoint() with no use. I need a way to select an image. I have found a way to do it with native tests. Also mocking isn't an option for me since I use a higher version that the one react-native-repackeger needs. Steps to Reproduce Use with any application that uses image picker Try to use element(by.type(

AutoCompleteTextView in react native compatible with both iOS and Android

核能气质少年 提交于 2019-12-10 13:29:17
问题 I need to implement AutoCompleteTextView in react native. The problem is that there is no such built-in component. All the modules and libraries available to mimic this feature is not completely similar. The main issue is the suggestions are not appearing over the view(like that of select box/picker). Even if it is then it is not behaving perfectly withKeyboardAvoidingView. The whole point is it is not working like native AutoCompleteTextView for Android The other solution is using native UI

React Native iOS send notification through receiving socket.io from the server in background mode

时间秒杀一切 提交于 2019-12-10 12:23:24
问题 I am using react-native-notification module to send a local notification when I receive a socket.io event sent from the server. The notification is properly configured and works on both iOS and Android in foreground mode. However, due to the fact that Apple doesn't allow Apps to run on the background except for (Audio, navigation map, etc.), I am not able to receive any socket events when my app is not on the background and temporarily suspended. I'm therefore not able to send a local

How can i check app installed in react native code

﹥>﹥吖頭↗ 提交于 2019-12-10 11:12:57
问题 i tried to check other app install in my react native project, I'm used module like: https://www.npmjs.com/package/react-native-check-app-install But always got this error: Cannot read property 'pkgName' of undefined Here is my code: AppInstalledChecker .isAppInstalledAndroid('com.skype.raider') .then((isInstalled) => { // isInstalled is true if the app is installed or false if not console.log('App Skype status: ', isInstalled); }); Anyone can suggest me one way so check app install in react