美文网首页
创建 React Native 项目并在Xcode运行

创建 React Native 项目并在Xcode运行

作者: Qy_iOS | 来源:发表于2022-05-11 14:07 被阅读0次

    1.搭建开发环境(官网:https://www.react-native.cn/docs/environment-setup)

    准备环境搭建

    2.xcode cocoaPods 安装,以及M1注意事项

    Xcode 准备

    3.创建项目,以及注意事项

    创建项目

    4.运行项目

    5.运行结果

    已运行到模拟器

    6.概括

     正常来说按照官方文档操作是没有问题的,但是在运行途中难免会出现问题。

    比如:

    临时解决方案:打开iOS目录下的podfile

    将    # post_install do |installer|

        # react_native_post_install(installer)

        # __apply_Xcode_12_5_M1_post_install_workaround(installer)

      # end

    这段代码全部注掉后,在重新运行。

    相关文章

      网友评论

          本文标题:创建 React Native 项目并在Xcode运行

          本文链接:https://www.haomeiwen.com/subject/tyblurtx.html