Skip to content

[iOS][Mac Catalyst] Xcode build script changes cause regression on Catalyst build #31061

@robertying

Description

@robertying

Description

After upgrading to 0.64.0-rc.3, Mac Catalyst build fails in build phase Bundle React Native code and images, with the error:

main.jsbundle does not exist

Looking ahead of this line, cli complains about the incorrectly passed platform option being macos instead of ios, android or native. Hence the script fails.

React Native version:

System:
    OS: macOS 11.2.2
    CPU: (4) x64 Intel(R) Core(TM) i3-8100B CPU @ 3.60GHz
    Memory: 33.20 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.0 - /var/folders/mh/h5b3z2k57b37b17qxy8_347w0000gn/T/yarn--1614335138965-0.7492187769227359/node
    Yarn: 1.22.10 - /var/folders/mh/h5b3z2k57b37b17qxy8_347w0000gn/T/yarn--1614335138965-0.7492187769227359/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 30
      Build Tools: 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: 22.0.7026061
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_242-release - /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0-rc.3 => 0.64.0-rc.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Init with RN 0.64.0-rc.3
  2. Enable Mac Catalyst support in Xcode
  3. Run a release build

Expected Results

On 0.63, this is not an issue since platform was hardcoded as ios in react-native-xcode.sh. It should be consistent after upgrading to 0.64.

Snack, code example, screenshot, or link to a repository:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions