{"id":19180033,"url":"https://github.com/fotidim/unihaptic","last_synced_at":"2026-06-11T23:31:11.516Z","repository":{"id":87781515,"uuid":"228234369","full_name":"fotiDim/UniHaptic","owner":"fotiDim","description":"Unified API for iOS vibration, written in Swift 5.1, supports iOS 13 - iOS 7","archived":false,"fork":false,"pushed_at":"2020-01-13T21:51:47.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T01:45:15.278Z","etag":null,"topics":["audiotoolbox","core-haptics","haptic-feedback","ios","swift-package-manager","uifeedbackgenerator","vibration"],"latest_commit_sha":null,"homepage":"","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/fotiDim.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":"2019-12-15T18:54:13.000Z","updated_at":"2020-02-01T12:16:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"dcada099-6f6d-40dc-ba83-66a3f0f9f8f7","html_url":"https://github.com/fotiDim/UniHaptic","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fotiDim/UniHaptic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotiDim%2FUniHaptic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotiDim%2FUniHaptic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotiDim%2FUniHaptic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotiDim%2FUniHaptic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fotiDim","download_url":"https://codeload.github.com/fotiDim/UniHaptic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fotiDim%2FUniHaptic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34222709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["audiotoolbox","core-haptics","haptic-feedback","ios","swift-package-manager","uifeedbackgenerator","vibration"],"created_at":"2024-11-09T10:47:48.403Z","updated_at":"2026-06-11T23:31:11.486Z","avatar_url":"https://github.com/fotiDim.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![UniHaptic: Unified API for Haptic Feedback \u0026 Vibration](https://raw.githubusercontent.com/fotiDim/UniHaptic/master/UniHaptic.svg?sanitize=true)\n\n[![iOS 7+](https://img.shields.io/badge/platform-iOS%207%2B-blue.svg)](https://img.shields.io/badge/platform-iOS%209%2B-blue.svg)\n[![Swift 5.1](https://img.shields.io/badge/language-Swift%205.1-f48041.svg)](https://img.shields.io/badge/language-swift4-f48041.svg)\n[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-%E2%9C%93-brightgreen.svg?style=flat)](https://img.shields.io/badge/language-swift4-f48041.svg)\n[![License: MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://img.shields.io/badge/license-MIT-lightgrey.svg)\n\n\nUnified API for CHHapticEngine /UIFeedbackGenerator haptic feedback and AudioToolbox vibration. Supports from iOS 13 all the way down to iOS 7.\n\n\n# Installation\nUse Swift Package Manager though Xcode 11. Simply go to `File -\u003e Swift Packages -\u003e Add Package Dependency...` and paste the URL of this repo.\n\n# Usage\nThe API is meant to be as simple as possible. First do your import:\n\n```swift\nimport UniHaptic\n```\nand then simply call it:\n```swift\nUniHaptic().vibrate()\n```\n\nYou can have more control by initializing the `UniHaptic` class with a specific style of vibration like this `(UniHaptic(style: .impact)`. The available options are:\n- selection\n- impact\n- notification\n- custom\n\nIf you don't provide any option the default will be `.selection`. \n\nYou also have the option to provice specific `intensity` and `sharpness` to vibrate:\n```swift\nUniHaptic().vibrate(intensity: 0.7, sharpness: 0.7)\n```\n\nSharpness is only used if `UniHaptic` was initialized with `.custom` style.\n\n# Minimize Latency\nThe above example while being simple it does not provide the lowest possible latency. To get minimal latency initialize Unihaptic in a separate call and store its instance:\n\n```swift\nclass MyClass {\n    var unihaptic = UniHaptic()\n\n    func myFunction() {\n        unihaptic.vibrate()\n    }\n}\n```\n\n Then when you call `vibrate()` the latency will be the lowest possible as the Haptic Engine is prepared. For more information read [here](https://developer.apple.com/documentation/uikit/uifeedbackgenerator#2555405).\n\n# Project Status\nThe project is in its early steps. It is perfectly usable as it is but the API might change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffotidim%2Funihaptic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffotidim%2Funihaptic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffotidim%2Funihaptic/lists"}