IOS,XMPP Local environment construction and framework use

Source: Internet
Author: User

1.XMPP MySQL and openfire environment configuration

2.XmppFramework Framework Import and introduction

The MySQL and openfire environment configuration for XMPP

1. Download mysql installation mysql download

Open the MySQL installation package as follows

The main packages of mysql-5.6.12-osx10.7-x86_64.pkg:mysql were installed successively; MySQL_StartupItem.pkg:MySQL's startup items; MySQL.prefPane:MySQL preferences, Primarily used to start the MySQL service. 2. Modify MySQL Password * Enter preferences to stop the MySQL service * The default installation of the MySQL account is the root password is empty in the terminal via the following command to log on to MySQL, (initial password for empty direct point return) mysql-u root-p Change Password: mysqladmin- U root password "123456"

3. Install MySQL graphical management tool mysql-workbench mysql-workbench Download Install * Create a new Database 4. Installing the Java Environment *openfire Server is written in the Java language. JDK download install and then terminal input java-version to see if the Java environment is already installed

5. Download and install OpenFire

OpenFire Download Install * Back to Mysql_workbench to configure the database to open the Finder, Command+shift+g has a red flag stating that there is no access, only need to right-click to display the introduction, the lock opened, set the line permissions are changed to read and write * MySQL Workbench, double-click "OpenFire", is selected, and then click on the menu bar "File", the script has just been imported to perform a click?? After the button is installed, re-open System Preferences, find OpenFire, click Open to jump to the browser, make OpenFire settings Choose Simplified Chinese under the 127.0.0.1, you should continue to the default user name and password to fill in the user name and password set in MySQL. Note When the configuration settings for the expenditure in the figure are complete, you will be asked to reset the OpenFire password, and then you can log in with the user name and password to install the above MySQL user name and password is the root 123456openfire username and password is admin 123456

Download test with client Sparkspark download can be used openfire new user name and password login, you can also register on the client Note: Mac system OpenFire very unstable, only to do practice use

Xmppframework Framework Import and introduction

1. Online Download xmppframework Framework Import


2. Add frame Dependency 3. Modify Build Settingsheader Search Paths Add/usr/include/libxml2 Library search Paths add $ (project_dir /douniwanxia/libs/xmppframework/vendor/libidn above $ (project_dir) is the entire project path; Douniwanxia/libs is the path I've delegated xmppframework in the project

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

Common objects in XMPP

    • XMPPSTREAM:XMPP Basic Service class

    • Xmpproster: Friends List class

    • Xmpprostercoredatastorage: Buddy list (user account) Action class in core data

    • Xmppvcardcoredatastorage: A friend's business card (nickname, signature, gender, age, etc.) action class in core data

    • Xmppvcardtemp: Friend business Card entity class, it is taken from the database

    • Xmppvcardavatarmodule: Friends Avatar

    • Xmppreconnect: If the connection is lost, auto-reconnect

    • Xmpproom: Provide multi-user chat support

    • Xmpppubsub: Publish Subscription

IOS,XMPP Local environment construction and framework use

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.