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 build fails to run in with Xcode 11.0 beta #25138

Closed
Tracked by #25181
vivekhumnabad opened this issue Jun 4, 2019 · 24 comments
Closed
Tracked by #25181

iOS build fails to run in with Xcode 11.0 beta #25138

vivekhumnabad opened this issue Jun 4, 2019 · 24 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.

Comments

@vivekhumnabad
Copy link

vivekhumnabad commented Jun 4, 2019

React Native version:

Steps To Reproduce

1.Create a new react-native project with react-native init ""
2.open iOS project and run

Describe what you expected to happen:
Build and run successfully and show launch screen with default UI

What is happening:
Build shows Error Screen saying -
"Unknown argument type 'attribute' in method -[RCTAppState getCurrentappState:error:].
Extend RCTConvert to support this type

Snack, code example, or link to a repository:
Happens with all my existing projects and newly created samples as well.Here is the sample code I have tried.
FinalTry.zip

Please refer to below screenshot for error data
Simulator Screen Shot - iPhone Xʀ - 2019-06-04 at 12 30 26

NOTE:
Happens only in newly launched MacOS and Xcode 11 beta

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Jun 4, 2019
@zhongwuzw
Copy link
Contributor

OMG, seems Xcode 11 beta breaks method signature parsing. Now I have no chance to install Xcode beta. @vivekhumnabad Would you mind paste the method selector string for us? just add the NSLog like below.

image

@ericlewis
Copy link
Contributor

fixed by #25146

@vivekhumnabad
Copy link
Author

@ericlewis Any idea when this will be released???

@ericlewis
Copy link
Contributor

@vivekhumnabad needs to be accepted and merged, which shouldn't take long, and after maybe @grabbou wouldn't mind pulling it in to the 0.60 RC, since it is a pretty minor change? :D

@ericlewis
Copy link
Contributor

@vivekhumnabad its been merged, this will land hopefully in 0.60 or 0.61!

@ollyde
Copy link

ollyde commented Jul 25, 2019

Would it be possible to get a fix in version precceding 0.60? Say 59?
(0.60 completely breaks a lot of third party packages that are no longer supported)

@betko
Copy link

betko commented Jul 29, 2019

@OllyDixon This fix is already part of the 59.9 react-native.

@MuhammadUsman786786
Copy link

I am still facing this issue on

react natvie :0.59.3

@nschild
Copy link

nschild commented Sep 3, 2019

@MuhammadUsman786786
According to Betko's post, it is included in 0.59.9, you are using 0.59.3. You will need to upgrade to see the fix.

mrlambchop pushed a commit to RobotLaws/react-native that referenced this issue Sep 16, 2019
@Desintegrator
Copy link

Does it affect on users upgraded to ios13 with apps that is currently in store?

@nschild
Copy link

nschild commented Sep 20, 2019

@Desintegrator Users who are on iOS13 can download and run React Native 0.59.<9 apps from the play store, as long as they are built with Xcode 10. The issue is when building apps with Xcode 11 (which is required to run locally on iOS 13 devices).

@NguyenVanVietPoLy
Copy link

OMG, dường như Xcode 11 beta phá vỡ phân tích chữ ký phương thức. Bây giờ tôi không có cơ hội để cài đặt Xcode beta. @vivekhumnabad Bạn có phiền dán chuỗi chọn phương thức cho chúng tôi không? chỉ cần thêm NSLognhư dưới đây.

Hình ảnh, tưởng tượng

not work for me

@NguyenVanVietPoLy
Copy link

fixed by #25146

https://github.com/facebook/react-native/pull/25146/files that work in my case, react-native 0.59.8

@pqminh
Copy link

pqminh commented Sep 21, 2019

react-native 0.52.3

fix xcode 11 beta

code ./node_modules/react-native/React/Base/RCTModuleMethod.mm
Replace
return RCTReadString(input, "__unused") ||
RCTReadString(input, "attribute((unused))");
To
return RCTReadString(input, "attribute((unused))") ||
RCTReadString(input, "attribute((unused))") ||
RCTReadString(input, "__unused");

@CaopanHuster
Copy link

fixed by #25146

https://github.com/facebook/react-native/pull/25146/files that work in my case, react-native 0.59.8

it works for me. do reinstall the app after replace

@Desintegrator
Copy link

@Desintegrator Users who are on iOS13 can download and run React Native 0.59.<9 apps from the play store, as long as they are built with Xcode 10. The issue is when building apps with Xcode 11 (which is required to run locally on iOS 13 devices).

What about app from the store that is currently run React Native 0.55.0?

@vijay-dadhich09
Copy link

Thanks, @CaopanHuster for confirming about 0.59.8. Is this change available on RN 0.59.8? I can't upgrade my RN version further 0.59.8.

lhong375 pushed a commit to ubiquity6/react-native that referenced this issue Sep 23, 2019
… bug in RN0.5x.x.

or we will run into "Unknown argument type '__attribute__' in method" when start our app.
see this post for the bug:facebook#25138
this pr for the fix: https://github.com/facebook/react-native/pull/25146/files
@umkhan65
Copy link

@NguyenVanVietPoLy "RCTReadString(input, "attribute((unused))")" adding this worked for me on 0.57.4

@marcmoo
Copy link

marcmoo commented Sep 24, 2019

react native 0.59.9 solved this problem.
but if you want to keep 0.59.0~0.59.8
find the file here: node_modules/react-native/React/base/RCTModuleMethod.mm
at line 93 add:
static BOOL RCTParseUnused(const char **input) { return RCTReadString(input, "__unused") || RCTReadString(input, "__attribute__((__unused__))") || //solve by add this line RCTReadString(input, "__attribute__((unused))"); }

@matwming
Copy link

matwming commented Nov 6, 2019

This issue still exists in xcode 11.1 and rn 0.59.9. Do I have to update to 0.6**?Thanks.

@brunolemos
Copy link
Contributor

Yes, upgrade to the latest version of react-native.

@JTangming
Copy link

fixed by https://github.com/facebook/react-native/pull/25146/files#diff-263fc157dfce55895cdc16495b55d190

it works for me.
but if you want to keep a stable version
update here: node_modules/react-native/React/base/RCTModuleMethod.m
then patch-package,patch-package lets app authors instantly make and keep fixes to npm dependencies.

@vnrtumu
Copy link

vnrtumu commented Mar 13, 2020

if ([@(input) hasPrefix:@"getCurrentAppState"]){
NSLog(@"@", @(input))
}

@alizafardev
Copy link

react native 0.59.9 solved this problem.
but if you want to keep 0.59.0~0.59.8
find the file here: node_modules/react-native/React/base/RCTModuleMethod.mm
at line 93 add:
static BOOL RCTParseUnused(const char **input) { return RCTReadString(input, "__unused") || RCTReadString(input, "__attribute__((__unused__))") || //solve by add this line RCTReadString(input, "__attribute__((unused))"); }

Worked for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests