From e03932406d2f36f10beefd31717730b2c2fa9014 Mon Sep 17 00:00:00 2001 From: Lasha Efremidze Date: Fri, 15 Oct 2021 00:54:28 -0700 Subject: [PATCH] 3.0.3 --- CHANGELOG.md | 5 +++++ Haptica.podspec | 2 +- Haptica.xcodeproj/project.pbxproj | 4 ++-- README.md | 2 ++ Sources/Pattern.swift | 12 ++++++++++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb7fd2..2628428 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change log +## [Version 3.0.3](https://github.com/efremidze/Haptica/releases/tag/3.0.3) +Released on 2021-10-15 + +- Added rigid and soft haptic feedback to patterns + ## [Version 3.0.2](https://github.com/efremidze/Haptica/releases/tag/3.0.2) Released on 2019-12-04 diff --git a/Haptica.podspec b/Haptica.podspec index 2df37ac..b016216 100644 --- a/Haptica.podspec +++ b/Haptica.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'Haptica' - s.version = '3.0.2' + s.version = '3.0.3' s.summary = 'Easy Haptic Feedback' s.homepage = 'https://github.com/efremidze/Haptica' s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/Haptica.xcodeproj/project.pbxproj b/Haptica.xcodeproj/project.pbxproj index 69c0eaa..eba08a2 100644 --- a/Haptica.xcodeproj/project.pbxproj +++ b/Haptica.xcodeproj/project.pbxproj @@ -438,7 +438,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 3.0.2; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.Haptica; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -458,7 +458,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 3.0.2; + MARKETING_VERSION = 3.0.3; PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.Haptica; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/README.md b/README.md index 373c87a..1faea73 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ Use pattern symbols to represent custom vibrations. - `O` - heavy impact - `o` - medium impact - `.` - light impact +- `X` - rigid impact +- `x` - soft impact - `-` - wait 0.1 second Or play a symphony of notes: diff --git a/Sources/Pattern.swift b/Sources/Pattern.swift index 511bbbe..8e53b19 100644 --- a/Sources/Pattern.swift +++ b/Sources/Pattern.swift @@ -41,6 +41,18 @@ public enum Note { self = .haptic(.impact(.medium)) case ".": self = .haptic(.impact(.light)) + case "X": + if #available(iOS 13.0, *) { + self = .haptic(.impact(.rigid)) + } else { + self = .haptic(.impact(.heavy)) + } + case "x": + if #available(iOS 13.0, *) { + self = .haptic(.impact(.soft)) + } else { + self = .haptic(.impact(.light)) + } case "-": self = .wait(delay) default: