expo

Accessing class variable declared in constructor in other parts of the app (React)

馋奶兔 提交于 2019-12-12 03:46:51
问题 I'm currently learning React-native. I am following a Pluralsight tutorial but unfortunately some of his code is out of date. I have the following code: import Expo from 'expo'; import React from 'react'; import TaskList from './TaskList'; import { Component, View, Navigator, Text } from 'react-native'; class todo extends React.Component { constructor(props,context){ super(props,context); this.state ={ todos: [ { task: 'Task1', }, { task: 'Task 2', }, ] } } onAddStarted(){ this.nav.push({

Package failing to be found after successful install

孤街醉人 提交于 2019-12-11 15:57:02
问题 I try to run expo optimize and it says it requires sharp-cli . So I install sharp-cli as it directs. And then it gives me the same error. (first step described above is left out) $ npm install -g sharp-cli@1.10.0 /Users/TuzMacbookPro2017/.npm-global/bin/sharp -> /Users/TuzMacbookPro2017/.npm-global/lib/node_modules/sharp-cli/bin/cli.js + sharp-cli@1.10.0 updated 1 package in 24.632s $ expo optimize This will overwrite the original assets. Optimizing assets... Optimizing ./assets/electro-icon

My application only uploads to database after first account?

爷,独闯天下 提交于 2019-12-11 15:54:18
问题 So I am trying to authenticate users to firebase and add them to my users collection and store them by their unique id. When I go to my signup screen, if I reload the simulator the first account I try to sign up will authenticate but not be added to the database, but any subsequent account I add will authenticate and upload to the database. However, once I reload the application it will restart the process of not uploading the first one. This is the call I am making- firebase.auth()

[Error: ExpoAppAuth.Get Auth: JSON deserialization error]

穿精又带淫゛_ 提交于 2019-12-11 15:20:50
问题 Getting an error using AppAuth from 'expo-app-auth'; When i try to authi get the following error: [Error: ExpoAppAuth.Get Auth: JSON deserialization error] const config = { serviceConfiguration: { authorizationEndpoint: 'https://api.netatmo.com/oauth2/authorize', tokenEndpoint: 'https://api.netatmo.com/oauth2/token', }, clientId: 'cilentid', clientSecret: 'cilentsecret', scopes: ['read_presence'] } Is it something with the config? 回答1: Your config is not valid. This is related to the issue at

Expo: Issue Sdk33 relating to expo-Constants

 ̄綄美尐妖づ 提交于 2019-12-11 10:52:42
问题 I have a message which I can't remove when running my application The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: Constants. Add correct versions of these packages to your project using: expo install expo-constants If "install" is not recognized as an expo command, update your expo-cli installation. Change your imports so they use specific packages instead of the "expo" package: import { Constants } from 'expo' -> import Constants

W/ReactNativeJS: Possible Unhandled Promise Rejection (id: 3 AND 4)

眉间皱痕 提交于 2019-12-11 09:58:51
问题 I recently ejected my react-native project and the camera feature is not working. The code allows users to upload images. It works with expo but after eject and running with Android, it stopped working. This is code for the camera upload: import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker'; _checkPermissions = async () => { const { status } = await Permissions.askAsync(Permissions.CAMERA); this.setState({ camera: status }); // take permission for

Lastest version of Expo gives errors on start

陌路散爱 提交于 2019-12-11 08:55:40
问题 When I try to run the lastest update of the Expo application (released 9 jan 2019), I get the following errors: This is before I even start my own project. I am running the Expo app on an Android device. Does anyone have a clue why this is happening? 回答1: What solved the problem for me was to clear the data for the app. If you are wondering how to do that, here is a guide: How to clear cache and app data in Android 来源: https://stackoverflow.com/questions/54158040/lastest-version-of-expo-gives

What URI format does ImageStore.getBase64ForTag expect?

会有一股神秘感。 提交于 2019-12-11 08:41:14
问题 Suppose I have an Image, for example from the Image Picker, that looks like this: { "height": 2848, "origURL": "assets-library://asset/asset.JPG?id=B84E8479-475C-4727-A4A4-B77AA9980897&ext=JPG", "cancelled": false, "width": 4288, "fileSize": 342120, "isVertical": false, "uri": "file:///Users/sepp/Library/Developer/CoreSimulator/Devices/998C81E0-5CC6-4A3E-90C2-A7C43060220C/data/Containers/Data/Application/53F9F372-37DD-4CD2-B5E2-0D984A064686/Library/Caches/%2540anonymous%252Fcleanguide

Expo-pixi Save stage children on App higher state and retrieve

旧街凉风 提交于 2019-12-11 05:54:15
问题 I'm trying another solution to my problem: The thing is: im rendering a Sketch component with a background image and sketching over it onReady = async () => { const { layoutWidth, layoutHeight, points } = this.state; this.sketch.graphics = new PIXI.Graphics(); const linesStored = this.props.screenProps.getSketchLines(); if (this.sketch.stage) { if (layoutWidth && layoutHeight) { const background = await PIXI.Sprite.fromExpoAsync(this.props.image); background.width = layoutWidth * scaleR;

React-native application does not shut down on back button

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 05:37:47
问题 My react-native application (on Android) does not shut down when back button is pressed. It closes and goes in the background and runs there (animates). I also tried this, but got the same outcome: BackHandler.addEventListener('hardwareBackPress', () => { console.log('back pressed'); BackHandler.exitApp(); }); I want it to completely shut down when I press back or home button. P.S. I'm using Expo for development and deployment, and also start the app through it. 回答1: constructor(props) {