Undefined symbols for architecture i386

In this post I want to go over how to resolve problems with iOS build failures spitting out: “undefined symbols for architecture i386”

Personally I like to teach how to fish, rather then give you a single fish… so let’s look at what this error is saying.

“Undefined Symbols” generally means that items are not defined properly.  This most commonly occurs when a framework or library is not being included properly.

This error often occurs when you download a sample project from a website, developer or some other resource.  I have even seen this error after downloading sample code from Apple.  In essence a library got delinked and we need to re-link it.

If you look a little bit above the error you will probably see more detail on the architecture or library that is failing.  In this example we will use an error after loading the Apple “Reachability” library downloaded from their website.

Here is the error we see above the “undefined symbols for architecture i386”

SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file

So in this case we know that the SystemConfiguration framework is the one that is giving us problems.  Let’s add the SysteConfiguration framework into our project (or re-add if it got lost).

Click on the project name and then click on the Summary tab on the right.  Scroll down to the libararies and frameworks section.  Click on the + icon to add a new framework to the list.

systemConfigurationFramework

 

In the popup that then appears. Search for the systemConfiguration framework, select it and add it back into your project.

systemConfigurationFramework

 

Click on the add button to add it back to your project, then try running your project again.  Your error should now be resolved.

Note that this example was using an error where is cited the systemConfiguration framework.  Look at your error closely and find the name of the framework that you are missing as the name can vary.  These same steps should apply though to get a framework back into a project that is missing it.

Comments

comments

Posted in , and tagged , .