IOS_32_XMPPFramework import, ios import framework

Source: Internet
Author: User

IOS_32_XMPPFramework import, ios import framework

XMPP frame address: http://xmpp.org/xmpp-software/libraries/
• Https://github.com/robbiehanson/XMPPFramework •


Expected functions:

• User Login, registration • Adding friends to each other Roster • chat between friends • CoreText • chat status XEP-0085 (online, left, please do not disturb) • chat room group chat XEP-0045 • Sending File XEP-0096 • voice chat XEP-0065 (Local recording, sending audio, playing)



Directory after XMPPMaster Decompression

 
 

Create a new blank XCode project and check Git on my mac


Create a new Lib folder directly in the XCode Project

1. import dependency framework-CocoaLumberjack: Log framework-CocoaAsyncSocket: underlying network framework • Add CFNetwork & Security Framework dependency-KissXML: XML parsing framework • libxml2.dylib framework dependency needs to be added • The following compilation options must be specified:

OTHER_LDFLAGS =-lxml2

HEADER_SEARCH_PATHS =/usr/include/libxml2

-Import the folder libidn
• Import the following four folders to the project-Authentication-Categories-Core-Utilities • you also need to add libresolv. dylib Dependencies
• Import the XMPP extension framework folder-Extensions
• Add Sample_XMPPFramework.h to the project and rename it as XMPPFramework. h • enter:

Git commit-m "add XMPP framework"

• All added files can be submitted at one time

• XEP-0045: multi-user chat • XEP-0060: publish-subscribe • XEP-0065: SOCKS5 byte stream • XEP-0085: chat status notification • XEP-0096: File Transfer • XEP-0172: user nickname • CoreDataStorage: data storage • Reconnect: Reconnect • Roster: Roster all XMPP extensions • http://xmpp.org/xmpp-protocols/xmpp-extensions/



XMPPStream: Is the most interactive class in the development process. All extensions and custom code must be based on this class.


• XMPPJID: provides an immutable JID implementation that complies with the NSCopying and NSCoding protocols.
• XMPPElement: base class (parent class) of the following three XMPP elements • XMPPIQ: Request (adding a friend is a request) • XMPPMessage: Message (sending a message) • XMPPPresence: attendance (launch and login)

• XMPPParser: used for XMPPStream parsing • XMPPLogging: XMPP log framework
• XMPPModule: used to develop XMPP extensions • XMPPInternal: core and advanced underlying content used within the entire XMPP framework




1. Configure connection to XMPP Server 2. Add proxy 3. Add Module 4. Start connection 5. Start authorization
• Note:-the XMPP framework only provides a minimum proxy delegation system for receiving three XMPP subtypes (IQ, Message, and Presence). To implement more functions, developers also need to write a lot of relevant code-to simplify development, XMPPStream is usually placed in AppDelegate for global access
Main extended functions:
• XMPPReconnect: automatically reconnects the XMPP stream if an unexpected interruption occurs. • XMPPRoster: Standard XMPP roster • XMPPRoom: multi-user Chat support (chat room) • XMPPPubSub: Public Subscription supported • etc

• The XMPP real-time messaging system includes three communication categories:-message transmission, where data is transmitted between parties-online status, allows users to broadcast their online status and availability-Information/query requests. It allows XMPP entities to initiate requests and receive responses from another entity.
• The preceding three types of XMPP sections have the following common attributes:-from: JID-to of the source XMPP object: JID-id of the Target receiver: the Optional identifier of the current conversation-type: optional child type of the section-xml: lang: if the content is readable, It is the description of the message language.







Import CFNetwork. framework and Security. framework
Importing KissXML (quite troublesome)

Add the header file path of libxml2. Otherwise, KissXML cannot work.

So far, Vendor (vendors and sellers) has been imported
Then, import the four basic frameworks of XMPP to the project (except Extensions)
Extensions that are temporarily unavailable
Finally, we need to import libresolv. dylib
The final result is not an extension.
Git submits a single file

Better practice: switch to the project path in the command line and submit all (new or modified files) git commit-m "remarks on this operation at a time"
After all the files are submitted, the (add) on the right of the XCode file will disappear.































Framework to be added for importing the SBJSON class library

1. append the compilation parameter in XCode:-When all_load is used, SBJson is referenced as a static library. The following libraries must be associated:
Mobilecoreservices. framework
Cfnetwork. framework
Libz. dylib
Systemconfiguration. framework
(Note: If you have tried but failed, you can try to clean the project)

2. SBJSon parsing types include:
NSDictionary
NSArray
NSString
NSNumber
NSNull

If it is another type, such as NSDate, You need to convert it to NSString for processing; NSDictionary, NSArray collection class's base item types are NSString, NSNumber, NSNull

How can I set the spring framework imported to a project in myeclipse without the spring framework option?

Because you have already added the spring framework to this project. Create a web project test and add the spring 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.