{"id":1254,"url":"https://github.com/abdullahselek/WatchCon","last_synced_at":"2025-07-30T20:32:57.830Z","repository":{"id":56927270,"uuid":"81247717","full_name":"abdullahselek/WatchCon","owner":"abdullahselek","description":"WatchCon is a tool which enables creating easy connectivity between iOS and WatchOS.","archived":false,"fork":false,"pushed_at":"2017-12-13T11:09:41.000Z","size":294,"stargazers_count":34,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-24T21:12:08.591Z","etag":null,"topics":["connectivity","ios","sessions","watchos"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"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/abdullahselek.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":"2017-02-07T19:52:15.000Z","updated_at":"2023-07-14T04:06:00.000Z","dependencies_parsed_at":"2022-08-20T23:30:33.361Z","dependency_job_id":null,"html_url":"https://github.com/abdullahselek/WatchCon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FWatchCon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FWatchCon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FWatchCon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahselek%2FWatchCon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahselek","download_url":"https://codeload.github.com/abdullahselek/WatchCon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228187612,"owners_count":17882335,"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":["connectivity","ios","sessions","watchos"],"created_at":"2024-01-05T20:15:42.299Z","updated_at":"2024-12-04T20:31:11.060Z","avatar_url":"https://github.com/abdullahselek.png","language":"Objective-C","funding_links":[],"categories":["Hardware","Library"],"sub_categories":["Other Hardware","Connectivity","Other free courses"],"readme":"![WatchCon](https://github.com/abdullahselek/WatchCon/blob/master/Images/watchcon.png)\n\n[![Build Status](https://travis-ci.org/abdullahselek/WatchCon.svg?branch=master)](https://travis-ci.org/abdullahselek/WatchCon)\n![CocoaPods Compatible](https://img.shields.io/cocoapods/v/WatchCon.svg)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n![Platform](https://img.shields.io/cocoapods/p/WatchCon.svg?style=flat)\n![License](https://img.shields.io/dub/l/vibe-d.svg)\n\n# WatchCon\nWatchCon is a tool which enables creating easy connectivity between iOS and WatchOS\n\n## Requirements\niOS 9.0+ / watchOS 2.0+\n\n## CocoaPods\n\nCocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:\n```\t\n$ gem install cocoapods\n```\nTo integrate WatchCon into your Xcode project using CocoaPods, specify it in your Podfile:\n```\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n\tpod 'WatchCon', '1.0'\nend\n```\nThen, run the following command:\n```\n$ pod install\n```\n## Carthage\n\nCarthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with Homebrew using the following command:\n\n```\nbrew update\nbrew install carthage\n```\n\nTo integrate WatchCon into your Xcode project using Carthage, specify it in your Cartfile:\n\n```\ngithub \"abdullahselek/WatchCon\" ~\u003e 1.0\n```\n\nRun carthage update to build the framework and drag the built WatchCon.framework into your Xcode project.\n\n## Callbacks to give information about current processes\n```\nWatchConSessionDelegate\n```\n\n- Called when the session has completed activation. With state WCSessionActivationStateNotActivated is succeed\n```\n- (void)activationDidCompleteWithState:(WCSessionActivationState)activationState\n                                 error:(nullable NSError *)error __IOS_AVAILABLE(9.3) __WATCHOS_AVAILABLE(2.2);\n```\n\n- Called when the session can no longer be used to modify or add any new transfers\n```\n- (void)sessionDidBecomeInactive:(WCSession *)session __IOS_AVAILABLE(9.3) __WATCHOS_UNAVAILABLE;\n```\n\n- Called when all delegate callbacks for the previously selected watch has occurred \n```\n- (void)sessionDidDeactivate:(WCSession *)session __IOS_AVAILABLE(9.3) __WATCHOS_UNAVAILABLE;\n```\n\n- Called when any of the Watch state properties change\n```\n- (void)sessionWatchStateDidChange:(WCSession *)session __WATCHOS_UNAVAILABLE;\n```\n\n- Called when the reachable state of the counterpart app changes\n```\n- (void)sessionReachabilityDidChange:(WCSession *)session;\n```\n\n- Called on the delegate of the receiver. Will be called on startup if an applicationContext is available\n```\n- (void)didReceiveApplicationContext:(NSDictionary\u003cNSString *, id\u003e *)applicationContext;\n```\n\n- Will be called in receiver on startup if the user info finished transferring when the receiver was not running\n```\n- (void)didReceiveUserInfo:(NSDictionary\u003cNSString *, id\u003e *)userInfo;\n```\n\n- Called on the sending side after the file transfer has successfully completed or failed with an error\n```\n- (void)didFinishFileTransfer:(WCSessionFileTransfer *)fileTransfer error:(nullable NSError *)error;\n```\n\n- Will be called on startup if the file finished transferring when the receiver was not running\n```\n- (void)didReceiveFile:(WCSessionFile *)file;\n```\n\n## WatchCon Functions\n\n- Get WathCon instance\n```\n+ (instancetype)sharedInstance;\n```\n\n- Activates session\n```\n- (void)activate;\n```\n\n- A way to transfer the latest state of an app\n```\n- (void)updateApplicationContext:(NSDictionary\u003cNSString *, id\u003e *)dictionary;\n```\n\n- Transfers user info\n```\n- (void)transferUserInfo:(NSDictionary\u003cNSString *, id\u003e *)dictionary;\n```\n\n- Transfer file on the given url\n```\n- (BOOL)transferFile:(NSURL *)url metadataDict:(nullable NSDictionary\u003cNSString *, id\u003e *)metadataDict;\n```\n\n- Clients can use this method to send messages to the counterpart app\n```\n- (void)sendMessage:(NSDictionary\u003cNSString *, id\u003e *)message\n    completionBlock:(void (^)(NSDictionary * _Nullable result, NSError  * _Nullable error))completionBlock;\n```\n\n- Clients can use this method to send message data\n```\n- (void)sendMessageData:(NSData *)messageData completionBlock:(void (^)(NSData * _Nullable result, NSError  * _Nullable error))completionBlock;\n```\n\n## License\n```\nMIT License\n\nCopyright (c) 2017 Abdullah Selek\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2FWatchCon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahselek%2FWatchCon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahselek%2FWatchCon/lists"}