Undefined symbols for architecture i386 "_OBJC_CLASS_$_Appirater"
Solution 1
I think, that you only added files to project, but not to target.
Click on Appirater.m
file in Project Navigator
and set checkbox near to your target name in Target membership
of File Inspector
.
Solution 2
It seems that you haven't properly added the Appirater code to your project. Both Appirater.h
and Appirater.m
must be part of your project, and Appirater.m
must be compiled like all your other files.
Solution 3
You'll also get this error if you've neglected to add the CFNetwork and SystemConfiguration frameworks to your project.
Solution 4
I just had the same problem, and fixed it.
The cause of my issue is I had dragged and dropped a file from other project to the current.
Of course it is working when we remove and recreate the file.
Comments
-
CristiC almost 2 years
After adding Appirater to my iOS project, when I compile, I get the error:
Undefined symbols for architecture i386: "_OBJC_CLASS_$_Appirater", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
After searching and searching on the internet, none of the solutions found helped.
Both my project and target are setup as:
What should I try more?
-
CristiC over 12 yearsThat was the problem. Thanks Tomasz.
-
CristiC over 12 yearsThe Appirater.m file was not added to the target. This was the problem.
-
Ben Coffman almost 12 yearsJust in case anyone doesn't know what/where file inspector is, in xcode 4 and 3 (if I remember correctly) You can go to view -> Utilities -> Show File Inspector. It should scroll in from the right.
-
Oblivious Sage over 11 yearsYou can also right/command click on the file in the Project Inspector and select "Show File Inspector", fourth option down, right above "New File".
-
rob mayoff over 11 yearsSee this answer for an animated GIF demonstrating this.
-
Salman about 11 yearsI have added the Appirator.m file to the target, but im still getting the exact same error - not sure why and still trying to find a solution.
-
Tomasz Wojtkowiak over 10 years@Nick your comment is so helpful, full of knowledge, almost the voice of reason.
-
Craig over 9 yearsHelp me. It was
StoreKit
, the other required framework, causing the problem for me. -
Martin Mlostek over 8 yearsand what should i do if i dont have the "Target membership" area in the "File Inspector" for the files inside the folder, i have that area just for the folder, but its checked and same error (XCode 7.2)