Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robertying opened this issue Feb 26, 2021 · 1 comment
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@robertying
Copy link
Contributor

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:

@garrylachman
Copy link

workaround in xcode:
go to your target -> Build Phases -> Bundle React Native code and images
add export PLATFORM_NAME=ios before ../node_modules/react-native/scripts/react-native-xcode.sh

kelset pushed a commit that referenced this issue Jun 16, 2021
…31062)

Summary:
A recent commit 941bc0e#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close #31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

Pull Request resolved: #31062

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
danilobuerger pushed a commit to feastr/react-native that referenced this issue Jun 18, 2021
…acebook#31062)

Summary:
A recent commit facebook@941bc0e#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close facebook#31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

Pull Request resolved: facebook#31062

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
danilobuerger pushed a commit to feastr/react-native that referenced this issue Oct 28, 2021
…acebook#31062)

Summary:
A recent commit facebook@941bc0e#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close facebook#31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

Pull Request resolved: facebook#31062

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
danilobuerger pushed a commit to feastr/react-native that referenced this issue Oct 28, 2021
…acebook#31062)

Summary:
A recent commit facebook@941bc0e#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close facebook#31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

Pull Request resolved: facebook#31062

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
@facebook facebook locked as resolved and limited conversation to collaborators Jun 11, 2022
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants