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

Fix Xcode 11 build #25146

Closed
wants to merge 1 commit into from
Closed

Conversation

ericlewis
Copy link
Contributor

@ericlewis ericlewis commented Jun 4, 2019

Summary

Fixes build in Xcode 11 beta, the signature for __unused was changed. This adds a new check for the new style.

Changelog

[iOS] [Fixed] - Xcode 11 beta build

Test Plan

Build & run RNTester

@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 Jun 4, 2019
@react-native-bot react-native-bot added Bug Platform: iOS iOS applications. labels Jun 4, 2019
@ericlewis ericlewis marked this pull request as ready for review June 4, 2019 16:12
@ericlewis ericlewis requested a review from shergin as a code owner June 4, 2019 16:12
@ericlewis
Copy link
Contributor Author

Failing tests seem unrelated.

@ericlewis ericlewis requested a review from zhongwuzw June 4, 2019 16:49
@ericlewis
Copy link
Contributor Author

props to @zhongwuzw for the debug assist!

Copy link
Contributor

@eliperkins eliperkins left a comment

Choose a reason for hiding this comment

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

Nice one! 🍏

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

🆒

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.

@cpojer is landing 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 @ericlewis in 46c7ada.

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 Jun 4, 2019
@zhongwuzw
Copy link
Contributor

@ericlewis 💯 NSArray related crash is also resolved?

@RenderCoder
Copy link

Thank you!

@ericlewis
Copy link
Contributor Author

@zhongwuzw yeah! The crash was happening because I left some bad debug code behind 😜

kelset pushed a commit that referenced this pull request Jun 5, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: #25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7

# Conflicts:
#	React/Base/RCTModuleMethod.mm
kelset pushed a commit that referenced this pull request Jun 7, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: #25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
@toddrimes
Copy link

Hello - how can I install the pre-release package that has this fix?

I'm trying

react-native init RN060 --version react-native@next

but it just keeps installing v0.57.1

Thank you,
~Todd

@ericlewis
Copy link
Contributor Author

ericlewis commented Jun 17, 2019 via email

dyy1993 pushed a commit to dyy1993/react-native that referenced this pull request Aug 28, 2019
Sroka pushed a commit to Sroka/react-native that referenced this pull request Sep 4, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
Sroka pushed a commit to Sroka/react-native that referenced this pull request Sep 4, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
douglowder pushed a commit to react-native-tvos/react-native-tvos that referenced this pull request Sep 11, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook/react-native#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7

# Conflicts:
#	React/Base/RCTModuleMethod.mm
@russelRajitha
Copy link

same as @luisfusim I am too having this issue ... I am on 0.57.0 and don't want to upgrade the RN version ... So what steps I should take to resolve this ...
Xcode version = 11.0

in your project directory, open file in myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. Then correct as below: here

working perfectly. you saved my day.

@ancyrweb
Copy link

ancyrweb commented Oct 1, 2019

@tuanduc2904 that will only work until you clean your node_modules. Other ideas ?

You can use patch-package to perform the update every time you install packages / update them.

@tuanduc2904
Copy link

@tuanduc2904 that will only work until you clean your node_modules. Other ideas ?

You can use patch-package to perform the update every time you install packages / update them.

I can't, do you have a solution?

@ancyrweb
Copy link

ancyrweb commented Oct 1, 2019

Well, I just tried, looks like the diff is too heavy for github.

@tuanduc2904
Copy link

I had to revise it many times when adding new packages to my project

@eyupcimen
Copy link

same as @luisfusim I am too having this issue ... I am on 0.57.0 and don't want to upgrade the RN version ... So what steps I should take to resolve this ...
Xcode version = 11.0

in your project directory, open file in myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. Then correct as below: here

This working. Thank you

poltak added a commit to WorldBrain/Memex-Mobile that referenced this pull request Oct 7, 2019
- react native 0.59.9 introduces a fix for a bug stopping builds with xcode 11: facebook/react-native#25146
- also the recent name update needed a change to a file in the ios/ dir
- finding and fixing these issues was a *major pain*
@GleidsonDaniel
Copy link

Tks @tuanduc2904 , saved my time!

RN version 0.59.10, worked like a charm!

lukaszfran pushed a commit to DiceTechnology/react-native that referenced this pull request Oct 21, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
Commit:
46c7ada [46c7ada]
Author:
Eric Lewis <ericlewis777@gmail.com>
Date:
4 June 2019 at 20:54:59 BST
Commit Date:
4 June 2019 at 20:59:34 BST
ksti added a commit to sinooceanland/react-native that referenced this pull request Oct 22, 2019
xvonabur pushed a commit to xvonabur/react-native that referenced this pull request Oct 22, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
ethul pushed a commit to ethul/react-native that referenced this pull request Oct 24, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
(cherry picked from commit 46c7ada)
@29er
Copy link

29er commented Oct 24, 2019

why is this closed? I still get the error.
do I really have to go modify RCTModuleMethod every time I install ????

Unknown argument type 'attribute' in method -[EXAppState getCurrentAppState:error:]. Extend RCTConvert to support this type.

"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",

@Rambatino
Copy link

Just upgrade react-native package @29er

@29er
Copy link

29er commented Oct 24, 2019

ok thanks @Rambatino ! . I will try 35.0

jdanbrown added a commit to jdanbrown/birdgram that referenced this pull request Oct 28, 2019
- Required to backport #24155 (previous commit)
- facebook/react-native#25146
- Occurred during upgrade: xcode 10 -> 11
- Safe to XXX after react-native 0.59.10 (currently 0.57.2)
@kailash1805a
Copy link

AdamChrist pushed a commit to AdamChrist/react-native that referenced this pull request Nov 7, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
lnikkila pushed a commit to Boulevard/react-native that referenced this pull request Nov 7, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
aleclarson pushed a commit to alloc/react-native-macos that referenced this pull request Dec 8, 2019
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook/react-native#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
liulianci added a commit to liulianci/ernnavigation-api-impl-native that referenced this pull request Dec 10, 2019
react native 0.59 has a red screen issue for xcode11, regenate the container for react native 0.60: facebook/react-native#25146
aeternas pushed a commit to aeternas/react-native that referenced this pull request Jan 2, 2020
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
jdanbrown added a commit to jdanbrown/birdgram that referenced this pull request Jan 4, 2020
- Required to backport #24155 (previous commit)
- facebook/react-native#25146
- Occurred during upgrade: xcode 10 -> 11
- Safe to XXX after react-native 0.59.10 (currently 0.57.2)
@lucky-vishwakarma
Copy link

I also have same issue but these solution does not work for me. I am using
xcode 11.3
React native 57.8

M-i-k-e-l pushed a commit to M-i-k-e-l/react-native that referenced this pull request Mar 10, 2020
Summary:
Fixes build in Xcode 11 beta, the signature for `__unused` was changed. This adds a new check for the new style.

## Changelog

[iOS] [Fixed] - Xcode 11 beta build
Pull Request resolved: facebook#25146

Differential Revision: D15628404

Pulled By: cpojer

fbshipit-source-id: 781a188a0e1562a3316fbe62920b12b03a44e4a7
@jayasme
Copy link

jayasme commented Apr 9, 2020

  1. Upgrade to RN 0.59.9 or above in your package.json
  2. rm -rf node_modules/
  3. yarn
  4. pod install
  5. Clean in Xcode
  6. yarn start --reset-cache
  7. Build in Xcode

@@ -91,6 +91,7 @@ static BOOL RCTParseSelectorPart(const char **input, NSMutableString *selector)
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__attribute__((unused))") ||
RCTReadString(input, "__attribute__((__unused__))") ||

Choose a reason for hiding this comment

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

Works!

Choose a reason for hiding this comment

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

Hi, may I know which file this is please? Thanks very much!

Copy link

@aasif1297 aasif1297 left a comment

Choose a reason for hiding this comment

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

not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet