diff --git a/plugins/geolocation/android/src/main/java/Geolocation.kt b/plugins/geolocation/android/src/main/java/Geolocation.kt index 444711a4c..f93d23071 100644 --- a/plugins/geolocation/android/src/main/java/Geolocation.kt +++ b/plugins/geolocation/android/src/main/java/Geolocation.kt @@ -49,8 +49,6 @@ public class Geolocation(private val context: Context) { val lowPrio = if (networkEnabled) Priority.PRIORITY_BALANCED_POWER_ACCURACY else Priority.PRIORITY_LOW_POWER val prio = if (enableHighAccuracy) Priority.PRIORITY_HIGH_ACCURACY else lowPrio - Logger.error(prio.toString()) - LocationServices .getFusedLocationProviderClient(context) .getCurrentLocation(prio, null) diff --git a/plugins/haptics/ios/Sources/HapticsPlugin.swift b/plugins/haptics/ios/Sources/HapticsPlugin.swift index 96e3f2758..4889c8adf 100644 --- a/plugins/haptics/ios/Sources/HapticsPlugin.swift +++ b/plugins/haptics/ios/Sources/HapticsPlugin.swift @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import AudioToolbox +import CoreHaptics import SwiftRs import Tauri import UIKit import WebKit -import CoreHaptics -import AudioToolbox class ImpactFeedbackOptions: Decodable { let style: ImpactFeedbackStyle @@ -69,19 +69,21 @@ class HapticsPlugin: Plugin { try engine.start() engine.resetHandler = { [] in do { - try engine.start() + try engine.start() } catch { AudioServicesPlayAlertSound(kSystemSoundID_Vibrate) } } // TODO: Make some of this (or all) configurable? - let intensity: CHHapticEventParameter = CHHapticEventParameter(parameterID: .hapticIntensity, value: 1.0) - let sharpness: CHHapticEventParameter = CHHapticEventParameter(parameterID: .hapticSharpness, value: 1.0) + let intensity: CHHapticEventParameter = CHHapticEventParameter( + parameterID: .hapticIntensity, value: 1.0) + let sharpness: CHHapticEventParameter = CHHapticEventParameter( + parameterID: .hapticSharpness, value: 1.0) let continuousEvent = CHHapticEvent( eventType: .hapticContinuous, parameters: [intensity, sharpness], relativeTime: 0.0, - duration: args.duration/1000 + duration: args.duration / 1000 ) let pattern = try CHHapticPattern(events: [continuousEvent], parameters: []) let player = try engine.makePlayer(with: pattern) @@ -94,8 +96,6 @@ class HapticsPlugin: Plugin { AudioServicesPlayAlertSound(kSystemSoundID_Vibrate) } - Logger.error("VIBRATE END") - invoke.resolve() }