ZeroMQ Swift Bindings for iOS, macOS, tvOS and watchOS

Overview

SwiftyZeroMQ - ZeroMQ Swift Bindings for iOS, macOS, tvOS and watchOS

CI Status Swift ZeroMQ Platform Carthage CocoaPods License

This library provides easy-to-use iOS, macOS, tvOS and watchOS Swift bindings for the ZeroMQ C++ library. It is written in Swift 3 and features a bundled stable libzmq library. It provides ZeroMQ's low-level API along with an object-oriented API.

What is ZeroMQ?

ZeroMQ (also spelled ØMQ, 0MQ or ZMQ) is a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker. The library's API is designed to resemble that of Berkeley sockets.

Requirements

  • iOS 9+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1 and Swift 3.0
  • Bitcode-enabled Xcode project for non-MacOS

Usage

Please consult the Documentation Manual for more information. Older examples can also be found in the examples github repository.

Version

import SwiftyZeroMQ

// Print ZeroMQ library and our framework version
let (major, minor, patch, versionString) = SwiftyZeroMQ.version
print("ZeroMQ library version is \(major).\(minor) with patch level .\(patch)")
print("ZeroMQ library version is \(versionString)")
print("SwiftyZeroMQ version is \(SwiftyZeroMQ.frameworkVersion)")

Request-reply Pattern

import SwiftyZeroMQ

do {
    // Define a TCP endpoint along with the text that we are going to send/recv
    let endpoint     = "tcp://127.0.0.1:5555"
    let textToBeSent = "Hello world"

    // Request socket
    let context      = try SwiftyZeroMQ.Context()
    let requestor    = try context.socket(.request)
    try requestor.connect(endpoint)

    // Reply socket
    let replier      = try context.socket(.reply)
    try replier.bind(endpoint)

    // Send it without waiting and check the reply on other socket
    try requestor.send(string: textToBeSent, options: .dontWait)
    let reply = try replier.recv()
    if reply == textToBeSent {
        print("Match")
    } else {
        print("Mismatch")
    }

} catch {
    print(error)
}

Publish-Subscribe Pattern

private let endpoint = "tcp://127.0.0.1:5550"

let context      = try SwiftyZeroMQ.Context()
let publisher    = try context.socket(.publish)
let subscriber1  = try context.socket(.subscribe)
let subscriber2  = try context.socket(.subscribe)
let subscriber3  = try context.socket(.subscribe)

try publisher.bind(endpoint)
let subscribers = [
    subscriber1: "Subscriber #1",
    subscriber2: "Subscriber #2",
    subscriber3: "Subscriber #3",
]
try subscriber1.connect(endpoint)
try subscriber2.connect(endpoint)
try subscriber3.connect(endpoint)

// Brief wait to let everything hook up
usleep(1000)

// Subscriber #1 and #2 should receive anything
try subscriber2.setSubscribe(nil)

// Subscriber #3 should receive only messages starting with "topic"
try subscriber3.setSubscribe("topic")

// Brief wait to let everything hook up
usleep(250)

let poller = SwiftyZeroMQ.Poller()
try poller.register(socket: subscriber1, flags: .pollIn)
try poller.register(socket: subscriber2, flags: .pollIn)
try poller.register(socket: subscriber3, flags: .pollIn)

func pollAndRecv() throws {
    let socks = try poller.poll(timeout: 1000)
    for subscriber in socks.keys {
        let name = subscribers[subscriber]
        if socks[subscriber] == SwiftyZeroMQ.PollFlags.pollIn {
            let text = try subscriber.recv(options: .dontWait)
            print("\(name): received '\(text)'")
        } else {
            print("\(name): Nothing")
        }
    }
    print("---")
}

// Send a message - expect only sub2 to receive
try publisher.send(string: "message")

// Wait a bit to let the message come through
usleep(100)

try pollAndRecv();

// Send a message - sub2 and sub3 should receive
try publisher.send(string: "topic: test")

// Wait a bit to let the message come through
usleep(100)

try pollAndRecv();

Poller

import SwiftyZeroMQ

do {
    // Define a TCP endpoint along with the text that we are going to send/recv
    let endpoint     = "tcp://127.0.0.1:5555"

    // Request socket
    let context      = try SwiftyZeroMQ.Context()
    let requestor    = try context.socket(.request)
    try requestor.connect(endpoint)

    // Reply socket
    let replier      = try context.socket(.reply)
    try replier.bind(endpoint)

    // Create a Poller and add both requestor and replier
    let poller       = SwiftyZeroMQ.Poller()
    try poller.register(socket: requestor, flags: [.pollIn, .pollOut])
    try poller.register(socket: replier, flags: [.pollIn, .pollOut])

    try requestor.send(string: "Hello replier!")

    // wait to let request come through
    sleep(1)

    var updates = try poller.poll()
    if updates[replier] == SwiftyZeroMQ.PollFlags.pollIn {
        print("Replier has data to be received.")
    }
    else {
        print("Expected replier to be in pollIn state.")
        return
    }

    try _ = replier.recv()

    updates = try poller.poll()
    if updates[replier] == SwiftyZeroMQ.PollFlags.none {
        print("All data has been received")
    }
    else {
        print("Expected replier to be in none state.")
        return
    }
} catch {
    print(error)
}

Planned Features (aka TODO)

  • More official ZeroMQ examples written
  • More ZeroMQ API wrapped

See Also

Author & License

Copyright (c) 2016-2017 Ahmad M. Zawawi under the MIT license.

A prebuilt iOS, macOS, tvOS and watchOS universal libzmq library is bundled with this library under the LGPL license.

Comments
  • Crash when creating a .subscriber socket

    Crash when creating a .subscriber socket

    I am following the pub-sub example listed, modified slightly because I didn't need the publisher (running the unedited example gives me the same error), and I can't get past the creation of a subscriber without crashing. the code looks like the following:

    public var endpoint = "tcp://127.0.0.1:5550"
    
    public func subscribe(topic: String, callback: @escaping (_ name: String,_ recieved: String) -> Void) {
        do {
            let context = try SwiftyZeroMQ.Context()
            let subscriber = try context.socket(.subscribe)
            
            let subscribers = [
                subscriber: "Subscriber #1"
            ]
            
            try subscriber.setSubscribe(topic)
    
            // Brief wait to let everything hook up
            usleep(250)
            
            let poller = SwiftyZeroMQ.Poller()
            try poller.register(socket: subscriber, flags: .pollIn)
            
            func pollAndRecv() throws {
                let socks = try poller.poll(timeout: 1000)
                for subscriber in socks.keys {
                    let name = subscribers[subscriber]
                    if socks[subscriber] == SwiftyZeroMQ.PollFlags.pollIn {
                        let text = try subscriber.recv(options: .dontWait)
                        callback("\(name)", "\(text)")
                        print("\(name): received '\(text)'")
                    } else {
                        print("\(name): Nothing")
                    }
                }
                print("---")
            }
            
            try pollAndRecv();
            
        } catch {
            print(error)
        }
    }
    

    The stack looks like this: screen shot 2017-01-18 at 4 22 53 pm

    I don't get any error messages in the console, execution simply stops on "dyld`dyld_fatal_error: -> 0x120009088 <+0>: brk #0x3"

    and the last thing called in code was this

    public init(context: Context, type : SocketType) throws {
        // Create socket
        let p : UnsafeMutableRawPointer? = zmq_socket(context.handle,
            type.rawValue)
        guard p != nil else {
            throw ZeroMQError.last
        }
    
        // Now we can assign socket handle safely
        handle = p!
        cleanupNeeded = true
    }
    

    with the debugger failing on this line: let p : UnsafeMutableRawPointer? = zmq_socket(context.handle, type.rawValue)

    Any ideas or pointers would be much appreciated! Thanks for all the great work

    bug 
    opened by erparker 13
  • Memory Leak

    Memory Leak

    I have a long running background process and I am running socket.recv() on a loop. The memory use is building up indefinitely and I get the attached memory leak report. From zeromq docs, they recommend calling zmq_msg_close after zmq_recv. Any ideas?

    screen shot 2017-01-11 at 3 29 21 pm

    bug question 
    opened by muvic08 13
  • Wrap Socket options

    Wrap Socket options

    It looks like pub/sub doesn't work at the moment without first calling zmq_setsockopt on the subscriber. This is because the default for .subscribe sockets is to ignore all messages. We should start looking at wrapping zmq_setsockopt to get around this.

    Providing a generic function as we have in the Context is not going to be so simple because, depending on the option name, different data types can be passed. I would suggest we either provide a method for each option name, or a method for each data type - the former seems neater but requires more boilerplate.

    enhancement help wanted 
    opened by jcockayne 11
  • Is the Subscribe implementation ready?

    Is the Subscribe implementation ready?

    Hi @azawawi I just started using the latest from master so that I could try out a subscribe use case. It's great being able to pass through the extra socket options. I'm just wondering if it's too early, or should I expect it to work as it is? Happy to help out! James

    question 
    opened by jamessugrue 8
  • Crash on iOS9

    Crash on iOS9

    Hello and thank you for this library !

    I'm trying to implement zeroMQ with this lib but something seem to not work with iOS9 on my iPod touch.

    do {
                // Define a TCP endpoint along with the text that we are going to send/recv
                let endpoint     = "tcp://<my_ip>"
                let textToBeSent = "{\"type\":\"connect\",\"apiToken\":\"<token>\"}"
                
                // Request socket
                let context      = try SwiftyZeroMQ.Context()
                let requestor    = try context.socket(.request) // THIS LINE CRASH
                try requestor.connect(endpoint)
                
                // Send it without waiting and check the reply on other socket
                try requestor.send(string: textToBeSent, options: .dontWait)
                let reply = try requestor.recv()
                print(reply)
            } catch {
                print(error)
            }
    

    With this code, all work on iOS10 (with real device and simulator) and on iOS9 on simulator. But on my real device on iOS9 (iPod Touch 9.3.5) I have crash at this line : let requestor = try context.socket(.request) // THIS LINE CRASH

    There is any issue with iOS9 ? I don't have any other real device for trying it ...

    Thank you

    opened by floriangbh 6
  • multipart send/recv

    multipart send/recv

    Hiya! Just a couple methods I found useful—I need to work with multipart messages, which seems like it'd be a good addition to the Swifty library.

    Let me know if this is useful to you too—no obligation to merge it! :)

    Have a nice day, Tim

    opened by tjvr 5
  • Fix issues with poller

    Fix issues with poller

    Hey, Thanks for merging the last stuff! As you pointed out there were a couple of issues with redundant tests / test failures as well as the fact that I hadn't added the pbxproj to the commit - this is all included in this pull request. Hope it looks okay. Jon

    opened by jcockayne 5
  • Curve security support. Added/fixed some tests

    Curve security support. Added/fixed some tests

    Added the ability to add curve security to a socket. Some tests were not passing - fixed. Added some new tests with different ZeroMQ patterns. Please shout if you think anything needs more work!

    opened by tbibby 3
  • Messages not sent

    Messages not sent

    I'm having trouble sending messages. Using publish configuration and sending strings, sometimes they are sent, and sometimes nothing is send. Went they are not sent the memory usage of the app starts increasing until it is completely full and the app crashes.

    Apparently this behaviour is random, can't really find out what makes it work sometimes but most of the time is not working. Any suggestion?

    opened by vicegax 1
  • Pub/Sub issue when running on iOS hardware.

    Pub/Sub issue when running on iOS hardware.

    I've been trying out a new application on using an ipad as a wired zeromq messaging server, and I've been having some issues getting it to work properly when running on the actual hardware. It works completely fine in the simulator.

    • iOS hardware: has both a pub and a sub. Both the pub and the sub are bound.
    • Python client 1: has both a pub and a sub that connect to the iOS hardware.
    • Python client 2: same situation, running exact the same code.
    • Both clients share the same subscription.

    If client 1 connects first, everything works fine. When client 2 connects, the iOS hardware never sends a message to client 2 after the initial behind the scenes connection messages. However, it sends the message to client 1 since they share the same subscription.

    Using wireshark, I was able to confirm that client 2 never received the messages. Using it further, I was able to get the iOS hardware recognized as a network interface and run tcpdump to examine what's happening on the iOS hardware side of things.

    The iOS hardware is never sending to client 2. Even if connection order happens in reverse and client 1 connects second, the exact same symptoms happen to client 1. It just won't send a message.

    Looking at your code, it appears that sending a message is just wrapped into a data format and sent down to the attached zeromq binary. I'm wondering if how the binary is handling these sockets for the hardware architecture/software environment isn't correct to how pub/sub should work. It's either that, or iOS/hardware is limiting me from sending to the second client entirely.

    In order to make sure I was setting up the architecture correctly, I set up the exact same situation using pyzmq. Pyzmq seems to work perfectly fine.

    I was wondering if you had any insight into this.

    bug question 
    opened by bedford10 1
  • ZMQ_UNSUBSCRIBE

    ZMQ_UNSUBSCRIBE

    I added a function to Socket.swift to remove a subscription filter (and I am curious why ZMQ_SUBSCRIBE is implemented but not ZMQ_UNSUBSCRIBE):

           public func unSubscribe(_ value: String?) throws {
               try self.setStringOption(ZMQ_UNSUBSCRIBE, value)
           }
    

    I also modified setStringOption function because I was having memory issues:

    Original setStringOption function

            /**
              Interface to set an option which takes a Swift String.
             */
            private func setStringOption(_ name: Int32, _ value: String?) throws {
                let optValLen = (value != nil)
                    ? value!.characters.count
                    : 0
                let optval = (value != nil)
                    ? UnsafeRawPointer(value!)
                    : UnsafeRawPointer([UInt8]())
    
                try self.setOption(name, optval, optValLen)
            }
    

    Modified setStringOption function

            /**
              Interface to set an option which takes a Swift String.
             */
            private func setStringOption(_ name: Int32, _ value: String?) throws {            
                if let optval = value {
                    let bufferPointer: UnsafePointer<UInt8> = optval.data(using: .utf8, allowLossyConversion: false)!.withUnsafeBytes({$0})
                    try setOption(name, UnsafeRawPointer(bufferPointer), optval.characters.count)
                }else{
                    try setOption(name, UnsafeRawPointer([UInt8]()), 0)
                }
            }
    
    

    But, though rarely, I sometimes get the following crash:

    #3. Crashed: xxxxx.queue
    
    0  SwiftyZeroMQ                   0x1106b31c1 zmq::trie_t::rm(unsigned char*, unsigned long) + 333
    1  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    2  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    3  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    4  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    5  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    6  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    7  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    8  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    9  SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    10 SwiftyZeroMQ                   0x1106b3104 zmq::trie_t::rm(unsigned char*, unsigned long) + 144
    11 SwiftyZeroMQ                   0x1106ba802 zmq::xsub_t::xsend(zmq::msg_t*) + 104
    12 SwiftyZeroMQ                   0x1106add3b zmq::sub_t::xsetsockopt(int, void const*, unsigned long) + 163
    13 SwiftyZeroMQ                   0x1106a1df2 zmq::socket_base_t::setsockopt(int, void const*, unsigned long) + 116
    14 SwiftyZeroMQ                   0x110678436 _TFCV12SwiftyZeroMQ12SwiftyZeroMQ6SocketP33_3F544464429ADF695CBBDED00A72C2259setOptionfzTVs5Int32SVSi_T_ + 70
    15 SwiftyZeroMQ                   0x110677db0 _TFCV12SwiftyZeroMQ12SwiftyZeroMQ6SocketP33_3F544464429ADF695CBBDED00A72C22515setStringOptionfzTVs5Int32GSqSS__T_ + 736
    16 SwiftyZeroMQ                   0x110676ce0 _TFCV12SwiftyZeroMQ12SwiftyZeroMQ6Socket11unSubscribefzGSqSS_T_ + 160
    

    Any ideas why it crashes on ZMQ_UNSUBSCRIBE?

    bug 
    opened by muvic08 1
  • I need ios platform support for flutter package dartzmq, Can you please guide me how to build xcframework for libraries

    I need ios platform support for flutter package dartzmq, Can you please guide me how to build xcframework for libraries

    https://pub.dev/packages/dartzmq/install Reference library, when I run Screen Shot 2022-10-03 at 10 30 06 AM I am runiinf into this wehn build xcframe from binary, I have no experience with xcode , can you please help to proceed further,

    opened by wajahat414 3
  • socketMap is not cleaned on unregister

    socketMap is not cleaned on unregister

    When unregistering from poller the socketMap dict is not updated. When registering again the poller somtimes get out of index. Suggested solution, clear dict entry in poller:

            public func unregister(socket: Socket) throws {
                let socketIndex = socketMap[socket]!
                sockets.remove(at: socketIndex)
                socketMap[socket] = nil
    
                // Update indices of all other sockets in the socket map
                for (socket, _) in sockets.suffix(from: socketIndex) {
                    let socketIndex = socketMap[socket]!
                    socketMap[socket] = socketIndex - 1
                }
            }
    

    Edit: formatting

    opened by agising 0
  • Publish socket does not recognize new subscribers after first message is published

    Publish socket does not recognize new subscribers after first message is published

    The issue is further described at stack overflow, here: [https://stackoverflow.com/questions/66063569/swiftyzeromq-publisher-does-not-recognise-subscriber-after-first-message-is-publ]

    If anyone could prove me wrong or point me in a direction to a solution I'd be very grateful!

    EDIT: New subscribers are picked up every time i rebind the publisher socket: pubSocket.bind(endPoint). (-> Throwing an error that the address is already in use, but there seems to be no harm). I also figured that it all works as intended when I run the code on the xcode iPhone simulator. Wonder if could be the different architectures or somehow connected to Apples Multicast Networking Entitlement.

    opened by agising 0
  • tutorial for building as command line tool [question]

    tutorial for building as command line tool [question]

    Hi, I'm trying to build a command line tool on mac using this library, but since command line tools do not have the "Embedded Binaries" section, building the file lead to the error:

    dyld: Library not loaded: @rpath/libswiftAppKit.dylib
      Referenced from: ~/Library/Developer/Xcode/DerivedData/zmq_cli-fqonwoqaewoenhdmsspynhszpsrt/Build/Products/Debug/SwiftyZeroMQ.framework/Versions/A/SwiftyZeroMQ
      Reason: image not found
    

    I've also tried, to no avail, the advice from here and here and here. Is there a way to incorporate this library into a command line only tool? Thanks!

    opened by daviehh 0
  • socket.recv can not receive data correctly

    socket.recv can not receive data correctly

    If i use c++ publisher send a char[] data to ios subscriber and receive data with recv(), it can not receive data correct.

    My data is char[0] = -1. And i suppose it relate to "String.Encoding.utf8" in the recv() method

    opened by ZhongLingXiao 0
Releases(1.0.25)
  • 1.0.25(Feb 12, 2017)

  • 1.0.24(Jan 18, 2017)

    • Add initial socket options with tests (PR #9). Contributed by Jonathan Cockayne.
    • Fix memory leak in Socket.recv.
    • Cleanup poll items on scope exit
    • Change endpoint ports for each test to prevent side effects.
    • Update for XCode 8.2.1
    Source code(tar.gz)
    Source code(zip)
  • 1.0.23(Jan 18, 2017)

    • Upgrade to ZeroMQ 4.2.1 stable (up from 4.2.0).
    • Upgrade projects to Xcode 8.1.
    • Move example projects into Examples folder.
    • Update copyright to 2017 (Happy new year).
    Source code(tar.gz)
    Source code(zip)
  • 1.0.22(Jan 18, 2017)

    • Upgrade to ZeroMQ 4.2.0 stable (up from 4.1.6).
    • Add context.setBlocky and context.setMaxMessageSize (new in 4.2)
    • Various documentation updates to manual and SocketType.
    • Prevent automatic deinitializer context and socket cleanup if already closed.
    • Provide context.close() as an alias for terminate for consistency.
    • Reorganize Xcode project structure and move libzmq platform-specific files to its own Libraries folder (was in Sources).
    • Fix example project build issues (namely watchOS)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.21(Nov 14, 2016)

  • 1.0.20(Nov 13, 2016)

    • .frameworkVersion now returns the version string (previously a optional string).
    • Add an initial implementation of SwiftyZeroMQ.Poller with tests (Pull request #1) by Jonathan Cockayne. This is based on the pyzmq implementation.
    • Context and Socket now conform to the Hashable protocol.
    • Fix issue #3 : Build universal libzmq.a for macOS, tvOS and watchOS.
    • Fix issue #4 : Add Poller documentation and examples by Jonathan Cockayne.
    • Various documentation updates.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.19(Nov 3, 2016)

    • Upgrade to stable ZeroMQ 4.1.6 (up from 4.1.5).
    • Example projects has now the same version.
    • Add macOS, tvOS and watchOS support.
    • Run tests on macOS, tvOS.
    • Add example projects for all supported platforms.
    • Various documentation updates including adding steps to use pod try SwiftyZeroMQ.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.18(Oct 30, 2016)

  • 1.0.17(Oct 27, 2016)

    • Refactor project structure to conform with SwiftPM
    • Add an example of request-reply pattern
    • Test request-reply pattern
    • Various Xcode project fixes
    • Various documentation fixes
    Source code(tar.gz)
    Source code(zip)
  • 1.0.16(Oct 27, 2016)

    • A better user guide documentation with a table of contents.
    • Minimum support iOS version is now 9+ (up from 8).
    • Add quick help inline comment documentation.
    • Prevent wrong usage of virtual namespace struct (i.e. SwiftyZeroMQ).
    • Various documentation fixes.
    • Fix Travis CI random failures.
    • Fix ruby script to check for MacOS.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.15(Oct 26, 2016)

    • Breaking changes:
      • Add .frameworkVersion and refactor .versionString into .version.
      • Rename SwiftyZeroMQError to ZeroMQError and scope it under SwiftyZeroMQ.
    • Drop iOS 8.1 testing since the simulator is buggy using the terminal.
    • Switch to a ruby-based test script (instead of bash).
    • Add initial release of user guide.
    • Add change log to conform with CocoaPods quality requirements.
    • Various Documentation updates.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.14(Oct 24, 2016)

  • 1.0.13(Oct 23, 2016)

    • Enable Bitcode in libzmq.a and Xcode project.
    • More documentation updates.
    • Add a bash shell script to run Xcode tests using the terminal via an xcpretty filter.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.12(Oct 23, 2016)

  • 1.0.11(Oct 23, 2016)

  • 1.0.10(Oct 20, 2016)

  • 1.0.9(Oct 20, 2016)

  • 1.0.8(Oct 20, 2016)

  • 1.0.7(Oct 26, 2016)

  • 1.0.6(Oct 20, 2016)

  • 1.0.5(Oct 23, 2016)

  • 1.0.4(Oct 23, 2016)

  • 1.0.3(Oct 23, 2016)

  • 1.0.2(Oct 23, 2016)

  • 1.0.1(Oct 23, 2016)

  • 1.0.0(Oct 23, 2016)

Owner
Ahmad M. Zawawi
A humble developer with a passion to write code. Mainly Java (Android), JavaScript and recently Swift (iOS). Writes Perl for fun :+1:
Ahmad M. Zawawi
A delightful networking framework for iOS, macOS, watchOS, and tvOS.

AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the Foundation URL Loading System, extending t

AFNetworking 33.3k Jan 5, 2023
A networking library for iOS, macOS, watchOS and tvOS

Thunder Request Thunder Request is a Framework used to simplify making http and https web requests. Installation Setting up your app to use ThunderBas

3 SIDED CUBE 16 Nov 19, 2022
Demo project to try WebRTC native bindings in .net MAUI

MAUI.WebRTC.Demo Demo project to try WebRTC native bindings in .net MAUI. There are two projects with Xamarin bindings https://github.com/melihercan/W

null 4 Dec 5, 2022
Lightweight Networking and Parsing framework made for iOS, Mac, WatchOS and tvOS.

NetworkKit A lightweight iOS, Mac and Watch OS framework that makes networking and parsing super simple. Uses the open-sourced JSONHelper with functio

Alex Telek 30 Nov 19, 2022
QwikHttp is a robust, yet lightweight and simple to use HTTP networking library for iOS, tvOS and watchOS

QwikHttp is a robust, yet lightweight and simple to use HTTP networking library. It allows you to customize every aspect of your http requests within a single line of code, using a Builder style syntax to keep your code super clean.

Logan Sease 2 Mar 20, 2022
SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)

SwiftSoup is a pure Swift library, cross-platform (macOS, iOS, tvOS, watchOS and Linux!), for working with real-world HTML. It provides a very conveni

Nabil Chatbi 3.7k Dec 28, 2022
Bonjour networking for discovery and connection between iOS, macOS and tvOS devices.

Merhaba Bonjour networking for discovery and connection between iOS, macOS and tvOS devices. Features Creating Service Start & Stop Service Stop Brows

Abdullah Selek 67 Dec 5, 2022
Lightweight REST library for iOS and watchOS. Available on cococapods

RMHttp RMHttp is a Lightweight REST library for iOS and watchOS. Features Chainable Request URL / JSON Parameter Encoding HTTP Methods GET/POST/DELETE

Roger Molas 7 Nov 19, 2022
A peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework

This repository is a peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework (which is iOS only) that lets you connect any 2 devices from any platform. This framework works with peer to peer networks like bluetooth and ad hoc wifi networks when available it also falls back onto using a wifi router when necessary. It is built on top of CFNetwork and NSNetService. It uses the newest Swift 2's features like error handling and protocol extensions.

Manav Gabhawala 93 Aug 2, 2022
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Kitura 1.3k Dec 26, 2022
OAuth2 framework for macOS and iOS, written in Swift.

OAuth2 OAuth2 frameworks for macOS, iOS and tvOS written in Swift 5.0. ⤵️ Installation ?? Usage ?? Sample macOS app (with data loader examples) ?? Tec

Pascal Pfiffner 1.1k Jan 8, 2023
MQTT for iOS and macOS written with Swift

CocoaMQTT MQTT v3.1.1 client library for iOS/macOS/tvOS written with Swift 5 Build Build with Xcode 11.1 / Swift 5.1 Installation CocoaPods Install us

EMQ X MQTT Broker 1.4k Jan 1, 2023
Official ProtonVPN iOS and macOS app

ProtonVPN for iOS and macOS Copyright (c) 2021 Proton Technologies AG Dependencies This app uses CocoaPods for most dependencies. Everything is inside

ProtonVPN 121 Dec 20, 2022
Kiwix for offline access on iOS and macOS

Kiwix for iOS & macOS This is the home for Kiwix apps on iOS and macOS. Mobile app for iPads & iPhones Download the iOS mobile app on iTunes App Store

Kiwix 299 Dec 21, 2022
Passepartout is a non-official, user-friendly OpenVPN® client for iOS and macOS.

Passepartout Passepartout is a non-official, user-friendly OpenVPN® client for iOS and macOS. Overview All profiles in one place Passepartout lets you

Passepartout 523 Dec 27, 2022
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines.

Why Zewo? • Support • Community • Contributing Zewo Zewo is a lightweight library for web applications in Swift. What sets Zewo apart? Zewo is not a w

Zewo 1.9k Dec 22, 2022
Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux

Embassy Super lightweight async HTTP server in pure Swift. Please read: Embedded web server for iOS UI testing. See also: Our lightweight web framewor

Envoy 540 Dec 15, 2022
A tool to build projects on MacOS and a remote linux server with one command

DualBuild DualBuild is a command line tool for building projects on MacOS and a remote Linux server. ##Setup Install the repository git clone https://

Operator Foundation 0 Dec 26, 2021
The civilized way to write REST API clients for iOS / macOS

The elegant way to write iOS / macOS REST clients Drastically simplifies app code by providing a client-side cache of observable models for RESTful re

Bust Out 2.2k Nov 20, 2022