New XMPP Project Import framework under Xcode6

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.