expo

Keyboard blocking textinput with Scrollview and KeyboardAvoidingView in react native

青春壹個敷衍的年華 提交于 2019-12-13 04:28:02
问题 I am using RN 0.55.4 + Expo I tried to use KeyboardAvoidingView to my form but it doesnt change anything with or without KeyboardAvoidingView , its still blocking my form. I am using tcomb-form This is my current code return ( <View style={styles.container}> <KeyboardAvoidingView> <ScrollView> <View> <Header/> <View style={styles.inputs}> <LoginForm formType={formType} form={this.props.auth.form} value={this.state.value} onChange={self.onChange.bind(self)}/> {passwordCheckbox} </View>

Using Jest to mock named imports

ぐ巨炮叔叔 提交于 2019-12-12 20:50:02
问题 I have a 'notifications.js' module that looks a bit like this: import { Notifications, Permissions } from 'expo' export function setLocalNotification(storage = AsyncStorage) { return storage .getItem(NOTIFICATION_KEY) .then(JSON.parse) .then(data => { if (data === null) { return Permissions.askAsync( Permissions.NOTIFICATIONS ).then(({ status }) => { if (status === 'granted') { Notifications.cancelAllScheduledNotificationsAsync() ...etc. In my test, I want to mock Permissions and

React Native's onScroll, onScrollEndDrag, onScrollBeginDrag supported on Android?

有些话、适合烂在心里 提交于 2019-12-12 20:15:11
问题 I have a few simple console.log statements in onScrollBeginDrag , onScroll , and onScrollEndDrag attached to a ScrollView . I can see that they work as expected on my iOS device, but they are not working on an Android emulator. This raises the question, are these props only supported on iOS or is there a problem with Android emulator? the code is as simple as: onScroll={() => console.log("scroll")} onScrollBeginDrag={() => console.log("begin")} onScrollEndDrag={() => console.log("end")} 回答1:

Can not get expo push token on Android

北城余情 提交于 2019-12-12 20:07:36
问题 I am building a React native app which is based on Expo and I want to also take advantage of Expo's push notification capabilities in a combination with Firebase realtime database. I am basically following the steps being described here. Everything was going pretty well before reaching the part where push notification token has to be extracted. registerForPushNotificationsAsync = async (userInfo) => { // ... Stuff // Get the token that uniquely identifies this device let token = await

How to use SVG-Uri in React-native or Expo?

泄露秘密 提交于 2019-12-12 18:34:04
问题 I downloaded the expo-svg-uri module to use the Svg image. But the image doesn't come out right. Code I failed: <View style={styles.container}> <SvgUri width="200" height="200" source={require("../../image/minigroup.svg")} /> </View> Failed Image Original Image this is my svgfile <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="183" viewBox="0 0 80 183"> <defs> <circle id="b" cx="35" cy="35" r="35"/> <filter id="a" width="142.9%" height=

React Native expo create iOS app without mac?

大城市里の小女人 提交于 2019-12-12 18:33:08
问题 Can I develop for IO using React Native? I don't have mac or money to buy it. I have listen about expo.io which do it on there servers. 回答1: If you use expo, then we build the iOS app for you on our machines. You can test the app on your local Android device. 回答2: React and Expo allow you to write your application in javascript. Thus, you will be able to develop your app that will eventually work on an ios device. However, to test the app locally before you publish it you have two options: 1.

react-native with expo problem with facebook ads

ぃ、小莉子 提交于 2019-12-12 18:26:28
问题 I have error when try to display Interstitial from fb: The SDK version in the ad request is no longer supported for new apps. Please upgrade to one of the latest versions of the SDK. Do you have info if it will be fixed (updated fb sdk) in expo 32 release? When will be expo 32 release? UPDATE 2019.01.10 : I found this answer, but it works only with ExpoKit but i dont want detach from expo. 来源: https://stackoverflow.com/questions/53836535/react-native-with-expo-problem-with-facebook-ads

Loading asset with custom extension not working

强颜欢笑 提交于 2019-12-12 16:22:54
问题 I'm trying to implement my first application in react-native and I need to open database from a static file saved in my project folder. I read that i need to allow loading custom extensions files from assets so i added following fragment into my app.json file: "packagerOpts": { "assetExts": ["sqlite", "db"] }, Next I'm trying to import this static file with .sqlite or .db extension inside my App.js component in componentDidMount() method: componentDidMount = async () => { await Expo

Cannot find entry file index.js with Expo XDE

强颜欢笑 提交于 2019-12-12 16:05:16
问题 When I load my react-native app in Expo I get the error: "Cannot find entry file index.js in any of the roots." I am adding onto an existing React Web App, and have index.ios.js at the root level. Everything works fine locally, in simulator and through Xcode on my phone hardwired. I've converted my app with exp convert and integrated all info into exp.json . All info for the ios app is contained in a folder called "ios". Has anyone run into this or have any thoughts on how to get unstuck? 回答1

React Native - JEST: react-native/jest/hasteImpl.js in the haste.hasteImplModulePath option was not found

余生长醉 提交于 2019-12-12 11:45:45
问题 I am implementing jest on a react native application based on expo.io After following the implementation notes I have been able to successfully pass the jest tests on my system The issue is with bitbucket pipelines. I get the following issue and the pipeline gets failed npx jest --ci ● Validation Error: Module react-native/jest/hasteImpl.js in the haste.hasteImplModulePath option was not found. <rootDir> is: /opt/atlassian/pipelines/agent/build The following is my jest config in the package