Xcode error while trying to build a React Native project on a simulator or device

I had some problems with permissions in the source directory of my native applications, and I decided to save 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 reactive native project seems to have been successfully created, since I was able to build and test the base application in the simulator. Then I re-imported my backup .js files and linked the specific library that I use in xcode. When I try to build a project from xcode now, to my iphone, I get 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 also looked around and found out some links that mentioned that I might miss the .m file, but it seems a little strange to me since I created this project from scratch, but could it be that everything could change when I imported are my .js files?

I was also told to update in order to respond to native 0.26 - an update has occurred, but the problem still exists.

This application worked before, so I can’t find where this problem came from.

Any help would be greatly appreciated.

Thanks!

+8
ios xcode react-native
source share
3 answers

I fixed this using Clear Project from Product> Clear (or Shift+CMD+K )

+6
source share

In the end, I ended up re-initiating the entire application from scratch and put the .js files from the backup I had. Everyone seems to be working well now.

0
source share

I was stuck with the same problem after the update in order to respond to 0.27.1.

After I cleaned the ./ios/build folder, the problem was resolved.

0
source share

All Articles