9

I've had some issues with permissions on the original react native app directory and decided to store my .js files in a separate folder as a backup and recreate the project in the same directory from scratch, hoping to solve the problem.

The new react native project seems to have been created successfully as I was able to build and test in the simulator the basic app. I then re-imported my backed up .js files and linked a particular library i'm using in xcode as well. When I try to build the project from xcode now, to my iphone, I receive the error below:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_RCTEventEmitter", referenced from:
  _OBJC_CLASS_$_RCTKeyboardObserver in libReact.a(RCTKeyboardObserver.o)
"_OBJC_METACLASS_$_RCTEventEmitter", referenced from:
  _OBJC_METACLASS_$_RCTKeyboardObserver in libReact.a(RCTKeyboardObserver.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I looked around as well and found out some references mentioning that I might be missing a .m file but that seems a bit strange to me as I created this project from scratch, but could it be that things might have changed when I imported my .js files?

I was also told to upgrade to react native 0.26 - the upgrade happened but the issue is still there.

This app used to work before so I can't really find from where the issue is coming from.

Any help will be greatly appreciated.

Thanks!

3 Answers 3

6

I did fix this by Cleaning the Project from "Product > Clean" (or Shift+CMD+K)

Sign up to request clarification or add additional context in comments.

1 Comment

2 upvotes on the answer and 0 upvotes on the question. Never understand that.
0

I eventually ended up re-initiating the whole application from scratch and placed the .js files from the backup I had. Seems to all be working fine now.

Comments

0

I was stuck with the same problem after upgrading to react-native 0.27.1.

After I've cleared my ./ios/build folder, the problem was solved.

1 Comment

Thanks for sharing!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.