XMPP Grooming Notes: Importing and introducing the Xmppframework framework

Source: Internet
Author: User
Tags install cocoapods

A project that will develop XMPP, it is recommended to import the framework as soon as the project is created, which avoids unnecessary losses due to some of your own operations errors.

The most commonly used framework in XMPP is xmppframework.

Past Period Review:

XMPP Grooming Notes: Quick configuration of the environment (with installation package) http://www.cnblogs.com/dsxniubility/p/4304570.html

If you are not in the Dong Platinum Blog Park See this article please click to view the original

The first method is to drag directly1>Drag into folder

xmppframework folder on the network disk link: Http://pan.baidu.com/s/1jGxLa3G

You can also go directly to GitHub to search for downloads.

2> drag into Sample_xmppframework.h, rename to XMPPFramework.h

3> Adding frames

Cfnetwork.framework

Security.framework

Libxml2.dylib

Libresolv.dylib

Libin.a

4> Modifying Build Settings

Header Search Paths

Add "/USR/INCLUDE/LIBXML2"

Other Linker Flags

Add "-LXML2"

Library Search Paths

"$ (project_dir)/01-imitation qq/lib/xmpp/vendor/libidn"

Change to " $ (Project_dir)"and Change to " recursive"

5> modifying Xmpp/core/xmpp.h

Add "#import <UIKit/UIKit.h>" at the top of the file

The second method Cocoapods

is to use Cocoapods to import at once, and do not need the above configuration and adjustment. And later, when the framework is updated, a pod update is finished.

But there is a very serious problem . You will get an error when importing the frame pod install, a circular dependency is a cyclic dependency. This is a cocoapods version issue, the cocoapods0.35 version will cause a circular dependency on the Xmppframework framework, and the workaround is to reduce the cocoapods version to 0.34.4

The terminal operation instructions are as follows:

1. Uninstalling Cocoapods

$ sudo gem uninstall cocoapods

2. Installing Xcodeproj

$ sudo gem install xcodeproj

3. Install the cocoapods of the specified version 0.34.4

$ sudo gem install cocoapods-v 0.34.4

But this is very uncomfortable, because the next swift and so on programming all need to keep the cocoapods version of the latest 0.35 or even 0.36. So this version of the drop is very painful, both methods can be used. Depending on your preferences, you can use whichever you prefer. I chose the first one anyway.

Overview within the framework

Authentication Authorization, authentication

Categories classification

Core cores

Extensions extension

Utilities Tools

Vendor third-party libraries

  in the Extensions :

Coredatastorage CoreData Storage

Reconnect reconnect

Roster Friend Management

Have data table Xmpproster to manage users

Managing the user's class Xmppusercoredatastorageobject

Activity Monitoring for Systeminputactivitymonitor system inputs

Common Modules :

XEP-0009 RPC (Hacker-like technology)

XEP-0012 last activity (judging the line, leaving the disconnect)

XEP-0045 Multi-person Chat

XEP-0054 Business Card-Personal information settings

XEP-0065 SOCKETS5 Byte stream

XEP-0066 Binary data transfer (sending of special information)

XEP-0085 Chat Status Notification

XEP-0136 Chat Record Archive

There are data sheets xmppmessagearchiving

Class Xmppmessagearchiving_message_coredataobject to remove current information

XEP-0153 Business Card-based Avatar

XEP-0199 xmpp Ping (used to ping the server and ping itself)

XEP-0335 JSON Container (possibly later some information transfer will be in JSON format)

in the core :

Xmppelement is a base class that exhibits three sub-classes

Xmppiq Request (User login, user registration, add friends, etc.)

Xmppmessage messages (used to send various messages, etc.)

Xmpppresence Display (user online offline tips, etc.)

Xmppstream flow, very common, most of the load of classes are written in the lazy load of the stream

in the vender :

Kissxml The main parsing framework for XML

If you are not in the Dong Platinum Blog Park See this article please click to view the original

Next will be collated, user management module and information sending module, interested in Welcome to follow me

XMPP Grooming Notes: Importing and introducing the Xmppframework framework

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.