简体   繁体   中英

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. 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. The build runs fine in Xcode from Product -> Build and I can run the app fine in my local simulators.

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.

Has anyone seen this error before, or have any suggestions on how to get more information about why the Xcode build is working? I've tried scrubbing my build , pods and node_modules directories with no luck. I'm using React Native 0.59.9 and Xcode 11.3.1.

This is what I have in my 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

You don't have to call yarn build:ios. gym should take care of it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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