react-native run-ios FAILED

Created on 7 Mar 2018  路  12Comments  路  Source: facebook/react-native

(Describe your issue in detail.)

Environment

Environment:
OS: OS X El Capitan 10.11.6
Node: 8.1.2
Yarn: Not Found
npm: 4.6.1
Watchman: 4.9.1
Xcode: Xcode 8.2.1 Build version 8C1002
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0

Expected Behavior

Build Success

Actual Behavior

* BUILD FAILED *

The following build commands failed:
CompileC /Users/NKY/Code/Learn/RN/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTFont.o Views/RCTFont.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

Steps to Reproduce

  1. react-native init AwesomeProject
  2. cd AwesomeProject
  3. react-native run-ios

Build With XCode

/Users/NKY/Code/Learn/RN/AwesomeProject/node_modules/react-native/React/Views/RCTFont.mm:110:39: Unknown type name 'UIFontWeight'; did you mean 'RCTFontWeight'?

iOS Locked

Most helpful comment

RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11

All 12 comments

same issue.

Env:
OS X El Capitan 10.11.6
Xcode 8.2.1 (8C1002)

RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11

Does this mean that RN 0.54 cannot be used for iOS targets < 11?
According to stats, iOS < 11 is used by approx 26% users.

Same issue. I need to support all the way down to iOS 8

+1 to @cat-cat. You can use the iOS 11 SDK and still target runtimes all the way back to iOS 8. Please update to Xcode 9 and ensure you are building your app with the latest SDK, or roll back to a React Native version that was released prior to iOS 11's general availability.

This means if you're on El Capitan, you'll have to update to High Sierra and install Xcode 9 to use RN 0.54, but you do not have to change the minimum iOS version for your app.

you'll have to update to High Sierra

@msolomon Sierra is fine - Xcode 9 runs fine there also.

Alternatively, which react-native version I need to go back to if I do not wish to upgrade?

@zxiest I got the same error using RN latest version. Changed it to 0.48.4 and the BUILD SUCCEEDED.

I believe anything < 0.54 should work, since I was on 0.53.

@msolomon unfortunately, if still using Xcode 8 (iOS 10.3) as the OP mentioned above, it's still FAILED. RN 0.53.3.

image

RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11

This cannot be the issue. I did not help me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TrakBit picture TrakBit  路  3Comments

oney picture oney  路  3Comments

despairblue picture despairblue  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

josev55 picture josev55  路  3Comments