Skip to content

Commit

Permalink
Add comment why we don't use CADisplayLink in macos
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor committed Jun 25, 2024
1 parent a8adfae commit 736bafc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flutter/ios/Classes/SentryFlutterPluginApple.swift
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin {
}
#elseif os(macOS)
private func displayRefreshRate(_ result: @escaping FlutterResult) {
// We don't use CADisplayLink for macOS because it's only available starting with macOS 14
guard let window = NSApplication.shared.keyWindow else {
result(nil)
return
Expand All @@ -698,7 +699,7 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin {
return
}

guard let displayID =
guard let displayID =
screen.deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")] as? CGDirectDisplayID else {
result(nil)
return
Expand Down

0 comments on commit 736bafc

Please sign in to comment.