XCode Error: Undefined Symbol: _OBJC_CLASS_$_ – Code Example

Total
0
Shares

XCode throws the error: Undefined Symbol: _OBJC_CLASS_$_xyz, where xyz is the name of the class, when your project is not able to find the framework or library. It happens if either the library is not installed or you forgot to include it in the project.

Solution

1. Open your project .xcodeproj file

2. A window will open. Click on your project name in the left section.

3. In the middle window you will see a number of tabs. Select Build Phases tab.

4. In this tab, you will get a section with title Link Binaries with Libraries. There might be a list of few libraries in it. At bottom of this section, you can see two buttons, + and -. Click on the + button.

5. This will open frameworks and libraries chooser where you can search for the library in which you are getting the error.

6. Click Add button.

This way the library will be linked with your project and you will no longer get error: Undefined Symbol: _OBJC_CLASS_$_.