Expo
reactnative.dev import { StyleSheet, View } from 'react-native'; import { WebView } from 'react-native-webview'; export default function App() { return ( <View style={ styles.container }> <WebView source={{ uri: 'https://expo.dev' }} /> </View> ); } const styles = StyleSheet.create({ container: { flâ¦
åã¯3ã¤æ¹æ³ã使ãåãã¦ãã¾ãã ⶠã³ã³ã½ã¼ã«ã確èªãã yarn startãå®è¡ããã³ã³ã½ã¼ã«ã«åºåããã¦ããã®ã§ãã¿ã¼ããã«ãè¦ãã°ç¢ºèªã§ãã¾ãã ä¸çªæ軽ã§ãã â· JS Debuggerã§ç¢ºèªãã yarn startãå®è¡ããã³ã³ã½ã¼ã«ã§ãjããæ¼ä¸ããã¨ãChromeã®â¦
ååã¯ãç°¡åã« Yarn Workspacesã®ç°å¢ãæ§ç¯ãã¾ãããblog.kimizuka.orgä»åã¯ãYarn Workspacesã使ã£ã¦è¤æ°ã®Expoããã¸ã§ã¯ãã管çãã¦ã¿ããã¨æãã¾ããã¨ããã®ããååã®æ§ç¯æ¹æ³ã§ãè¤æ°ã®Expoããã¸ã§ã¯ãã管çããã¨ã Error: Cannot resolve â¦
Xcodeã®ããã¤ã¹è¨å® iPadé対å¿ã®iOSã¢ããªãæ¸ãåºãããæãXcodeã®ã¢ããªã®è¨å®ãã General > Deployment Info > Device ã iPhoneï¼iPhoneãiPadãUniversalããé¸æï¼ã«ããã°OKã ã¨æã£ã¦ããã®ã§ãããã²ããã¶ãã«Xcodeãéãã¦ã¿ãã¨ãè¥å¹²åæãâ¦
blog.kimizuka.orgåå ã¯iOSã¢ããªã®ã¿ä½¿ããæ¹æ³ãæ¤è¨¼ãã¾ããããä»åã¯Androidã¢ããªãã¦ã§ãã¢ããªã«ã対å¿ã§ããæ¹æ³ãæ¤è¨¼ãã¾ããå®ç¾æ¹æ³ããã£ãã調ã¹ãã¨ããã¤ã¦ã¯ AsyncStorage ã使ã£ãæ¹æ³ã主æµã ã£ãããã§ããreactnative.devããããç¾â¦
Cloud Firestore ããªã¬ã¼ ã使ã£ã¦ãããã¥ã¡ã³ãã«å¤æ´ããã£ãéã«ããã·ã¥éç¥ãéã£ã¦ã¿ã¾ãããfirebase.google.com åæ Cloud Firestoreã«ããã¤ã¹ãã¼ã¯ã³ãä¿åããï¼tokensã³ã¬ã¯ã·ã§ã³ã«ããã¤ã¹IDãããã¥ã¡ã³ãIDã«ãã¦ä¿åããï¼ Cloud Firesâ¦
é¢é£è¨äº Expoã§ã¤ãã£ãã¢ããªã«ãã¼ã«ã«ãµã¼ãããããã·ã¥éç¥ãéã blog.kimizuka.org Expoã§ã¤ãã£ãã¢ããªã«ãµã¼ãããããã·ã¥éç¥ãéã blog.kimizuka.orgããã¾ã§ããã¼ã«ã«ãµã¼ãããããã·ã¥éç¥éä¿¡ããµã¼ãããããã·ã¥éç¥éä¿¡ã試ãã¾ãâ¦
ãã¨ã®çºç«¯ Expoã§ä½ã£ãã¢ããªããã©ã¢ã°ã©ã¦ã³ãã«ãªã£ãã¿ã¤ãã³ã°ãããªãã¡iOSã¢ããªã§ããã¨ããã®viewWillEnterForegroundãã©ãæ¸ãã®ããReact Nativeã®ããã¥ã¡ã³ãã§èª¿ã¹ãã¨ããã import { useRef, useState, useEffect } from 'react'; importâ¦
çµè« firebase 9.6.7ã使ã£ãã解決ãããï¼expoã¯44.0.0ï¼ ãã¨ã®çºç«¯ ãã¡ãã®ããã¥ã¡ã³ããã¿ãªãããExpoã¢ããªã«Firebaseãå°å ¥ãããã¨ããã®ã§ãããiOSã§ãAndroidã§ãinitializeAppã®ã¿ã¤ãã³ã°ã§ãCan't find variableï¼IDBindexãã¨ã¨ã©ã¼ã表示â¦
ãã¨ã®çºç«¯ expo startã§èµ·åããExpoã¢ããªã¯ãã¿ã¼ããã«ã§iãæ¼ä¸ãããã¨ã§iOSã·ãã¥ã¬ã¼ã¿ã¼ã§ãã¬ãã¥ã¼ãããã¨ãã§ãã¾ãã Macã«Xcodeã¨Command Line Toolsãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ãæ¡ä»¶ã¨ãªãã®ã§ããã両æ¹ã¤ã³ã¹ãã¼ã«ãã¦ãã â Xcode neâ¦
ååã¤ãã£ããExpoã¢ããªã«ããã·ã¥éç¥ãéããã¼ã«ã«ãµã¼ããblog.kimizuka.orgãããªããã¾ããã£ãã®ã§ãããããã®ã¾ã¾HerokuãããLambdaãããCloud Functionsããã«ãããã¤ããã°ãåé¡ãªãããã·ã¥éç¥ãé ããã¨æãè¾¼ãã§ãã¾ããããå·éã«èâ¦
çµè« ãã¨ã®çºç«¯ Expoã®èª¿æ» Expoã®å°å ¥ ⶠã¢ã«ã¦ã³ãã®ä½æ â· ã¢ããªã®æºå ⸠expo-cliã®å°å ¥ â¹ expo-cliã«ãã°ã¤ã³ ããã·ã¥éç¥ãåä¿¡ããã¢ããªã®ä½æ ⶠããã¸ã§ã¯ãã®ä½æ â· expo-notificationsã®å°å ¥ ⸠app.jsonãç·¨é â¹ ã³ã¼ããæ¸ã App.tsx ããã·â¦