简体   繁体   English

iOS 应用程序无法在 fastlane 中构建,但可以在 Xcode 中运行

[英]iOS app fails to build in fastlane but works in Xcode

I'm building a React Native app and am using Fastlane to manage my signing, building and deployment.我正在构建一个 React Native 应用程序并使用 Fastlane 来管理我的签名、构建和部署。 I'm trying to build an ad-hoc package but each time I run the build using Fastlane gym , I get an error message about a missing header file.我试图建立一个特设的包,但每次我运行使用FASTLANE建造时间gym ,我得到一个缺少的头文件的错误消息。 The build runs fine in Xcode from Product -> Build and I can run the app fine in my local simulators.构建在 Xcode 中从 Product -> Build 运行良好,我可以在本地模拟器中正常运行应用程序。

The error message I'm seeing is from gym AppDelegate.m:13:9: 'ReactNativeNavigation/ReactNativeNavigation.h' file not found , which I'm aware is associated with theReact Native Navigation setup , and have followed the steps to fix it.我看到的错误消息来自gym AppDelegate.m:13:9: 'ReactNativeNavigation/ReactNativeNavigation.h' file not found ,我知道它与React Native Navigation setup相关联,并已按照步骤修复它。

Has anyone seen this error before, or have any suggestions on how to get more information about why the Xcode build is working?有没有人以前见过这个错误,或者对如何获取有关 Xcode 构建工作的更多信息有任何建议? I've tried scrubbing my build , pods and node_modules directories with no luck.我试过清理我的buildpodsnode_modules目录,但没有运气。 I'm using React Native 0.59.9 and Xcode 11.3.1.我使用的是 React Native 0.59.9 和 Xcode 11.3.1。

This is what I have in my Fastfile :这是我在Fastfile

match(
  type: "adhoc",
  git_branch: "master",
  git_url: "<my cert repo>",
  app_identifier: ["<main app ID>", "<app extension ID"],
  team_id: "<my team ID>",
  readonly: true,
)
sh('yarn', 'build:ios')
gym(
  workspace: "myApp.xcworkspace",
  scheme: "myApp",
  configuration: "Beta",
  export_method: 'ad-hoc',
  output_directory: "builds",
  output_name: ipaName,
)

FYI, in this case yarn build:ios is an alias for react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios --platform ios仅供参考,在这种情况下, yarn build:iosreact-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios --platform ios

You don't have to call yarn build:ios.您不必调用 yarn build:ios。 gym should take care of it.健身房应该照顾它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM