7
votes

If I try to run my react-native app from XCode, xcode fails with the message:

-fobjc-weak is not supported on the current deployment target

If I run from a shell react-native run-ios, then I get also an error message:

** BUILD FAILED **

The following build commands failed: CompileC /Users/michel/Development/Androdev/Firebase/Sample/FlightLogIos/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/nanopb-dummy.o Target\ Support\ Files/nanopb/nanopb-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

However, the app still runs. It is annoying though as I think I will have at some point to do some Objective C code for my project. Does anybody know how to resolve this issue?

3

3 Answers

1
votes

I'm using Firebase in a regular, non-react-native Xcode project. I had the same error when building nanopb target. When I checked settings, deployment target for nanopb was set to 4.3. Just updating it to something more recent, like 9.0 fixed this error for me.

1
votes

i just ran into the same problem. i fixed it for me by increasing the ios deployment target of the nanopb target to iOS 8.0 (its 4.3 per default). Pods Project -> target: nanopb -> iOS Deployment Target: iOS 8.0

-1
votes

I had the same problem with my ionic app, and I did this steps:

  1. Close xcode
  2. Command line remove ios platform
  3. Command line add ios platform
  4. Open xcode and open PROJECT.xcworkspaces
  5. Xcode give me some recommendations in project and apply
  6. Clean and build and it's works

I hope this helps