diff --git a/ios/Classes/SwiftAlarmPlugin.swift b/ios/Classes/SwiftAlarmPlugin.swift index 1c08e09c..0f6761db 100644 --- a/ios/Classes/SwiftAlarmPlugin.swift +++ b/ios/Classes/SwiftAlarmPlugin.swift @@ -81,7 +81,9 @@ public class SwiftAlarmPlugin: NSObject, FlutterPlugin { func safeModifyResources(_ modificationBlock: @escaping () -> Void) { resourceAccessQueue.async { - modificationBlock() + DispatchQueue.main.async { + modificationBlock() + } } }