Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何修复不为iOS构建的React本机应用程序_Ios_Reactjs_React Native - Fatal编程技术网

如何修复不为iOS构建的React本机应用程序

如何修复不为iOS构建的React本机应用程序,ios,reactjs,react-native,Ios,Reactjs,React Native,我在为iOS构建react本机应用程序时遇到问题。对于android来说,它构建得非常好。对于iOS,项目将生成但不存档。以下是尝试存档我的项目时的错误代码: 1) Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/jacobcarpenter/Library/Developer/Xcode/DerivedData/LFGOPocker-gaqwcs

我在为iOS构建react本机应用程序时遇到问题。对于android来说,它构建得非常好。对于iOS,项目将生成但不存档。以下是尝试存档我的项目时的错误代码:

1) Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/jacobcarpenter/Library/Developer/Xcode/DerivedData/LFGOPocker-gaqwcsmtamkdjtbdiwhnzcvmexjk/Build/Intermediates.noindex/ArchiveIntermediates/LFGOPocker/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/jacobcarpenter/Library/Developer/Xcode/DerivedData/LFGOPocker-gaqwcsmtamkdjtbdiwhnzcvmexjk/Build/Intermediates.noindex/ArchiveIntermediates/LFGOPocker/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
有几件事需要说明: 运行React native 0.63, Podfile和部署目标都在11上

编辑:从命令行运行时,我收到此错误

      '/Users/jacobcarpenter/Library/Developer/Xcode/DerivedData/LFGOPocker-bzowsupbiktzuzaaadvokqxbgvzq/Build/Intermediates.noindex/ArchiveIntermediates/LFGOPocker/BuildProductsPath/Release-iphoneos/YogaKit/YogaKit.modulemap'
      not found```

我通过从pod目标中删除“React Core.common AccessibilityResources”修复了此错误。尝试存档时,请确保未使用.xcodeproj和您的工作区。即使您认为您正在使用工作区三重检查。另外,如果您尝试通过命令行进行归档,则必须明确说明工作区。

编辑:我通过使用我的Podfile仅从目标中删除React-Core.common-AccessibilityResources来修复生成问题

(我想回答杰克的回答,但我还没有足够的声誉发表评论)

我已尝试修改我的pod文件,以从Pods项目中排除这两个目标(React-Core.common-AccessibilityResources和React-Core.common-CoreModulesHeaders AccessibilityResources)。它开始编译,但最后仍然无法说明
AccessibilityResources.bundle
不存在

虽然切换到传统构建系统(在工作区设置中)似乎解决了AccessibilityResources问题,但也出现了其他问题(主要是关于Swift库,即使启用了桥接)


我还尝试删除我的Pods文件夹并进行干净的安装,但不幸的是,这不起作用。

对于那些对
Pods
不是很有经验的人,请在
pod文件(RN 0.63.2)中添加以下行:


尝试以下两个选项。01)使用旧版模式构建应用程序(文件>工作区设置>构建系统>旧版构建系统)。02)移除所有吊舱,重新安装吊舱!你能告诉我如何从我的pod目标中删除该文件吗?我不太习惯xCode。很抱歉,我刚刚看到了这个,不确定你是否还有这个问题。我所做的是在Xcode的文件目录中点击“Pods”,在“Targets”下会有一个列表,找到你要找的pod。你好!你能告诉我怎么做吗?我对xCode不是很有经验,我不想因为删除其他东西而把我的项目搞得一团糟。
target 'yourapp' do

  # your pods go here

  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])


  # Enables Flipper.
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.

  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)

    ################### ADD THE FOLLOWING #########################
    installer.pods_project.targets.each do |target|
      if target.name == "React-Core.common-AccessibilityResources"
        target.remove_from_project
      end
    end
    ###############################################################

  end
end