{"id":25828830,"url":"https://github.com/matis-schotte/vifra","last_synced_at":"2025-02-28T18:24:30.173Z","repository":{"id":56926035,"uuid":"123802552","full_name":"matis-schotte/Vifra","owner":"matis-schotte","description":"Vifra is a framework for macOS, iOS and watchOS that provides simplified access to the device actuator to provide haptic feedback (vibration through the taptic engine).","archived":false,"fork":false,"pushed_at":"2018-04-21T08:53:23.000Z","size":2134,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-03-15T13:10:32.931Z","etag":null,"topics":["carthage","cocoapods","device-actuator","haptic","ios","macos","module","package","swift","taptic-engine","vibration","watchos","xcode"],"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/matis-schotte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-04T15:35:55.000Z","updated_at":"2023-12-15T08:56:42.000Z","dependencies_parsed_at":"2022-08-20T22:50:17.465Z","dependency_job_id":null,"html_url":"https://github.com/matis-schotte/Vifra","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FVifra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FVifra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FVifra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FVifra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matis-schotte","download_url":"https://codeload.github.com/matis-schotte/Vifra/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241199384,"owners_count":19926560,"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":["carthage","cocoapods","device-actuator","haptic","ios","macos","module","package","swift","taptic-engine","vibration","watchos","xcode"],"created_at":"2025-02-28T18:24:29.423Z","updated_at":"2025-02-28T18:24:30.158Z","avatar_url":"https://github.com/matis-schotte.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vifra\n\n[![Build Status](https://travis-ci.org/matis-schotte/Vifra.svg?branch=develop)](https://travis-ci.org/matis-schotte/Vifra)\n[![codebeat badge](https://codebeat.co/badges/d4b387f7-639d-4c96-b6d3-13538bb8151c)](https://codebeat.co/projects/github-com-matis-schotte-vifra-develop)\n[![codecov](https://codecov.io/gh/matis-schotte/Vifra/branch/develop/graph/badge.svg)](https://codecov.io/gh/matis-schotte/Vifra)\n[![Maintainability](https://api.codeclimate.com/v1/badges/ef99565e7d56efc70b4b/maintainability)](https://codeclimate.com/github/matis-schotte/Vifra/maintainability)\n[![Docs](https://matis-schotte.github.io/Vifra/badge.svg)](https://matis-schotte.github.io/Vifra/)\n[![license](https://img.shields.io/github/license/matis-schotte/Vifra.svg)](./LICENSE)\n\n[![Version](https://img.shields.io/cocoapods/v/Vifra.svg)](http://cocoapods.org/pods/Vifra)\n[![Open Source Helpers](https://www.codetriage.com/matis-schotte/vifra/badges/users.svg)](https://www.codetriage.com/matis-schotte/vifra)\n![platform](https://img.shields.io/badge/platform-macOS%20%7C%20iOS%20%7C%20watchOS-lightgrey.svg)\n[![Twitter](https://img.shields.io/badge/twitter-@matis_schotte-blue.svg)](http://twitter.com/matis_schotte)\n\n![Ethereum](https://img.shields.io/badge/ethereum-0x25C93954ad65f1Bb5A1fd70Ec33f3b9fe72e5e58-yellowgreen.svg)\n![Litecoin](https://img.shields.io/badge/litecoin-MPech47X9GjaatuV4sQsEzoMwGMxKzdXaH-lightgrey.svg)\n\nVifra is a framework for macOS, iOS and watchOS that provides simplified access to the device actuator to provide haptic feedback (vibration through the taptic engine).\n\n## Requirements\n- Swift \u003e= 4\n- macOS \u003e= 10.12\n- watchOS \u003e= 2.0\n\n## Installation\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Vifra does support its use on supported platforms.\n\nOnce you have your Swift package set up, adding Vifra as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/matis-schotte/Vifra.git\", from: \"0.4.0\")\n]\n```\n\nDo not forget to ensure that the deployment target is set to the correct version (e.g. macOS 10.12), and that all necessary Frameworks are linked (e.g. MultitouchSupport.framework). To avoid getting \"undefined symbols\" the Bridging header should be used. Possible build command could be:\n\n```bash\n$ swift build -Xswiftc \"-target\" -Xswiftc \"x86_64-apple-macosx10.12\" -Xswiftc \"-import-objc-header\" -Xswiftc \".build/checkouts/Vifra.git-6919244937016367571/Vifra/Vifra-Bridging-Header.h\" -Xlinker -F/System/Library/PrivateFrameworks -Xlinker -lMultitouchSupport \u0026\u0026 swift run\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate Vifra into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"matis-schotte/Vifra\" ~\u003e 0.4\n```\n\nRun `carthage update` to build the framework and drag the built `Vifra.framework` into your Xcode project.\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate Vifra into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'Vifra'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Manually\n\nIf you prefer not to use any of the aforementioned dependency managers, you can integrate Vifra into your project manually.\n\n- Open up Terminal, `cd` into your top-level project directory, and run the following command \"if\" your project is not initialized as a git repository:\n\n```bash\n$ git init\n```\n\n- Add Vifra as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command:\n\n```bash\n$ git submodule add https://github.com/matis-schotte/Vifra.git\n```\n\n- Open the new `Vifra` folder, and drag the `Vifra.xcodeproj` into the Project Navigator of your application's Xcode project.\n- Select the `Vifra.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target.\n- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the \"Targets\" heading in the sidebar.\n- In the tab bar at the top of that window, open the \"General\" panel.\n- Click on the `+` button under the \"Embedded Binaries\" section.\n- You will see the `Vifra.framework` somewhere, just select the correct version.\n- And that's it, try `import Vifra`!\n\n## Usage\nYou can issue haptic feedback with just any of the following lines using any of the predefined enum values:\n```swift\nVifra.feedback(.strong)\nVifra.feedback([.strong, .weak, .delay(usec: 500_000), .strong])\n```\n\n[//]: # (Example: See the example project snside the `examples/` folder.)\n\n## Know problems\n- macOS: A private framework is used; it is therefore unlikely to be accepted in the app store.\n- macOS: You cannot enable the sandboxing entitlement; if you do you'll encounter the error -536870174 during `Vifra.setup()` which is internally being called from `Vifra.feedback()`.\n\n## ToDo\n- Add Carthage support\n- Add iOS support (UIFeedbackGenerator and AudioServicesPlaySystemSound(kSystemSoundID_Vibrate))\n- Update macOS support (NSHapticFeedbackPerformer)\n\n[//]: # (Donations: ETH, LTC welcome.)\n\n## License\nVifra is available under the MIT license. See the [LICENSE](https://github.com/matis-schotte/Vifra/blob/develop/LICENSE) file for more info.\n\n## Author\nMatis Schotte, [dm26f1cab8aa26@ungeord.net](mailto:dm26f1cab8aa26@ungeord.net)\n\n[https://github.com/matis-schotte/Vifra](https://github.com/matis-schotte/Vifra)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatis-schotte%2Fvifra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatis-schotte%2Fvifra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatis-schotte%2Fvifra/lists"}