Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.5

* Replaces TARGET_OS_SIMULATOR check with targetEnvironment(simulator)

## 1.3.0

* Fixing swift version
Expand Down
10 changes: 8 additions & 2 deletions ios/Classes/SwiftVibratePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import Flutter
import UIKit
import AudioToolbox

private let isDevice = TARGET_OS_SIMULATOR == 0

private let isDevice = {
#if targetEnvironment(simulator)
return false
#else
return true
#endif
}()

public class SwiftVibratePlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "vibrate", binaryMessenger: registrar.messenger())
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_vibrate
description: A Haptic Feedback plugin.
version: 1.3.0
version: 1.3.5
environment:
sdk: '>=2.12.0 <3.0.0'
flutter: ^1.10.0
Expand Down