Skip to content

Commit

Permalink
Improve iOS thread safety
Browse files Browse the repository at this point in the history
  • Loading branch information
gdelataillade committed Oct 4, 2024
1 parent 9d8f640 commit d996dda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Classes/SwiftAlarmPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public class SwiftAlarmPlugin: NSObject, FlutterPlugin {

func safeModifyResources(_ modificationBlock: @escaping () -> Void) {
resourceAccessQueue.async {
modificationBlock()
DispatchQueue.main.async {
modificationBlock()
}
}
}

Expand Down

0 comments on commit d996dda

Please sign in to comment.