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

Update template to xcode 12 #30150

Closed

Conversation

janicduplessis
Copy link
Contributor

Summary

This makes a few change to the template xcodeproj

  • Update to recommended settings for Xcode 12
  • Remove the main.jsbundle file that doesn't exists, this file is included automatically in the app bundle and doesn't need to be in xcode (it won't even be at that path).
  • Add -e to the bundle images script. It seems like Xcode doesn't fail the build on script errors anymore so this makes it so the build stop. If it doesn't stop the app will launch and crash because the bundle doesn't exist (note this is only if running the app in release mode since in debug we don't generate the bundle).

Changelog

[iOS] [Added] - Update template to xcode 12

Test Plan

Made the same changes in an app and made sure it ran well.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels Oct 9, 2020
@react-native-bot react-native-bot added Platform: iOS iOS applications. Type: Enhancement A new feature or enhancement of an existing feature. labels Oct 9, 2020
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,385,801 0
android hermes armeabi-v7a 7,013,117 0
android hermes x86 7,828,013 0
android hermes x86_64 7,717,499 0
android jsc arm64-v8a 9,532,102 0
android jsc armeabi-v7a 9,147,130 -4,096
android jsc x86 9,396,778 0
android jsc x86_64 9,978,488 0

Base commit: 0d02c60

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 0d02c60

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sammy-SC has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @janicduplessis in 6685aba.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 12, 2020
@janicduplessis janicduplessis deleted the fail-build-err branch October 12, 2020 13:57
@anujraghuvanshi
Copy link

I've XCode 11.5.

I am trying to run react native project with version 0.64.1. Should it run? Or XCode 12 is min requirement now if want to run with the latest react native version? Not getting any clue from anywhere so asking this here. Kindly confirm.

facebook-github-bot pushed a commit that referenced this pull request Jun 10, 2022
Summary:
Reverts #29012

It is not really possible to properly validate if ENTRY_FILE exists since it is resolved by metro, and the server is not always running from the app root, like in a monorepo with multiple RN apps running on the same metro server.

In my case I run metro on the repo root and entry file will be something like `apps/app/index.js`. `-f "$ENTRY_FILE"` will fail since the script is run from the project folder (`PROJECT_ROOT`, in my case the `apps/app` folder, so it tries to resolve `apps/app/apps/app/index.js`).

I don't think this check is actually useful since metro will report the error if the entry file is invalid (fixed in #30150). The error is not as user friendly, but I think it is still fine. Maybe it could be improved in metro.

## Changelog

[iOS] [Fixed] - Don't validate ENTRY_FILE in react-native-xcode.sh

Pull Request resolved: #32762

Test Plan:
Before

<img width="854" alt="image" src="https://user-images.githubusercontent.com/2677334/146100834-39310c9f-1767-496a-8698-1026726a1120.png">

After if file is actually missing

<img width="987" alt="image" src="https://user-images.githubusercontent.com/2677334/146100893-d01e2247-c787-4174-ac60-2f308c338c8f.png">

After if file exists, builds successfully.

Reviewed By: cortinico

Differential Revision: D37066073

Pulled By: cipolleschi

fbshipit-source-id: 8f6b149099a39d9179996bb965daa6cd9e06feac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Platform: iOS iOS applications. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants