Popularity
3.5
Growing
Activity
3.3
Growing
190
7
16

Code Quality Rank: L5
Programming language: Swift
License: MIT License
Tags: Other Hardware     Layout    
Latest version: v0.1

WatchShaker alternatives and similar libraries

Based on the "Other Hardware" category.
Alternatively, view WatchShaker alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of WatchShaker or a related project?

Add another 'Other Hardware' Library

README

WatchShaker

Simple motion detector for ⌚️ (watchOS) shake gesture.

Swift Version Platform

WatchShaker is a watchOS helper to get your ⌚️ shake movements

Requirements

  • watchOS 6.0+
  • Xcode 11.0+

Installation

Manually

  1. Download and drop WatchShaker.swift in your project to your watch target.
  2. Congratulations!

Usage example

import WatchKit
import Foundation


class InterfaceController: WKInterfaceController {

    override func awake(withContext context: Any?) {
        super.awake(withContext: context)
        // Configure interface objects here.
    }

    var shaker:WatchShaker = WatchShaker(shakeSensibility: .shakeSensibilityNormal, delay: 0.2)

    override func willActivate() {

        super.willActivate()
        shaker.delegate = self
        shaker.start()
    }

    override func didDeactivate() {

        super.didDeactivate()
        shaker.stop()

    }

}

extension InterfaceController: WatchShakerDelegate
{
    func watchShakerDidShake(_ watchShaker: WatchShaker) {
        print("YOU HAVE SHAKEN YOUR ⌚️⌚️⌚️")
    }

    func watchShaker(_ watchShaker: WatchShaker, didFailWith error: Error) {
        print(error.localizedDescription)
    }
}

Contribute

We would love for you to contribute to WatchShaker, check the LICENSE file for more info.

Meta

Ezequiel França – @ezefranca and all awesome Contributors

Distributed under the MIT license. See LICENSE for more information.


*Note that all licence references and agreements mentioned in the WatchShaker README section above are relevant to that project's source code only.