expo

Using custom Font in react native with expo, loading font every time

混江龙づ霸主 提交于 2019-12-05 08:19:07
I am using Expo and the create-react-native app. I enjoy the live/hot reloading feature on my phone, but I'm wondering about custom fonts. https://docs.expo.io/versions/v17.0.0/guides/using-custom-fonts.html#loading-the-font-in-your-app The API for Expo only has directions to load them asynchronously. Do I have to do this on every component I want a custom font on? This seems like it would cause some unnecessary calls when I've already loaded it once. Is there a way to set the font as global or pass it via props once loaded? It seems like they suggest this approach via their last line in that

Expo / React-Native, Is it there a way to test-run standalone iOS apps on a device/simulator?

喜你入骨 提交于 2019-12-05 07:08:49
I'm using Expo to code my apps with React-Native. I can test my apps on Android devices running them from the Expo client app or building an APK and running it as standalone. On iOS I can run my app from the Expo client but I couldn't find a way to run the app as standalone. In this case, I would like to test the "native" facebook login functionality. Is it possible to run an app as standalone (without using the Expo client) on iOS? Note: I'm trying to avoid going through TestFlight for this, that will make my workflow painfully slow. I am using Mac OS. Run exp build:ios -t simulator to create

Expo.FileSystem.downloadAsync do not show download notification

孤者浪人 提交于 2019-12-05 04:37:30
I am using expo FileSystem to download the pdf file. The API response lands into success function. However, I am not able to show the downloaded file to the user. The expected behaviour should be like we usually see notification icon on the status bar and on click on icon its opens your file. FileSystem.downloadAsync( 'https://bitcoin.org/bitcoin.pdf', FileSystem.documentDirectory + 'Stay_Overview.xlsx' ).then(({ uri }) => { console.log('Finished downloading to ', uri); }) .catch(error => { console.error(error); }); This one had one or two tricks, but here is a solution to this using Expo that

Expo not loading (React-Native) — null Expo SDK version

淺唱寂寞╮ 提交于 2019-12-05 04:26:34
My app was working till today but now it looks like something happened to version 18 of Expo. I got this error: The experience you requested uses Expo SDK v(null), but this copy of Expo Client requires at least v20.0.0. The author should update their experience to a newer Expo SDK version. I then: Updated to Expo v20.0.0 Handled all unmet dependencies yarn cache clean rm -rf node_modules/ Reinstalled local node modules and I'm still getting the same error. What do I need to do to get Simulator to recognize that I am using the correct version of Expo? Current environment: Expo v20.0.0 react

Expo XDE “timeout of 60000 ms exceeded”?

久未见 提交于 2019-12-05 03:24:59
I am using Expo XDE to create a new project for my first react native application. But whenever I click on "create new project", it starts downloading some stuff and errors out. Don't know where to increase this timeout value, I checked the documentation of expo but could not find anything related to this. Any leads here is really appreciated. Please note that I installed expo xde-2.22.0.dmg on mac OS High Sierra version 10.13 (17A405) Looks like someone reported this issue to expo after reading this question . An update to XDE is made that increases the timeout. Upgrading to XDE v2.22.1

Share photo to Instagram from React-Native app built with Expo SDK

给你一囗甜甜゛ 提交于 2019-12-05 02:28:13
问题 I want my react-native app to share a photo with Instagram. I know it's possible when writing in native code to open up Instagram's filter screen with a specified photo. A restriction is that I'm using the Expo SDK, which doesn't allow 'npm link' for native dependencies. When this function is called, it will open Instagram: _handlePress = () => { Linking.openURL('instagram://app'); } This is the Button: <Button onPress={this._handlePress} title='Open Instagram' /> The image is stored in the

'expo' is not recognized as an internal or external command

允我心安 提交于 2019-12-05 01:59:58
After running npm install -g expo-cli and successfully installing the packages globally, expo is still not recognized as an internal or external command. Does anyone know how I might get around this issue using windows 10, or what to do in terms of something like a path variable. I may be too late to answer this, but for people looking for the same error this is what worked for me. Install yarn if you don't have it. I used the command choco install yarn (you'll have to install Chocolatey). If you have scoop installed, scoop install yarn also works. Use yarn to install expo with yarn global add

Error : Cannot read property fetch. Using jest-expo with react native

房东的猫 提交于 2019-12-05 01:36:15
TypeError : Cannot read property 'fetch' of undefined at node_modules/whatwg-fetch/fetch.js:4:8 at Object.<anonymous> (node_modules/whatwg-fetch/fetch.js:466:3) at Object.<anonymous> (node_modules/jest-expo/src/setup.js:97:348) Got error while running tests with jest-expo. If anyone have solution please share. Obviously this is a guess without a code snippet, but looking at what fetch.js looked like at the time , the undefined value whose fetch property we can't read is the variable self (see line 1), which was meant to be set to the this context (see line 466). Therefore, it seems that fetch

Suddenly seeing error “Plugin/Preset files are not allowed to export objects, only functions” in create-react-native-app project

丶灬走出姿态 提交于 2019-12-04 23:55:09
Have been working on a project generated via create-react-native-app . Have been successfully using the project for some time, but now trying to test the app via exp start --tunnel , am suddenly seeing error (though was working previously) of the form: [22:08:19] /path/to/node_modules/react-native-scripts/build/bin/crna-entry.js: Plugin/Preset files are not allowed to export objects, only functions. In /path/to/node_modules/babel-preset-expo/index.js [22:08:19] Failed building JavaScript bundle. Have seen some posts that seem to deal with the problem ( https://github.com/babel/babel/issues

IOS Expo Push Notifications when app is in foreground

泄露秘密 提交于 2019-12-04 21:54:40
问题 reading from the expo docs: For iOS, you would be wise to handle push notifications that are received while the app is foregrounded, because otherwise the user will never see them. Notifications that arrive while the app are foregrounded on iOS do not show up in the system notification list. A common solution is to just show the notification manually. For example, if you get a message on Messenger for iOS, have the app foregrounded, but do not have that conversation open, you will see the