{"id":15594179,"url":"https://github.com/orta/ar_dispatch","last_synced_at":"2025-05-01T10:12:25.205Z","repository":{"id":24148591,"uuid":"27538170","full_name":"orta/ar_dispatch","owner":"orta","description":"Dispatch functions run async code synchronous in tests","archived":false,"fork":false,"pushed_at":"2023-01-20T13:47:02.000Z","size":255,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-01T10:12:15.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/orta.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":"2014-12-04T11:49:43.000Z","updated_at":"2021-09-10T13:25:36.000Z","dependencies_parsed_at":"2023-02-12T02:30:55.199Z","dependency_job_id":null,"html_url":"https://github.com/orta/ar_dispatch","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/orta%2Far_dispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Far_dispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Far_dispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Far_dispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orta","download_url":"https://codeload.github.com/orta/ar_dispatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251857022,"owners_count":21655121,"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-10-03T00:32:41.648Z","updated_at":"2025-05-01T10:12:25.180Z","avatar_url":"https://github.com/orta.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ar_dispatch\n\nMake the Foundation dispatch_xxx_ functions run normally async code synchronously in tests\n\n[![CI Status](http://img.shields.io/travis/orta/ar_dispatch.svg?style=flat)](https://travis-ci.org/Orta Therox/ar_dispatch)\n[![Version](https://img.shields.io/cocoapods/v/ar_dispatch.svg?style=flat)](http://cocoadocs.org/docsets/ar_dispatch)\n[![License](https://img.shields.io/cocoapods/l/ar_dispatch.svg?style=flat)](http://cocoadocs.org/docsets/ar_dispatch)\n[![Platform](https://img.shields.io/cocoapods/p/ar_dispatch.svg?style=flat)](http://cocoadocs.org/docsets/ar_dispatch)\n\n## What is does\n\nAdds a collection of methods around the dispatch queue that will run synchronously when being ran in a test target, but will act asynchronously in application targets. Tested.\n\n``` objc\n    /// Async in App Code, sync in Test Code, waits for a time then runs the block on the main queue\n    extern void ar_dispatch_after(NSTimeInterval time, dispatch_block_t block);\n\n    /// Async in App Code, sync in Test Code, waits for a time then runs the block on your own queue\n    extern void ar_dispatch_after_on_queue(NSTimeInterval time, dispatch_queue_t queue, dispatch_block_t block);\n\n    /// Async in App Code, sync in Test Code, runs a block on a default queue on another thread\n    extern void ar_dispatch_async(dispatch_block_t block);\n\n    /// Async in App Code, sync in Test Code, runs a block on the main thread\n    extern void ar_dispatch_main_queue(dispatch_block_t block);\n\n    /// Async in App Code, sync in Test Code, runs block on a queue\n    extern void ar_dispatch_on_queue(dispatch_queue_t queue, dispatch_block_t block);\n\n```\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\nar_dispatch is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n    pod \"ar_dispatch\"\n\n## Author\n\nOrta Therox, orta.therox@gmail.com\n\n## License\n\nar_dispatch is available under the MIT license. See the LICENSE file for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Far_dispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forta%2Far_dispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Far_dispatch/lists"}