bartonhammond/snowflake

ld: symbol(s) not found for architecture arm64

Closed this issue · 1 comments

Hi, bartonhammond. Cloning default repository and switching Build Configuration from Debug to Build gives next error if I try to run app on real device iPhone 5s.

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/Developer/Library/Frameworks'
Undefined symbols for architecture arm64:
  "_RCTSetLogFunction", referenced from:
      -[snowflakeTests testRendersWelcomeScreen] in snowflakeTests.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

On emulator this code works fine.

I've found solving for this issue!

In my case solution was in disabling Dead Code Stripping in Release mode. Because the problem is affected only for a test part of source code - I think it won't be dangerous for production ready application.

Go to PROJECT > TARGETS > "APP_NAME" > Build Settings > Linking > Dead Code Stripping, expand the Dead Code Stripping setting and change Release to NO.