1. Xcode version
2. XMPP version: https://github.com/robbiehanson/XMPPFramework
Start Importing frames: (It's best to create a folder in the show in Finder, then copy the contents of the XMPP frame to the newly created folder and drag the folders into the project)
First step: Import the vendor inside the first thing
1, first import vendor (here is the third party libraries that XMPP relies on) the Cocoalumberjack inside the folder. You do not need to add another library file to compile successfully.
2. Re-import Cocoaasyncsocket (the library used for network communication at XMPP bottom), there are two library files to add: (involving data encryption, and security-related). Compilation succeeded
3, Import kissxml (used to parse XML file, Focus!) )。 You need to import libxml2.dylib, and then modify the project configuration.
(a) project-buildsetting-searching sear--search Paths-header search paths--path after adding/USR/INCLUDE/LIBXML2
(b) Original location search Other,linking--OTHER linker flags, add-LXML2
(c) If the compilation is unsuccessful, the tree file not find appears, in targets-search sear-search paths Add a sentence of $ (sdkroot)/USR/INCLUDE/LIBXML2, the compilation succeeded
4, add libidn, do not need to add the library in Xcode, compile successfully.
5, add Facebook (hair with no, not add), do not need the addition of Xcode library, compile successfully.
Second step: Import the basic framework: Authentication (Authorization), Categories (classification), core (XMPP core package), Utilities (XMPP internal use). Add Libresolv.dylib in Xcode, compile successfully
Step three: Import Extensions extension Library (chat room, file transfer), and import Sample_xmppframework.h, (renamed to XMPPFramework.h), compile failed!!!
To add a PCH file at this point:
To modify the PCH path:
In the PCH file, add:
#ifdef __objc__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
At this point, the compilation is successful!!
New XMPP Project Import framework under Xcode6