{"id":13489473,"url":"https://github.com/contentful/Stargate","last_synced_at":"2025-03-28T04:31:13.479Z","repository":{"id":31427204,"uuid":"34990730","full_name":"contentful/Stargate","owner":"contentful","description":"A communication channel from your Mac to your watch.","archived":true,"fork":false,"pushed_at":"2015-06-29T00:37:43.000Z","size":875,"stargazers_count":135,"open_issues_count":2,"forks_count":6,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-06T12:54:13.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentful.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-03T15:33:00.000Z","updated_at":"2023-01-28T21:11:30.000Z","dependencies_parsed_at":"2022-09-05T19:00:42.002Z","dependency_job_id":null,"html_url":"https://github.com/contentful/Stargate","commit_stats":null,"previous_names":["contentful-labs/stargate"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2FStargate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2FStargate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2FStargate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentful%2FStargate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentful","download_url":"https://codeload.github.com/contentful/Stargate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245970570,"owners_count":20702444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T19:00:28.463Z","updated_at":"2025-03-28T04:31:13.048Z","avatar_url":"https://github.com/contentful.png","language":"Swift","funding_links":[],"categories":["Libs","Swift"],"sub_categories":["Network"],"readme":"# Stargate\n\n[![Version](https://img.shields.io/cocoapods/v/Stargate.svg?style=flat)](http://cocoadocs.org/docsets/Stargate)\n[![License](https://img.shields.io/cocoapods/l/Stargate.svg?style=flat)](http://cocoadocs.org/docsets/Stargate)\n[![Platform](https://img.shields.io/cocoapods/p/Stargate.svg?style=flat)](http://cocoadocs.org/docsets/Stargate)\n[![Build Status](https://img.shields.io/circleci/project/contentful-labs/Stargate.svg?style=flat)](https://circleci.com/gh/contentful-labs/Stargate)\n\u003c!-- [![Coverage Status](https://img.shields.io/coveralls/contentful-labs/Stargate.svg)](https://coveralls.io/r/contentful-labs/Stargate?branch=master) --\u003e\n\n![](Stargate.gif)\n\nA communication channel from your Mac to your watch.\n\nProviding a convenient wrapper around [MMWormhole][1] and [PeerKit][2],\nStargate leverages Multipeer Connectivity and App Groups to communicate between an\nOS X application and ᴡᴀᴛᴄʜ via your iPhone. The communication is bi-directional and\nlets you send any object that complies with `NSCoding`.\n\n## Usage\n\nSimply install it via [CocoaPods][4]:\n\n```ruby\nuse_frameworks!\n\npod 'Stargate'\n```\n\nNote: make sure you use version [0.37][5] or newer. Stargate is written in Swift 1.2,\nso it requires Xcode 6.3 or newer as well.\n\n### On the Mac\n\nSend and receive messages via Multipeer Connectivity:\n\n```swift\nlet stargate = Earth(applicationGroupIdentifier: \"group.com.contentful.Stargate\")\n\nstargate.listenForMessage(identifier: \"stargate2\") { (object) -\u003e Void in\n\tprintln(\"Received message on Mac: \\(object)\")\n}\n\nstargate.passMessage(\"YOLO\", identifier: \"stargate\")\n```\n\n### On the phone\n\nBridge messages between Multipeer and Darwin notifications:\n\n```swift\nlet stargate = Abydos(applicationGroupIdentifier: \"group.com.contentful.Stargate\")\n    \nstargate.tunnel()\nstargate.tunnelReplies(identifier: \"stargate2\")\n```\n\n### On the watch\n\nSend and receive messages via Darwin notifications:\n\n```swift\nlet stargate = Atlantis(applicationGroupIdentifier: \"group.com.contentful.Stargate\")\n\nstargate.passMessage(\"YOLO\", identifier:\"stargate2\")\n\nstargate.listenForMessage(identifier:\"stargate\") { (object) -\u003e Void in\n\tprintln(\"Received message on watch: \\(object)\")\n}\n\nstargate.stopListeningForMessage(identifier:\"stargate\")\n```\n\nLook at the [example project](Example/) for guidance on how to set up one project for all three platforms. When creating the targets, make sure you don't accidentially select the [OS X target][6] as host for the\nWatchKit extension.\n\n## License\n\nCopyright (c) 2015 Contentful GmbH. See [LICENSE](LICENSE) for further details.\n\n\n[1]: https://github.com/mutualmobile/MMWormhole\n[2]: https://github.com/jpsim/PeerKit\n[4]: http://cocoapods.org\n[5]: http://blog.cocoapods.org/CocoaPods-0.37/\n[6]: http://openradar.appspot.com/radar?id=4975391517179904\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2FStargate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentful%2FStargate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentful%2FStargate/lists"}