├── .github
└── ISSUE_TEMPLATE.md
├── .gitignore
├── .swift-version
├── Info.plist
├── LICENSE
├── README.md
├── Sources
└── TapticEngine
│ └── TapticEngine.swift
├── TapticEngine.podspec
├── TapticEngine.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ └── TapticEngine.xcscheme
├── TapticEngineDemo
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
└── ViewController.swift
└── images
└── taptic_engine.png
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
6 |
7 | ### New Issue Checklist
8 |
9 | - [ ] Updated `TapticEngine` to the latest version
10 | - [ ] Checked [Gitter](https://gitter.im/WorldDownTown/TapticEngine)
11 |
12 |
13 | ### Issue Description
14 |
15 | ### Environment
16 |
17 |
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## mac
6 | .DS_Store
7 |
8 | ## Build generated
9 | build/
10 | DerivedData/
11 |
12 | ## Various settings
13 | *.pbxuser
14 | !default.pbxuser
15 | *.mode1v3
16 | !default.mode1v3
17 | *.mode2v3
18 | !default.mode2v3
19 | *.perspectivev3
20 | !default.perspectivev3
21 | xcuserdata/
22 |
23 | ## Other
24 | *.moved-aside
25 | *.xcuserstate
26 |
27 | ## Obj-C/Swift specific
28 | *.hmap
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | .build/
42 |
43 | # CocoaPods
44 | #
45 | # We recommend against adding the Pods directory to your .gitignore. However
46 | # you should judge for yourself, the pros and cons are mentioned at:
47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48 | #
49 | # Pods/
50 |
51 | # Carthage
52 | #
53 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
54 | # Carthage/Checkouts
55 |
56 | Carthage/Build
57 |
58 | # fastlane
59 | #
60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61 | # screenshots whenever they are needed.
62 | # For more information about the recommended setup visit:
63 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
64 |
65 | fastlane/report.xml
66 | fastlane/Preview.html
67 | fastlane/screenshots
68 | fastlane/test_output
69 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.1
2 |
--------------------------------------------------------------------------------
/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 WorldDownTown
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TapticEngine
2 |
3 | [](https://doge.mit-license.org)
4 | [](https://developer.apple.com/swift)
5 | [](https://github.com/Carthage/Carthage)
6 | [](http://cocoadocs.org/docsets/TapticEngine/)
7 | [](http://cocoadocs.org/docsets/TapticEngine/)
8 | [](https://github.com/matteocrippa/awesome-swift#haptic-feedback)
9 |
10 | ## Overview
11 | TapticEngine generates haptic feedback vibrations on iOS device.
12 | This library wrapps on [UIImpactFeedbackGenerator](https://developer.apple.com/reference/uikit/uiimpactfeedbackgenerator), [UISelectionFeedbackGenerator](https://developer.apple.com/reference/uikit/uiselectionfeedbackgenerator), [UINotificationFeedbackGenerator](https://developer.apple.com/reference/uikit/uinotificationfeedbackgenerator).
13 |
14 |
15 |
16 | ## Demo
17 | Build Xcode project.
18 |
19 | 1. Open TapticEngine.xcodeproj.
20 | 2. Change Scheme to `TapticEngineDemo`
21 | 3. Run
22 |
23 | ## Usage
24 |
25 | ```swift
26 | // Triggers an impact feedback between small, light user interface elements. (`UIImpactFeedbackStyle.light`)
27 | TapticEngine.impact.feedback(.light)
28 |
29 | // Triggers an impact feedback between moderately sized user interface elements. (`UIImpactFeedbackStyle.medium`)
30 | TapticEngine.impact.feedback(.medium)
31 |
32 | // Triggers an impact feedback between large, heavy user interface elements. (`UIImpactFeedbackStyle.heavy`)
33 | TapticEngine.impact.feedback(.heavy)
34 |
35 | // Triggers a selection feedback to communicate movement through a series of discrete values.
36 | TapticEngine.selection.feedback()
37 |
38 | // Triggers a notification feedback, indicating that a task has completed successfully. (`UINotificationFeedbackType.success`)
39 | TapticEngine.notification.feedback(.success)
40 |
41 | // Triggers a notification feedback, indicating that a task has produced a warning. (`UINotificationFeedbackType.warning`)
42 | TapticEngine.notification.feedback(.warning)
43 |
44 | // Triggers a notification feedback, indicating that a task has failed. (`UINotificationFeedbackType.error`)
45 | TapticEngine.notification.feedback(.error)
46 |
47 | // Prepare an impact feedback for `UIImpactFeedbackStyle.light`.
48 | TapticEngine.impact.prepare(.light)
49 |
50 | // Prepare a selection feedback.
51 | TapticEngine.selection.prepare()
52 |
53 | // Prepare a notification feedback.
54 | TapticEngine.notification.prepare()
55 | ```
56 |
57 | ## Requirements
58 | - Swift 4.0+
59 | - iOS 9.0+ (**But it works on iOS 10 or later. On iOS 9, it does nothing.**)
60 |
61 | ## Installation
62 |
63 | ### Carthage
64 | TapticEngine is available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your Cartfile:
65 |
66 | ```
67 | github "WorldDownTown/TapticEngine"
68 | ```
69 |
70 | ### CocoaPods
71 | TapticEngine is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:
72 |
73 | ```ruby
74 | pod 'TapticEngine'
75 | ```
76 |
77 | ### Manually
78 | Download and drop `TapticEngine/Sources` folder in your project.
79 |
80 | ## Author
81 | WorldDownTown, WorldDownTown@gmail.com
82 |
83 | ## License
84 | TapticEngine is available under the MIT license. See the LICENSE file for more info.
85 |
86 |
--------------------------------------------------------------------------------
/Sources/TapticEngine/TapticEngine.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TapticEngine.swift
3 | // TapticEngine
4 | //
5 | // Created by Keisuke Shoji on 2017/04/09.
6 | // Copyright © 2017年 Keisuke Shoji. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// Generates iOS Device vibrations by UIFeedbackGenerator.
12 | open class TapticEngine {
13 | public static let impact: Impact = .init()
14 | public static let selection: Selection = .init()
15 | public static let notification: Notification = .init()
16 |
17 |
18 | /// Wrapper of `UIImpactFeedbackGenerator`
19 | open class Impact {
20 | /// Impact feedback styles
21 | ///
22 | /// - light: A impact feedback between small, light user interface elements.
23 | /// - medium: A impact feedback between moderately sized user interface elements.
24 | /// - heavy: A impact feedback between large, heavy user interface elements.
25 | public enum ImpactStyle {
26 | case light, medium, heavy
27 | }
28 |
29 | private var style: ImpactStyle = .light
30 | private var generator: Any? = Impact.makeGenerator(.light)
31 |
32 | private static func makeGenerator(_ style: ImpactStyle) -> Any? {
33 | guard #available(iOS 10.0, *) else { return nil }
34 |
35 | let feedbackStyle: UIImpactFeedbackStyle
36 | switch style {
37 | case .light:
38 | feedbackStyle = .light
39 | case .medium:
40 | feedbackStyle = .medium
41 | case .heavy:
42 | feedbackStyle = .heavy
43 | }
44 | let generator: UIImpactFeedbackGenerator = UIImpactFeedbackGenerator(style: feedbackStyle)
45 | generator.prepare()
46 | return generator
47 | }
48 |
49 | private func updateGeneratorIfNeeded(_ style: ImpactStyle) {
50 | guard self.style != style else { return }
51 |
52 | generator = Impact.makeGenerator(style)
53 | self.style = style
54 | }
55 |
56 | public func feedback(_ style: ImpactStyle) {
57 | guard #available(iOS 10.0, *) else { return }
58 |
59 | updateGeneratorIfNeeded(style)
60 |
61 | guard let generator = generator as? UIImpactFeedbackGenerator else { return }
62 |
63 | generator.impactOccurred()
64 | generator.prepare()
65 | }
66 |
67 | public func prepare(_ style: ImpactStyle) {
68 | guard #available(iOS 10.0, *) else { return }
69 |
70 | updateGeneratorIfNeeded(style)
71 |
72 | guard let generator = generator as? UIImpactFeedbackGenerator else { return }
73 |
74 | generator.prepare()
75 | }
76 | }
77 |
78 |
79 | /// Wrapper of `UISelectionFeedbackGenerator`
80 | open class Selection {
81 | private var generator: Any? = {
82 | guard #available(iOS 10.0, *) else { return nil }
83 |
84 | let generator: UISelectionFeedbackGenerator = UISelectionFeedbackGenerator()
85 | generator.prepare()
86 | return generator
87 | }()
88 |
89 | public func feedback() {
90 | guard #available(iOS 10.0, *),
91 | let generator = generator as? UISelectionFeedbackGenerator else { return }
92 |
93 | generator.selectionChanged()
94 | generator.prepare()
95 | }
96 |
97 | public func prepare() {
98 | guard #available(iOS 10.0, *),
99 | let generator = generator as? UISelectionFeedbackGenerator else { return }
100 |
101 | generator.prepare()
102 | }
103 | }
104 |
105 |
106 | /// Wrapper of `UINotificationFeedbackGenerator`
107 | open class Notification {
108 | /// Notification feedback types
109 | ///
110 | /// - success: A notification feedback, indicating that a task has completed successfully.
111 | /// - warning: A notification feedback, indicating that a task has produced a warning.
112 | /// - error: A notification feedback, indicating that a task has failed.
113 | public enum NotificationType {
114 | case success, warning, error
115 | }
116 |
117 | private var generator: Any? = {
118 | guard #available(iOS 10.0, *) else { return nil }
119 |
120 | let generator: UINotificationFeedbackGenerator = UINotificationFeedbackGenerator()
121 | generator.prepare()
122 | return generator
123 | }()
124 |
125 | public func feedback(_ type: NotificationType) {
126 | guard #available(iOS 10.0, *),
127 | let generator = generator as? UINotificationFeedbackGenerator else { return }
128 |
129 | let feedbackType: UINotificationFeedbackType
130 | switch type {
131 | case .success:
132 | feedbackType = .success
133 | case .warning:
134 | feedbackType = .warning
135 | case .error:
136 | feedbackType = .error
137 | }
138 | generator.notificationOccurred(feedbackType)
139 | generator.prepare()
140 | }
141 |
142 | public func prepare() {
143 | guard #available(iOS 10.0, *),
144 | let generator = generator as? UINotificationFeedbackGenerator else { return }
145 |
146 | generator.prepare()
147 | }
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/TapticEngine.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'TapticEngine'
3 | s.version = '1.2.0'
4 | s.summary = '"TapticEngine" generates iOS Device vibrations.'
5 | s.description = <<-DESC
6 | TapticEngine generates haptic feedback vibrations on iOS device.
7 | This library wrapps on [UIImpactFeedbackGenerator](https://developer.apple.com/reference/uikit/uiimpactfeedbackgenerator), [UISelectionFeedbackGenerator](https://developer.apple.com/reference/uikit/uiselectionfeedbackgenerator), [UINotificationFeedbackGenerator](https://developer.apple.com/reference/uikit/uinotificationfeedbackgenerator).
8 | DESC
9 | s.homepage = 'https://github.com/WorldDownTown/TapticEngine'
10 | s.screenshots = 'https://raw.githubusercontent.com/WorldDownTown/TapticEngine/master/images/taptic_engine.png'
11 | s.license = { type: 'MIT', file: 'LICENSE' }
12 | s.author = { WorldDownTown: 'WorldDownTown@gmail.com' }
13 | s.source = { git: 'https://github.com/WorldDownTown/TapticEngine.git', tag: s.version.to_s }
14 | s.social_media_url = 'https://twitter.com/WorldDownTown'
15 | s.ios.deployment_target = '9.0'
16 | s.source_files = 'Sources/**/*.swift'
17 | s.frameworks = ['UIKit']
18 | end
19 |
--------------------------------------------------------------------------------
/TapticEngine.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | CE22A5511E9A767900E27AA6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE22A5501E9A767900E27AA6 /* UIKit.framework */; };
11 | CE9EC9231E9A7B9B0084FCC4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9EC9221E9A7B9B0084FCC4 /* AppDelegate.swift */; };
12 | CE9EC9251E9A7BA30084FCC4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9EC9241E9A7BA30084FCC4 /* ViewController.swift */; };
13 | CE9EC92A1E9A7BB00084FCC4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE9EC9261E9A7BB00084FCC4 /* LaunchScreen.storyboard */; };
14 | CE9EC92B1E9A7BB00084FCC4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE9EC9281E9A7BB00084FCC4 /* Main.storyboard */; };
15 | CE9EC9311E9A7BD60084FCC4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE9EC9301E9A7BD60084FCC4 /* Assets.xcassets */; };
16 | CE9EC9321E9A7BEA0084FCC4 /* TapticEngine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CED395991E9A6FBF0087D721 /* TapticEngine.framework */; };
17 | CE9EC9331E9A7BEA0084FCC4 /* TapticEngine.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CED395991E9A6FBF0087D721 /* TapticEngine.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | CED395A91E9A701E0087D721 /* TapticEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED395A81E9A701E0087D721 /* TapticEngine.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | CE9EC9341E9A7BEA0084FCC4 /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = CE7BF1401E9A6F1A00A4812F /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = CED395981E9A6FBF0087D721;
27 | remoteInfo = TapticEngine;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXCopyFilesBuildPhase section */
32 | CE9EC9361E9A7BEA0084FCC4 /* Embed Frameworks */ = {
33 | isa = PBXCopyFilesBuildPhase;
34 | buildActionMask = 2147483647;
35 | dstPath = "";
36 | dstSubfolderSpec = 10;
37 | files = (
38 | CE9EC9331E9A7BEA0084FCC4 /* TapticEngine.framework in Embed Frameworks */,
39 | );
40 | name = "Embed Frameworks";
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXCopyFilesBuildPhase section */
44 |
45 | /* Begin PBXFileReference section */
46 | CE22A5501E9A767900E27AA6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
47 | CE9EC9101E9A7A900084FCC4 /* TapticEngineDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TapticEngineDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
48 | CE9EC9221E9A7B9B0084FCC4 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
49 | CE9EC9241E9A7BA30084FCC4 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
50 | CE9EC9271E9A7BB00084FCC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
51 | CE9EC9291E9A7BB00084FCC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
52 | CE9EC92E1E9A7BC90084FCC4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | CE9EC9301E9A7BD60084FCC4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
54 | CED395991E9A6FBF0087D721 /* TapticEngine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TapticEngine.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55 | CED395A81E9A701E0087D721 /* TapticEngine.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TapticEngine.swift; path = Sources/TapticEngine/TapticEngine.swift; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | CE9EC90D1E9A7A900084FCC4 /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | CE9EC9321E9A7BEA0084FCC4 /* TapticEngine.framework in Frameworks */,
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | CED395951E9A6FBF0087D721 /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | CE22A5511E9A767900E27AA6 /* UIKit.framework in Frameworks */,
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | /* End PBXFrameworksBuildPhase section */
76 |
77 | /* Begin PBXGroup section */
78 | CE22A54F1E9A764100E27AA6 /* Frameworks */ = {
79 | isa = PBXGroup;
80 | children = (
81 | CE22A5501E9A767900E27AA6 /* UIKit.framework */,
82 | );
83 | name = Frameworks;
84 | sourceTree = "";
85 | };
86 | CE7BF13F1E9A6F1A00A4812F = {
87 | isa = PBXGroup;
88 | children = (
89 | CED395A61E9A6FF30087D721 /* Sources */,
90 | CE9EC9111E9A7A900084FCC4 /* TapticEngineDemo */,
91 | CE7BF1491E9A6F1A00A4812F /* Products */,
92 | CE22A54F1E9A764100E27AA6 /* Frameworks */,
93 | );
94 | sourceTree = "";
95 | };
96 | CE7BF1491E9A6F1A00A4812F /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | CED395991E9A6FBF0087D721 /* TapticEngine.framework */,
100 | CE9EC9101E9A7A900084FCC4 /* TapticEngineDemo.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | CE9EC9111E9A7A900084FCC4 /* TapticEngineDemo */ = {
106 | isa = PBXGroup;
107 | children = (
108 | CE9EC92E1E9A7BC90084FCC4 /* Info.plist */,
109 | CE9EC9221E9A7B9B0084FCC4 /* AppDelegate.swift */,
110 | CE9EC9241E9A7BA30084FCC4 /* ViewController.swift */,
111 | CE9EC9301E9A7BD60084FCC4 /* Assets.xcassets */,
112 | CE9EC9261E9A7BB00084FCC4 /* LaunchScreen.storyboard */,
113 | CE9EC9281E9A7BB00084FCC4 /* Main.storyboard */,
114 | );
115 | path = TapticEngineDemo;
116 | sourceTree = "";
117 | };
118 | CED395A61E9A6FF30087D721 /* Sources */ = {
119 | isa = PBXGroup;
120 | children = (
121 | CED395A71E9A6FFB0087D721 /* TapticEngine */,
122 | );
123 | name = Sources;
124 | sourceTree = "";
125 | };
126 | CED395A71E9A6FFB0087D721 /* TapticEngine */ = {
127 | isa = PBXGroup;
128 | children = (
129 | CED395A81E9A701E0087D721 /* TapticEngine.swift */,
130 | );
131 | name = TapticEngine;
132 | sourceTree = "";
133 | };
134 | /* End PBXGroup section */
135 |
136 | /* Begin PBXHeadersBuildPhase section */
137 | CED395961E9A6FBF0087D721 /* Headers */ = {
138 | isa = PBXHeadersBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | );
142 | runOnlyForDeploymentPostprocessing = 0;
143 | };
144 | /* End PBXHeadersBuildPhase section */
145 |
146 | /* Begin PBXNativeTarget section */
147 | CE9EC90F1E9A7A900084FCC4 /* TapticEngineDemo */ = {
148 | isa = PBXNativeTarget;
149 | buildConfigurationList = CE9EC91F1E9A7A900084FCC4 /* Build configuration list for PBXNativeTarget "TapticEngineDemo" */;
150 | buildPhases = (
151 | CE9EC90C1E9A7A900084FCC4 /* Sources */,
152 | CE9EC90D1E9A7A900084FCC4 /* Frameworks */,
153 | CE9EC90E1E9A7A900084FCC4 /* Resources */,
154 | CE9EC9361E9A7BEA0084FCC4 /* Embed Frameworks */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | CE9EC9351E9A7BEA0084FCC4 /* PBXTargetDependency */,
160 | );
161 | name = TapticEngineDemo;
162 | productName = TapticEngineDemo;
163 | productReference = CE9EC9101E9A7A900084FCC4 /* TapticEngineDemo.app */;
164 | productType = "com.apple.product-type.application";
165 | };
166 | CED395981E9A6FBF0087D721 /* TapticEngine */ = {
167 | isa = PBXNativeTarget;
168 | buildConfigurationList = CED395A21E9A6FBF0087D721 /* Build configuration list for PBXNativeTarget "TapticEngine" */;
169 | buildPhases = (
170 | CED395941E9A6FBF0087D721 /* Sources */,
171 | CED395951E9A6FBF0087D721 /* Frameworks */,
172 | CED395961E9A6FBF0087D721 /* Headers */,
173 | CED395971E9A6FBF0087D721 /* Resources */,
174 | );
175 | buildRules = (
176 | );
177 | dependencies = (
178 | );
179 | name = TapticEngine;
180 | productName = TapticEngine;
181 | productReference = CED395991E9A6FBF0087D721 /* TapticEngine.framework */;
182 | productType = "com.apple.product-type.framework";
183 | };
184 | /* End PBXNativeTarget section */
185 |
186 | /* Begin PBXProject section */
187 | CE7BF1401E9A6F1A00A4812F /* Project object */ = {
188 | isa = PBXProject;
189 | attributes = {
190 | LastSwiftUpdateCheck = 0830;
191 | LastUpgradeCheck = 0940;
192 | ORGANIZATIONNAME = "Keisuke Shoji";
193 | TargetAttributes = {
194 | CE9EC90F1E9A7A900084FCC4 = {
195 | CreatedOnToolsVersion = 8.3.1;
196 | DevelopmentTeam = S3LY459S86;
197 | ProvisioningStyle = Automatic;
198 | };
199 | CED395981E9A6FBF0087D721 = {
200 | CreatedOnToolsVersion = 8.3.1;
201 | DevelopmentTeam = S3LY459S86;
202 | LastSwiftMigration = 0830;
203 | ProvisioningStyle = Automatic;
204 | };
205 | };
206 | };
207 | buildConfigurationList = CE7BF1431E9A6F1A00A4812F /* Build configuration list for PBXProject "TapticEngine" */;
208 | compatibilityVersion = "Xcode 3.2";
209 | developmentRegion = English;
210 | hasScannedForEncodings = 0;
211 | knownRegions = (
212 | en,
213 | Base,
214 | );
215 | mainGroup = CE7BF13F1E9A6F1A00A4812F;
216 | productRefGroup = CE7BF1491E9A6F1A00A4812F /* Products */;
217 | projectDirPath = "";
218 | projectRoot = "";
219 | targets = (
220 | CED395981E9A6FBF0087D721 /* TapticEngine */,
221 | CE9EC90F1E9A7A900084FCC4 /* TapticEngineDemo */,
222 | );
223 | };
224 | /* End PBXProject section */
225 |
226 | /* Begin PBXResourcesBuildPhase section */
227 | CE9EC90E1E9A7A900084FCC4 /* Resources */ = {
228 | isa = PBXResourcesBuildPhase;
229 | buildActionMask = 2147483647;
230 | files = (
231 | CE9EC92B1E9A7BB00084FCC4 /* Main.storyboard in Resources */,
232 | CE9EC9311E9A7BD60084FCC4 /* Assets.xcassets in Resources */,
233 | CE9EC92A1E9A7BB00084FCC4 /* LaunchScreen.storyboard in Resources */,
234 | );
235 | runOnlyForDeploymentPostprocessing = 0;
236 | };
237 | CED395971E9A6FBF0087D721 /* Resources */ = {
238 | isa = PBXResourcesBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | );
242 | runOnlyForDeploymentPostprocessing = 0;
243 | };
244 | /* End PBXResourcesBuildPhase section */
245 |
246 | /* Begin PBXSourcesBuildPhase section */
247 | CE9EC90C1E9A7A900084FCC4 /* Sources */ = {
248 | isa = PBXSourcesBuildPhase;
249 | buildActionMask = 2147483647;
250 | files = (
251 | CE9EC9251E9A7BA30084FCC4 /* ViewController.swift in Sources */,
252 | CE9EC9231E9A7B9B0084FCC4 /* AppDelegate.swift in Sources */,
253 | );
254 | runOnlyForDeploymentPostprocessing = 0;
255 | };
256 | CED395941E9A6FBF0087D721 /* Sources */ = {
257 | isa = PBXSourcesBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | CED395A91E9A701E0087D721 /* TapticEngine.swift in Sources */,
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | };
264 | /* End PBXSourcesBuildPhase section */
265 |
266 | /* Begin PBXTargetDependency section */
267 | CE9EC9351E9A7BEA0084FCC4 /* PBXTargetDependency */ = {
268 | isa = PBXTargetDependency;
269 | target = CED395981E9A6FBF0087D721 /* TapticEngine */;
270 | targetProxy = CE9EC9341E9A7BEA0084FCC4 /* PBXContainerItemProxy */;
271 | };
272 | /* End PBXTargetDependency section */
273 |
274 | /* Begin PBXVariantGroup section */
275 | CE9EC9261E9A7BB00084FCC4 /* LaunchScreen.storyboard */ = {
276 | isa = PBXVariantGroup;
277 | children = (
278 | CE9EC9271E9A7BB00084FCC4 /* Base */,
279 | );
280 | name = LaunchScreen.storyboard;
281 | sourceTree = "";
282 | };
283 | CE9EC9281E9A7BB00084FCC4 /* Main.storyboard */ = {
284 | isa = PBXVariantGroup;
285 | children = (
286 | CE9EC9291E9A7BB00084FCC4 /* Base */,
287 | );
288 | name = Main.storyboard;
289 | sourceTree = "";
290 | };
291 | /* End PBXVariantGroup section */
292 |
293 | /* Begin XCBuildConfiguration section */
294 | CE7BF1581E9A6F1A00A4812F /* Debug */ = {
295 | isa = XCBuildConfiguration;
296 | buildSettings = {
297 | ALWAYS_SEARCH_USER_PATHS = NO;
298 | CLANG_ANALYZER_NONNULL = YES;
299 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
301 | CLANG_CXX_LIBRARY = "libc++";
302 | CLANG_ENABLE_MODULES = YES;
303 | CLANG_ENABLE_OBJC_ARC = YES;
304 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
305 | CLANG_WARN_BOOL_CONVERSION = YES;
306 | CLANG_WARN_COMMA = YES;
307 | CLANG_WARN_CONSTANT_CONVERSION = YES;
308 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
310 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
311 | CLANG_WARN_EMPTY_BODY = YES;
312 | CLANG_WARN_ENUM_CONVERSION = YES;
313 | CLANG_WARN_INFINITE_RECURSION = YES;
314 | CLANG_WARN_INT_CONVERSION = YES;
315 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
316 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
317 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
318 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
319 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
320 | CLANG_WARN_STRICT_PROTOTYPES = YES;
321 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
322 | CLANG_WARN_UNREACHABLE_CODE = YES;
323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
324 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
325 | COPY_PHASE_STRIP = NO;
326 | DEBUG_INFORMATION_FORMAT = dwarf;
327 | ENABLE_STRICT_OBJC_MSGSEND = YES;
328 | ENABLE_TESTABILITY = YES;
329 | GCC_C_LANGUAGE_STANDARD = gnu99;
330 | GCC_DYNAMIC_NO_PIC = NO;
331 | GCC_NO_COMMON_BLOCKS = YES;
332 | GCC_OPTIMIZATION_LEVEL = 0;
333 | GCC_PREPROCESSOR_DEFINITIONS = (
334 | "DEBUG=1",
335 | "$(inherited)",
336 | );
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
344 | MTL_ENABLE_DEBUG_INFO = YES;
345 | ONLY_ACTIVE_ARCH = YES;
346 | SDKROOT = iphoneos;
347 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
348 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
349 | TARGETED_DEVICE_FAMILY = "1,2";
350 | };
351 | name = Debug;
352 | };
353 | CE7BF1591E9A6F1A00A4812F /* Release */ = {
354 | isa = XCBuildConfiguration;
355 | buildSettings = {
356 | ALWAYS_SEARCH_USER_PATHS = NO;
357 | CLANG_ANALYZER_NONNULL = YES;
358 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
360 | CLANG_CXX_LIBRARY = "libc++";
361 | CLANG_ENABLE_MODULES = YES;
362 | CLANG_ENABLE_OBJC_ARC = YES;
363 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
364 | CLANG_WARN_BOOL_CONVERSION = YES;
365 | CLANG_WARN_COMMA = YES;
366 | CLANG_WARN_CONSTANT_CONVERSION = YES;
367 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
368 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
369 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
370 | CLANG_WARN_EMPTY_BODY = YES;
371 | CLANG_WARN_ENUM_CONVERSION = YES;
372 | CLANG_WARN_INFINITE_RECURSION = YES;
373 | CLANG_WARN_INT_CONVERSION = YES;
374 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
375 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
376 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
377 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
378 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
379 | CLANG_WARN_STRICT_PROTOTYPES = YES;
380 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
381 | CLANG_WARN_UNREACHABLE_CODE = YES;
382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
383 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
384 | COPY_PHASE_STRIP = NO;
385 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
386 | ENABLE_NS_ASSERTIONS = NO;
387 | ENABLE_STRICT_OBJC_MSGSEND = YES;
388 | GCC_C_LANGUAGE_STANDARD = gnu99;
389 | GCC_NO_COMMON_BLOCKS = YES;
390 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
392 | GCC_WARN_UNDECLARED_SELECTOR = YES;
393 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
394 | GCC_WARN_UNUSED_FUNCTION = YES;
395 | GCC_WARN_UNUSED_VARIABLE = YES;
396 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
397 | MTL_ENABLE_DEBUG_INFO = NO;
398 | SDKROOT = iphoneos;
399 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
400 | TARGETED_DEVICE_FAMILY = "1,2";
401 | VALIDATE_PRODUCT = YES;
402 | };
403 | name = Release;
404 | };
405 | CE9EC9201E9A7A900084FCC4 /* Debug */ = {
406 | isa = XCBuildConfiguration;
407 | buildSettings = {
408 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
409 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
410 | INFOPLIST_FILE = TapticEngineDemo/Info.plist;
411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
412 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.TapticEngineDemo;
413 | PRODUCT_NAME = "$(TARGET_NAME)";
414 | SWIFT_VERSION = 4.0;
415 | };
416 | name = Debug;
417 | };
418 | CE9EC9211E9A7A900084FCC4 /* Release */ = {
419 | isa = XCBuildConfiguration;
420 | buildSettings = {
421 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
422 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
423 | INFOPLIST_FILE = TapticEngineDemo/Info.plist;
424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
425 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.TapticEngineDemo;
426 | PRODUCT_NAME = "$(TARGET_NAME)";
427 | SWIFT_VERSION = 4.0;
428 | };
429 | name = Release;
430 | };
431 | CED395A31E9A6FBF0087D721 /* Debug */ = {
432 | isa = XCBuildConfiguration;
433 | buildSettings = {
434 | CLANG_ENABLE_MODULES = YES;
435 | CODE_SIGN_IDENTITY = "";
436 | CURRENT_PROJECT_VERSION = 1;
437 | DEFINES_MODULE = YES;
438 | DYLIB_COMPATIBILITY_VERSION = 1;
439 | DYLIB_CURRENT_VERSION = 1;
440 | DYLIB_INSTALL_NAME_BASE = "@rpath";
441 | INFOPLIST_FILE = Info.plist;
442 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
443 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
444 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.TapticEngine;
445 | PRODUCT_NAME = "$(TARGET_NAME)";
446 | SKIP_INSTALL = YES;
447 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
448 | SWIFT_VERSION = 4.0;
449 | VERSIONING_SYSTEM = "apple-generic";
450 | VERSION_INFO_PREFIX = "";
451 | };
452 | name = Debug;
453 | };
454 | CED395A41E9A6FBF0087D721 /* Release */ = {
455 | isa = XCBuildConfiguration;
456 | buildSettings = {
457 | CLANG_ENABLE_MODULES = YES;
458 | CODE_SIGN_IDENTITY = "";
459 | CURRENT_PROJECT_VERSION = 1;
460 | DEFINES_MODULE = YES;
461 | DYLIB_COMPATIBILITY_VERSION = 1;
462 | DYLIB_CURRENT_VERSION = 1;
463 | DYLIB_INSTALL_NAME_BASE = "@rpath";
464 | INFOPLIST_FILE = Info.plist;
465 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
467 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.TapticEngine;
468 | PRODUCT_NAME = "$(TARGET_NAME)";
469 | SKIP_INSTALL = YES;
470 | SWIFT_VERSION = 4.0;
471 | VERSIONING_SYSTEM = "apple-generic";
472 | VERSION_INFO_PREFIX = "";
473 | };
474 | name = Release;
475 | };
476 | /* End XCBuildConfiguration section */
477 |
478 | /* Begin XCConfigurationList section */
479 | CE7BF1431E9A6F1A00A4812F /* Build configuration list for PBXProject "TapticEngine" */ = {
480 | isa = XCConfigurationList;
481 | buildConfigurations = (
482 | CE7BF1581E9A6F1A00A4812F /* Debug */,
483 | CE7BF1591E9A6F1A00A4812F /* Release */,
484 | );
485 | defaultConfigurationIsVisible = 0;
486 | defaultConfigurationName = Release;
487 | };
488 | CE9EC91F1E9A7A900084FCC4 /* Build configuration list for PBXNativeTarget "TapticEngineDemo" */ = {
489 | isa = XCConfigurationList;
490 | buildConfigurations = (
491 | CE9EC9201E9A7A900084FCC4 /* Debug */,
492 | CE9EC9211E9A7A900084FCC4 /* Release */,
493 | );
494 | defaultConfigurationIsVisible = 0;
495 | defaultConfigurationName = Release;
496 | };
497 | CED395A21E9A6FBF0087D721 /* Build configuration list for PBXNativeTarget "TapticEngine" */ = {
498 | isa = XCConfigurationList;
499 | buildConfigurations = (
500 | CED395A31E9A6FBF0087D721 /* Debug */,
501 | CED395A41E9A6FBF0087D721 /* Release */,
502 | );
503 | defaultConfigurationIsVisible = 0;
504 | defaultConfigurationName = Release;
505 | };
506 | /* End XCConfigurationList section */
507 | };
508 | rootObject = CE7BF1401E9A6F1A00A4812F /* Project object */;
509 | }
510 |
--------------------------------------------------------------------------------
/TapticEngine.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TapticEngine.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TapticEngine.xcodeproj/xcshareddata/xcschemes/TapticEngine.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/TapticEngineDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // TapticEngineDemo
4 | //
5 | // Created by Keisuke Shoji on 2017/04/09.
6 | // Copyright © 2017年 Keisuke Shoji. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 | }
16 |
--------------------------------------------------------------------------------
/TapticEngineDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/TapticEngineDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TapticEngineDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
31 |
38 |
45 |
52 |
59 |
66 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/TapticEngineDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/TapticEngineDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // TapticEngineDemo
4 | //
5 | // Created by Keisuke Shoji on 2017/04/09.
6 | // Copyright © 2017年 Keisuke Shoji. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import TapticEngine
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBAction private func light() {
15 | TapticEngine.impact.feedback(.light)
16 | }
17 |
18 | @IBAction private func medium() {
19 | TapticEngine.impact.feedback(.medium)
20 | }
21 |
22 | @IBAction private func heavy() {
23 | TapticEngine.impact.feedback(.heavy)
24 | }
25 |
26 | @IBAction private func selection() {
27 | TapticEngine.selection.feedback()
28 | }
29 |
30 | @IBAction private func success() {
31 | TapticEngine.notification.feedback(.success)
32 | }
33 |
34 | @IBAction private func warning() {
35 | TapticEngine.notification.feedback(.warning)
36 | }
37 |
38 | @IBAction private func error() {
39 | TapticEngine.notification.feedback(.error)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/images/taptic_engine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WorldDownTown/TapticEngine/bd95a0b1add329190218b4c8b1eb3870755ee255/images/taptic_engine.png
--------------------------------------------------------------------------------