{"id":21997650,"url":"https://github.com/osfunapps/ostools-ios","last_synced_at":"2026-02-23T17:40:31.864Z","repository":{"id":62449708,"uuid":"285591207","full_name":"osfunapps/osTools-iOS","owner":"osfunapps","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-27T11:28:13.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T12:12:30.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/osfunapps.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-06T14:23:06.000Z","updated_at":"2024-11-27T11:28:16.000Z","dependencies_parsed_at":"2024-01-09T14:51:09.056Z","dependency_job_id":"560b1f03-e3fa-40bb-bc27-f48111dd2c74","html_url":"https://github.com/osfunapps/osTools-iOS","commit_stats":null,"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2FosTools-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2FosTools-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2FosTools-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2FosTools-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osfunapps","download_url":"https://codeload.github.com/osfunapps/osTools-iOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227223679,"owners_count":17750386,"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-11-29T22:17:35.422Z","updated_at":"2026-02-23T17:40:31.787Z","avatar_url":"https://github.com/osfunapps.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OsTools\n\n[![CI Status](https://img.shields.io/travis/osfunapps/OsTools.svg?style=flat)](https://travis-ci.org/osfunapps/OsTools)\n[![Version](https://img.shields.io/cocoapods/v/OsTools.svg?style=flat)](https://cocoapods.org/pods/OsTools)\n[![License](https://img.shields.io/cocoapods/l/OsTools.svg?style=flat)](https://cocoapods.org/pods/OsTools)\n[![Platform](https://img.shields.io/cocoapods/p/OsTools.svg?style=flat)](https://cocoapods.org/pods/OsTools)\n\n\nThis module serves as a foundemental toolkit to osApps iOS developing.\n\n## Example functions and signatures\n```\n/// Will run a function after a delay. The delayed function will run on the main thread\npublic static func asyncMainTimedFunc(_ funcc: @escaping (() -\u003e ()), _ seconds: Int = 0, millis: Int = 0) -\u003e DispatchWorkItem {\n    let task = DispatchWorkItem {\n        funcc()\n    }\n    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(seconds) + .milliseconds(millis), execute: task)\n    return task\n}\n\n/// Will run a function after a delay. The delayed function will run on a background dq\npublic static func asyncTimedFunc(_ funcc: @escaping (() -\u003e ()),\n                           seconds: Int = 0,\n                           millis: Int = 0,\n                           qos: DispatchQoS.QoSClass = .utility) -\u003e DispatchWorkItem {\n    let task = DispatchWorkItem {\n        funcc()\n    }\n    DispatchQueue.global(qos: qos).asyncAfter(deadline: DispatchTime.now() + .seconds(seconds) + .milliseconds(millis), execute: task)\n    \n    return task\n}\n\n/// Wll run a function after a delay on the main thread\npublic static func asyncMainTimedTask(task: DispatchWorkItem,\n                               seconds: Int = 0,\n                               millis: Int = 0) {\n    DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(seconds) + .milliseconds(millis), execute: task)\n}\n\n/// Wll run a function after a delay on a background thread\npublic static func asyncTimedTask(task: DispatchWorkItem,\n                           seconds: Int = 0,\n                            millis: Int = 0,\n                            qos: DispatchQoS.QoSClass = .utility) {\n    DispatchQueue.global(qos: qos).asyncAfter(deadline: DispatchTime.now() + .seconds(seconds) + .milliseconds(millis), execute: task)\n}\n\n/// Will return true if the char is of a language\npublic static func isLanguageChar(possibleChar: String) -\u003e Bool {\n    if(possibleChar.count \u003e 1){\n        return false\n    }\n    return (possibleChar.range(of: \"[\\\\p{Alnum},\\\\s#\\\\-.]+\", options: .regularExpression, range: nil, locale: nil) != nil)\n}\n\n/// Will return the top most view controller in the back stack\npublic static func getLastViewController(_ viewController: UIViewController) -\u003e UIViewController? {\n    let controllersCount = viewController.navigationController?.viewControllers.count\n    if(controllersCount != nil) {\n        return viewController.navigationController?.viewControllers[controllersCount! - 1]\n    } else {\n        return nil\n    }\n}\n```\n\n\n## Installation\n\nOsTools is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'OsTools'\n```\n\n## Author\n\nosApps, support@os-apps.com\n\n## License\n\nOsTools is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fostools-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosfunapps%2Fostools-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fostools-ios/lists"}