IOS XMPP: Adding Xmppframework and other Frameworks (iii)

Source: Internet
Author: User

Xmppframework

Github:https://github.com/robbiehanson/xmppframework

Get Source code

git clone https://github.com/robbiehanson/XMPPFramework.git

Checkout xmppframework an up-to-date branch

Add dependency

> Copy <xmppframework>/vendor/cocoalumberjack to the project root directory, add Files ..., select the Cocoalumberjack folder

> Same steps, copy Cocoaasyncsocket and Kissxml and add to Project

Cocoaasyncsocket dependent on cfnetwork.framework and security.framework, Link Binary with phases, Build Libraries, TARGETS Add to

Kissxml uses LIBXML2 to parse XML, so

First, we need to add the Link Binary with Libraries, TARGETS---Build phases Libxml2.dylib

Then, TARGETS, build Settings, other Linker Flags, add-lxml2,targets, build Settings, Header Search Path S add/usr/include/libxml2

> Copy <xmppframework>/vendor/libidn to Project root, add static library files Libidn.a and header files Idn-int.h and Stringprep.h

Add Xmppframework

Copy the authentication Categories Core and Utilities from the source directory to the project root directory and add to the project

In addition, you need to add the dynamic Connection library libresolv.dylib, TARGETS, Build phases, Link Binary with Libraries add

Add extension

You can add <xmppframework>/extensions extensions to your project according to your needs.

Problems you may encounter:

> "XMPPFramework.h" File not found

XMPPFramework.h content as follows, can be based on the actual use of the module for pruning:

#import "XMPP.h"//List the modules you ' re using here. #import "XMPPReconnect.h" #import "XMPPRoster.h" #import " XMPPRosterCoreDataStorage.h "#import" XMPPvCardTempModule.h "#import" XMPPvCardAvatarModule.h "#import" XMPPvCardCoreDataStorage.h "#import" XMPPCapabilities.h "#import" XMPPCapabilitiesCoreDataStorage.h "#import" XMPPMUC.h "#import" XMPPRoomCoreDataStorage.h "

There are also some problems, due to the fact that there are no dependent libraries required to add extension

Can be added at TARGETS-Build phases-Link Binary with Libraries

Coredata.framework systemconfiguration.framework Corelocation.framework

Other possible error-causing settings are as follows:

ARC Warning

Xmppframework uses arc, you get a lot of arc warnings if your project doesn't use Arc,build.

Don't ignore these warnings, it will cause your program to crash due to memory leak ...

Convert to Objective-c ARC, refactor, Edit, eliminate these warnings!

IOS XMPP: Adding Xmppframework and other Frameworks (iii)

Related Article

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.