Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How solve 'Undefined symbols for architecture armv7' in React Native iOS?

I get a problem to build release react native ios, I try to look for many examples, but fail all.

This is the error message :

Undefined symbols for architecture armv7:
  "_RCTDefaultLogFunction", referenced from:
      -[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
  "_RCTSharedApplication", referenced from:
      -[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
  "_RCTSetLogFunction", referenced from:
      -[momsindonesiaTests testRendersWelcomeScreen] in momsindonesiaTests.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I don't know how to solve this error again, please help me to solve this problem.

Thanks.

like image 868
Frank Andrew Avatar asked Nov 06 '22 10:11

Frank Andrew


1 Answers

I had the same issue with Xcode 10.1 and react native 0.61.5. To fix try this.

  1. Go to project navigator in Xcode
  2. Click on the project and go to Build Settings
  3. Select 'yourappname'Tests and under Build active Architecture Only select 'Yes' under Release. By default it is set to 'No'.
  4. Try to rebuild and it should build this time round.

Hope this solution works for you as well.

like image 173
Faddablack Avatar answered Nov 14 '22 21:11

Faddablack