反应本机弹出
React Native Eject
我是 React Native 的初学者。
我在 https://facebook.github.io/react-native/docs/getting-started 上阅读了这篇文章
"If you used Expo CLI or Create React Native App to set up your project, you can preview your app on a device by scanning the QR code with the Expo app. In order to build and run your app on a device, you will need to eject and install the native code dependencies from the Getting Started guide"
谁能给我解释一下这些台词?
此外,如果我们可以通过在 phone 中使用 "expo app" 来查看我们的应用程序,为什么我们需要弹出它?
不确定你在哪里引用了上面的引述...
只有在使用带有本机代码的库时才需要弹出。否则,强烈建议使用 expo,它会让你的生活变得更轻松(一些最重要的是使用 expo 库,在开发过程中共享应用程序,构建 ipa 和 apk,无需重建和提交即可为用户获取更新到应用商店)。
两个 React Native 文档 (https://facebook.github.io/react-native/docs/getting-started) and expo documentation (https://docs.expo.io/versions/latest/expokit/eject/) 都对此进行了讨论。
更新 - 在下面的评论中回答您的问题。
- 你的问题:"so there is no need to eject? i can build my whole app just by using expo? and can i publish my app through expo or do i have to eject it for publishing?"
- answer:除非您使用的是使用本机代码的包,否则无需弹出。如果可能的话,我总是努力不弹出。如果您继续使用 expo,您可以轻松发布并轻松创建 ipa 和 apk。没有它你就不能发布(我在某处读到它是可能的,我不知道该怎么做)并且你需要自己构建 ipa 和 apk。顺便说一句,我在弹出时遇到了一些问题,仍在尝试找出解决方案。所以现在,如果我开始一个需要本机包的项目,我将使用
react-native init
创建它,而不是在 expo + 弹出中。您是否尝试使用 expo 发布并创建 apk 或 ipa?如果没有,请尝试一下,看看它有多棒。现在用 react-native init
创建一个项目并尝试创建一个 ipa 和 apk。你会明白我的意思的。
我是 React Native 的初学者。
我在 https://facebook.github.io/react-native/docs/getting-started 上阅读了这篇文章 "If you used Expo CLI or Create React Native App to set up your project, you can preview your app on a device by scanning the QR code with the Expo app. In order to build and run your app on a device, you will need to eject and install the native code dependencies from the Getting Started guide"
谁能给我解释一下这些台词? 此外,如果我们可以通过在 phone 中使用 "expo app" 来查看我们的应用程序,为什么我们需要弹出它?
不确定你在哪里引用了上面的引述...
只有在使用带有本机代码的库时才需要弹出。否则,强烈建议使用 expo,它会让你的生活变得更轻松(一些最重要的是使用 expo 库,在开发过程中共享应用程序,构建 ipa 和 apk,无需重建和提交即可为用户获取更新到应用商店)。
两个 React Native 文档 (https://facebook.github.io/react-native/docs/getting-started) and expo documentation (https://docs.expo.io/versions/latest/expokit/eject/) 都对此进行了讨论。
更新 - 在下面的评论中回答您的问题。
- 你的问题:"so there is no need to eject? i can build my whole app just by using expo? and can i publish my app through expo or do i have to eject it for publishing?"
- answer:除非您使用的是使用本机代码的包,否则无需弹出。如果可能的话,我总是努力不弹出。如果您继续使用 expo,您可以轻松发布并轻松创建 ipa 和 apk。没有它你就不能发布(我在某处读到它是可能的,我不知道该怎么做)并且你需要自己构建 ipa 和 apk。顺便说一句,我在弹出时遇到了一些问题,仍在尝试找出解决方案。所以现在,如果我开始一个需要本机包的项目,我将使用
react-native init
创建它,而不是在 expo + 弹出中。您是否尝试使用 expo 发布并创建 apk 或 ipa?如果没有,请尝试一下,看看它有多棒。现在用react-native init
创建一个项目并尝试创建一个 ipa 和 apk。你会明白我的意思的。