{"id":15050819,"url":"https://github.com/ably/ably-cocoa","last_synced_at":"2026-03-17T23:22:50.435Z","repository":{"id":23993947,"uuid":"27377471","full_name":"ably/ably-cocoa","owner":"ably","description":"iOS, tvOS and macOS Objective-C and Swift client library SDK for Ably realtime messaging service","archived":false,"fork":false,"pushed_at":"2026-01-13T15:04:53.000Z","size":19758,"stargazers_count":52,"open_issues_count":196,"forks_count":31,"subscribers_count":26,"default_branch":"main","last_synced_at":"2026-01-14T10:22:38.274Z","etag":null,"topics":["client-library","ios","macos","objective-c","realtime","realtime-messaging","rest","sdk","streaming","swift","websockets"],"latest_commit_sha":null,"homepage":"https://ably.com/download","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ably.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2014-12-01T12:00:37.000Z","updated_at":"2026-01-13T14:48:59.000Z","dependencies_parsed_at":"2023-12-10T20:25:12.321Z","dependency_job_id":"48832372-89ac-41d6-a802-0708d04d74f9","html_url":"https://github.com/ably/ably-cocoa","commit_stats":{"total_commits":3518,"total_committers":28,"mean_commits":"125.64285714285714","dds":0.7458783399658897,"last_synced_commit":"6d187a535b5a35995cd4968c3d8ff8ed47d803bb"},"previous_names":["ably/ably-ios"],"tags_count":128,"template":false,"template_full_name":null,"purl":"pkg:github/ably/ably-cocoa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-cocoa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-cocoa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-cocoa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-cocoa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ably","download_url":"https://codeload.github.com/ably/ably-cocoa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-cocoa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-library","ios","macos","objective-c","realtime","realtime-messaging","rest","sdk","streaming","swift","websockets"],"created_at":"2024-09-24T21:29:26.995Z","updated_at":"2026-01-21T18:03:35.244Z","avatar_url":"https://github.com/ably.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Ably Pub/Sub Cocoa Header](images/CocoaSDK-github.png)\n[![Latest Version](https://img.shields.io/github/v/release/ably/ably-cocoa)](https://swiftpackageindex.com/ably/ably-cocoa)\n[![License](https://badgen.net/github/license/ably/ably-cocoa)](https://github.com/ably/ably-cocoa/blob/main/LICENSE)\n\n# Ably Pub/Sub Cocoa SDK\n\nBuild any realtime experience using Ably's Pub/Sub Cocoa SDK. Supported on all popular platforms and frameworks, including Swift and Objective-C.\n\nAbly Pub/Sub provides flexible APIs that deliver features such as pub-sub messaging, message history, presence, and push notifications. Utilizing Ably's realtime messaging platform, applications benefit from its highly performant, reliable, and scalable infrastructure.\n\nFind out more:\n\n* [Ably Pub/Sub docs.](https://ably.com/docs/basics)\n* [Ably Pub/Sub examples.](https://ably.com/examples?product=pubsub)\n\n---\n\n## Getting started\n\nEverything you need to get started with Ably:\n\n* [Getting started in Pub/Sub using Swift.](https://ably.com/docs/getting-started/swift?lang=swift)\n* [SDK Setup for Swift.](https://ably.com/docs/getting-started/setup?lang=swift)\n\n---\n\n## Supported platforms\n\nAbly aims to support a wide range of platforms. If you experience any compatibility issues, open an issue in the repository or contact [Ably support](https://ably.com/support).\n\nThe following platforms are supported:\n\n| Platform | Support |\n|----------|---------|\n| iOS| \u003e= 10 |\n| macOS| \u003e= 10.12 |\n| tvOS | \u003e= 10 |\n\n\u003e [!IMPORTANT]\n\u003e Ably Cocoa SDK versions below 1.2.23 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025.\n\n---\n\n## Installation\n\nYou can install Ably for iOS and macOS through [Swift package manager](#swift-package-manager), [CocoaPods](#cocoapods), [Carthage](#carthage) or [install manually](#manual-install).\n\n### Swift Package Manager\n\nThe Ably Pub/Sub SDK includes installation support for [Swift Package Manager](https://swift.org/package-manager/).\n\n\u003cdetails\u003e\n\u003csummary\u003eSwift Package Manager installation details.\u003c/summary\u003e\n\nTo install the `ably-cocoa` package in your Xcode project: \n\n* Paste `https://github.com/ably/ably-cocoa` in the *Swift Packages* search box. ( *Xcode project*  \u0026rarr;  *Swift Packages..* . \u0026rarr; `+` button)\n* Select the `Ably` SDK for your target.\n\nTo install the `ably-cocoa` package in another Swift package, add the following to your `Package.Swift`:\n\n```swift\n .package(url: \"https://github.com/ably/ably-cocoa\", from: \"1.2.57\"),\n```\n\nSee Apple's [adding package dependencies to your app](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) guide for more detail.\n\u003c/details\u003e\n\n### CocoaPods\n\nThe Ably Pub/Sub SDK includes installation support for [CocoaPods](https://cocoapods.org/).\n\n\u003cdetails\u003e\n\u003csummary\u003eCocoaPods installation details.\u003c/summary\u003e\n\nIf you intend to use Swift, using `use_frameworks!` in your Podfile is recommended (this will create a Framework that can be used in Swift natively).\n\nAdd this line to your application's Podfile:\n\n```ruby\n# For Xcode 7.3 and newer\npod 'Ably', '\u003e= 1.2'\n```\n\nAnd then install the dependency:\n\n```bash\n$ pod install\n```\n\n\u003c/details\u003e\n\n\n\n### Carthage\n\nThe Ably Pub/Sub SDK includes installation support for [Carthage](https://github.com/Carthage/Carthage/).\n\n\u003cdetails\u003e\n\u003csummary\u003eCarthage installation details.\u003c/summary\u003e\n\nAdd the following line to your application's Cartfile:\n\n```ruby\n# For Xcode 7.3 and newer\ngithub \"ably/ably-cocoa\" \u003e= 1.2\n```\n\nAnd then run one of the following commands required for your platform:\n\n| Platform | Command |\n|----------|---------|\n| iOS | `carthage update --use-xcframeworks --platform iOS --no-use-binaries` |\n| macOS | `carthage update --use-xcframeworks --platform macOS --no-use-binaries`|\n| tvOS | `carthage update --use-xcframeworks --platform tvOS --no-use-binaries` |\n\nAfter building the framework (located in `[PROJECT_ROOT]/Carthage/Build`), drag the following files into the **Frameworks**, **Libraries**, and **Embedded content** section of your Xcode target's **General** tab:\n\n* `Ably.xcframework`\n* `AblyDeltaCodec.xcframework`\n* `msgpack.xcframework`\n* For applications, select **Embed \u0026 Sign**\n* For other targets, select **Do Not Embed**\n\nIf you encounter an error similar to the following, you've likely missed adding one or more required dependencies:\n\n```\ndyld: Library not loaded: @rpath/AblyDeltaCodec.framework/AblyDeltaCodec\n```\n\nFor further information review the Carthage [adding frameworks to an application](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) guide.\n\n\u003c/details\u003e\n\n### Manual install\n\nThe Ably Pub/Sub SDK includes manual installation support.\n\n\u003cdetails\u003e\n\u003csummary\u003eManual installation details.\u003c/summary\u003e\n\n* Download the [Ably Pub/Sub Cocoa SDK.](https://github.com/ably/ably-cocoa)\n* Drag the `ably-cocoa/ably-cocoa` directory into your Xcode project as a group.\n\nAbly depends on our [MessagePack Fork](https://github.com/ably-forks/msgpack-objective-C) 0.2.0; get it [from the releases page](https://github.com/ably-forks/msgpack-objective-C/releases/tag/0.2.0-ably-1) and link it into your project.\n\n\u003c/details\u003e\n\n---\n\n## Usage\n\n```swift\n// Initialize Ably Realtime client\nlet clientOptions = ARTClientOptions(key: \"your-ably-api-key\")\nclientOptions.clientId = \"me\"\nlet realtime = ARTRealtime(options: clientOptions)\n\n// Wait for connection to be established\nrealtime.connection.on { stateChange in\n    if stateChange.current == .connected {\n        print(\"Connected to Ably\")\n        \n        // Get a reference to the 'test-channel' channel\n        let channel = realtime.channels.get(\"test-channel\")\n        \n        // Subscribe to all messages published to this channel\n        channel.subscribe { message in\n            print(\"Received message: \\(message.data ?? \"\")\")\n        }\n        \n        // Publish a test message to the channel\n        channel.publish(\"test-event\", data: \"hello world!\") { error in\n            guard error == nil else {\n                print(\"Error publishing message: \\(error!.message)\")\n                return\n            }\n            print(\"Message successfully published\")\n        }\n    }\n}\n```\n\n---\n\n## Contribute\n\nRead the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines to contribute to Ably.\n\n---\n\n## Releases\n\nThe [CHANGELOG.md](./CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).\n\n---\n\n## Support, feedback, and troubleshooting\n\nFor help or technical support, visit Ably's [support page](https://ably.com/support) or [GitHub Issues](https://github.com/ably/ably-cocoa/issues) for community-reported bugs and discussions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-cocoa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fably%2Fably-cocoa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-cocoa/lists"}