An XMPP Framework in Objective-C for Mac and iOS
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
An XMPP Framework in Objective-C for the Mac and iOS development community.
XMPPFramework provides a core implementation of RFC-3920 (the XMPP standard), along with the tools needed to read & write XML. It comes with multiple popular extensions (XEP's), all built atop a modular architecture, allowing you to plug-in any code needed for the job. Additionally the framework is massively parallel and thread-safe. Structured using GCD, this framework performs well regardless of whether it's being run on an old iPhone, or on a 12-core Mac Pro. (And it won't block the main thread... at all)
The minimum deployment target is iOS 8.0 / macOS 10.9 / tvOS 9.0.
There have been a number of changes to the public API of XMPPFramework in an attempt to improve the ergnomics and safety when used with Swift. Most Objective-C projects should require no changes, with a few minor exceptions. Many (simple) changes will be required for pure Swift projects, mostly due to the new nullability annotations. The process is still not complete so please submit issues and help if possible to minimize future breaking changes.
bareJIDis now imported into Swift as
bareto prevent conflict with
bareString. Also applies to
intShowhas been renamed
showValueand is now an
XMPPPresenceShowenum instead of
int. This will be a warning in 4.0 but will be removed in 4.1.
chatStatestring value is now imported into Swift as a native Swift String enum when using the Swift extensions. A new
chatStateValueproperty is provided for accessing the raw String value in both Swift and Obj-C.
The following modules still need an audit. If you use these modules please help out and contribute some time to audit them and submit a pull request, otherwise their API may contain breaking changes in future releases.
XMPPFramework is now accepting contributions written in Swift, with some limitations. Swift code must be isolated in the
Swift/folder, and none of the existing or future Obj-C code may depend upon it. All public APIs written in Swift must be Obj-C compatible and marked with
See the Contributing section below for more details.
The easiest way to install XMPPFramework is using CocoaPods.
To install only the Objective-C portion of the framework:
To use the new Swift additions:
use_frameworks! pod 'XMPPFramework/Swift'
pod installopen the
@import XMPPFramework; // Objective-C
import XMPPFramework // Swift
To integrate XMPPFramework into your Xcode project using Carthage, specify it in your
carthageto build the framework and drag the built
XMPPFramework.frameworkinto your Xcode project. If you'd like to include new features written in Swift, drag
XMPPFrameworkSwift.frameworkinto your project as well. You'll need to manually
import XMPPFrameworkSwiftin your headers.
Pull requests are welcome! If you are planning a larger feature, please open an issue first for community input. Please use modern Objective-C syntax, including nullability annotations and generics. Here's some tips to make the process go more smoothly:
XMPPFramework.xcodeproj, and ensure any applicable header files are set to public.
XMPPMockStreammakes testing pretty easy. Look at examples in
carthage checkoutin the root of the repository, and
bundle install && bundle exec pod installin the
Testing-Sharedfolder, and then add them to the iOS, macOS, and tvOS targets in
Swift/folder, and ensure none of the pure Obj-C code has dependencies on it. All public APIs must be Obj-C compatible and marked with
@objc. Remember to add your files to the
XMPPFrameworkSwift.frameworktarget. Ensure that all your unit tests pass for both the CocoaPods and Carthage integrations. For an example, look at
Testing-Swift/SwiftOnlyTest.swift, and the
Looking to help but don't know where to start?
If you find a security problem, please do not open a public issue on GitHub. Instead, email one of the maintainers directly:
For more info please take a look at the wiki.
Love the project? Wanna buy me a ☕️? (or a 🍺 😀):