Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage, referenced from: error
You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target. Normally Xcode does this for you, but sometimes it loses the plot and you need to add the .m file manually.
To do this:
TargetSettings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run
iOS: Undefined symbols for architecture i386
Make sure that each source file that needs to be linked is part of the Compile Sources section of your target. You can verify this by selecting your project in Navigator pane (as shown in your screenshot) and expanding the section shown here:
Xcode Compile Sources
You can also verify this by selecting the files and viewing their target membership in the Utilities pane in xcode.
Target Membership
Undefined symbols for architecture i386: _OBJC_CLASS_$_ZipException, referenced from: error
The error message says that the undefined symbol is referenced by ZipFile.o
, ZipReadStream.o
, and ZipWriteStream.o
. This implies that you're trying to use the Objective-Zip library in your app.
The undefined symbol is _OBJC_CLASS_$_ZipException
. The compiler generates this symbol when it sees the @implemention ZipException
directive in a source file.
The Objective-Zip library includes a file named ZipException.m
, which contains the @implementation ZipException
directive.
The most likely explanation is that you simply haven't included ZipException.m
in your target. Check that you have done so. If you don't know how, look at this answer.
Another possible explanation is that you have modified the ZipException.m
file, perhaps accidentally, in a way that removes the @implementation ZipException
directive or hides it from the compiler. Check that you have not modified the file, and that it contains the @implementation ZipException
directive.
Related Topics
How to Show "Done" Button on iOS Number Pad Keyboard
Uiwebview Open Links in Safari
How to Play Video With Avplayerviewcontroller (Avkit) in Swift
Handling Applicationdidbecomeactive - "How Can a View Controller Respond to the App Becoming Active"
What Is Silent Push Notification? When Does the Device Receive It
Uicolor Not Working With Rgba Values
How to Create a Custom iOS View Class and Instantiate Multiple Copies of It (In Ib)
How to Change the Title of the "Back" Button on a Navigation Bar
Appearancewhencontainedin in Swift
Xcode Command /Usr/Bin/Codesign Failed With Exit Code 1: Errsecinternalcomponent
Implicitly Unwrapped Optional Assign in Xcode 8
Impact of Xcode Build Options "Enable Bitcode" Yes/No
Setting the Datepicker in iOS to Pick Only the Month and Year