Skip to content

Version 4.0

Compare
Choose a tag to compare
@chrisballinger chrisballinger released this 04 Jun 16:15
· 48 commits to master since this release
4.0.0

What's New

  • XEP-0048: Bookmarks
  • XEP-0359: Stanza Ids
  • Improved Swift Support
  • Optional Swift-only features
  • Carthage support
  • Bug fixes
  • Full changelog: 3.7.0...4.0.0

To use the new Swift-only features, use the XMPPFramework/Swift podspec, or if using Carthage include XMPPFrameworkSwift.framework.

Migration from 3.7 to 4.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.

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 should be Obj-C compatible and marked with @objc.

  • Swift Support in XMPPFrameworkSwift.framework and XMPPFramework/Swift subspec

  • Modern Objective-C Syntax: Nullability annotations and generics.

  • Most of Core, Authentication, Categories, and Utilities have been audited. Additional help is needed for Extensions.

  • XMPPJID bareJID is now imported into Swift as bareJID instead of bare to prevent conflict with bare String. Also applies to domainJID.

  • XMPPPresence intShow has been renamed showValue and is now an XMPPPresenceShow enum instead of int. This will be a warning in 4.0 but will be removed in 4.1.

  • The XMPPMessage chatState string value is now imported into Swift as a native Swift String enum when using the Swift extensions. A new chatStateValue property is provided for accessing the raw String value in both Swift and Obj-C.

  • Readonly properties are used instead of getter methods where applicable. Getter naming overrides for properties have been removed to reflect Apple's approach.

  • 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.

    • XEP-0191 Blocking
    • XEP-0199 Ping
    • XEP-0202 Time
    • XEP-0136 Archiving
    • XEP-0115 Capabilities (CoreDataStorage unaudited)
    • XEP-0045 MUC (Storage unaudited)
    • XEP-0054 vCardTemp (CoreDataStorage unaudited)
    • XEP-0016 Privacy
    • XEP-0012 Last Activity
    • XEP-0009 RPC
    • Roster (Storage unaudited)
    • XMPPGoogleSharedStatus
    • FileTransfer
    • CoreDataStorage
    • BandwidthMonitor