React-native: Xcode builds have over 450 warnings

Created on 8 Jun 2018  路  11Comments  路  Source: facebook/react-native

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 10.0.0
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.4 Build version 9F1027a
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.0-alpha.2 => 16.3.0-alpha.2
react-native: ^0.55.3 => 0.55.3

Description

When building iOS app from react native project we get 451 compile warnings, all of which appear to be in the React Native objective C code.

Steps to Reproduce

Build a react native project in XCode.

Expected Behavior

There will be zero warnings. Warnings are a sign of poor coding practices, and even though many are just unused parameters, they can obscure very important warnings. Our own native code has warnings obscured by this long list of unfixed coding errors. And it makes finding compile errors in our code more difficult and tedious.

Actual Behavior

A mass of unfinished technical debt spewed across hundreds of lines of my build output.

iOS Stale

Most helpful comment

Good to know that there is work done to reduce the amount of warnings!

I've made this package to silence some (if not all) of these warnings: https://github.com/mattijsf/react-native-inhibit-warnings

Disclaimer: It's a actually terrible idea to use it!

All 11 comments

Here's a PR that was opened recently to address these warnings in Xcode: https://github.com/facebook/react-native/pull/19574

Looking for more PRs to help in this regards, let us know if you want to take a stab at this!

It's a reasonable request. I'll see if I can find time to contribute and let you know.

This has been a nightmare to deal with. I've tried so many things and spent an incredible amount of time trying to push a new release to the app store, with no success. I'm looking for any solution to get this release pushed.

As far as I am aware, these are standard Xcode warnings that show up with each Xcode release, e.g. they're recommendations for how your Xcode project settings should be updated. It only affects the base template used when you create a new project, and you should be able to deal with the same way you would with any regular Xcode project.

@mannyhagman are you talking about errors (exclamation point inside a red octagon/stop sign)?

Warnings such as the one below shouldn't be causing the build to fail:
image

@randyhill as a workaround, you can use the search box to filter the issues for your own project and exclude the React warnings like this:

image

We just released a new version, 0.56.0-rc, that should take care of a good number of these. Can you take a look?

Good to know that there is work done to reduce the amount of warnings!

I've made this package to silence some (if not all) of these warnings: https://github.com/mattijsf/react-native-inhibit-warnings

Disclaimer: It's a actually terrible idea to use it!

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Tracking all remaining warnings in https://github.com/facebook/react-native/issues/22609

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TrakBit picture TrakBit  路  3Comments

DreySkee picture DreySkee  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

jlongster picture jlongster  路  3Comments

phongyewtong picture phongyewtong  路  3Comments