Skip to content

Commit d249b98

Browse files
committed
[macos] Support macOS Mojave
1 parent 8dc576d commit d249b98

9 files changed

Lines changed: 20 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.0
2+
3+
- Support macOS Mojave.
4+
15
## 0.0.2
26

37
- Support windows platform.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Add this to your package's pubspec.yaml file:
4141

4242
```yaml
4343
dependencies:
44-
screen_retriever: ^0.0.2
44+
screen_retriever: ^0.1.0
4545
```
4646
4747
Or

example/macos/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :osx, '10.15'
1+
platform :osx, '10.11'
22

33
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
44
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/macos/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ SPEC CHECKSUMS:
2828
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
2929
HotKey: ad59450195936c10992438c4210f673de5aee43e
3030
hotkey_manager: ad673457691f4d39e481be04a61da2ae07d81c62
31-
screen_retriever: d6f298ba1597d1afe486277b4068cd46045339ed
31+
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
3232

33-
PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0
33+
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
3434

35-
COCOAPODS: 1.10.1
35+
COCOAPODS: 1.11.2

example/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@
403403
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404404
GCC_WARN_UNUSED_FUNCTION = YES;
405405
GCC_WARN_UNUSED_VARIABLE = YES;
406-
MACOSX_DEPLOYMENT_TARGET = 10.15;
406+
MACOSX_DEPLOYMENT_TARGET = 10.11;
407407
MTL_ENABLE_DEBUG_INFO = NO;
408408
SDKROOT = macosx;
409409
SWIFT_COMPILATION_MODE = wholemodule;
@@ -482,7 +482,7 @@
482482
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
483483
GCC_WARN_UNUSED_FUNCTION = YES;
484484
GCC_WARN_UNUSED_VARIABLE = YES;
485-
MACOSX_DEPLOYMENT_TARGET = 10.15;
485+
MACOSX_DEPLOYMENT_TARGET = 10.11;
486486
MTL_ENABLE_DEBUG_INFO = YES;
487487
ONLY_ACTIVE_ARCH = YES;
488488
SDKROOT = macosx;
@@ -529,7 +529,7 @@
529529
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
530530
GCC_WARN_UNUSED_FUNCTION = YES;
531531
GCC_WARN_UNUSED_VARIABLE = YES;
532-
MACOSX_DEPLOYMENT_TARGET = 10.15;
532+
MACOSX_DEPLOYMENT_TARGET = 10.11;
533533
MTL_ENABLE_DEBUG_INFO = NO;
534534
SDKROOT = macosx;
535535
SWIFT_COMPILATION_MODE = wholemodule;

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ packages:
134134
path: ".."
135135
relative: true
136136
source: path
137-
version: "0.0.1"
137+
version: "0.1.0"
138138
sky_engine:
139139
dependency: transitive
140140
description: flutter

macos/Classes/ScreenRetrieverPlugin.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ public class ScreenRetrieverPlugin: NSObject, FlutterPlugin {
4141
"height": screen.frame.height,
4242
]
4343

44+
var name: String = "";
45+
if #available(macOS 10.15, *) {
46+
name = screen.localizedName
47+
}
4448
let dict: NSDictionary = [
4549
"id": screen.displayID,
46-
"name": screen.localizedName,
50+
"name": name,
4751
"size": size,
4852
]
4953
return dict;

macos/screen_retriever.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A new flutter plugin project.
1616
s.source_files = 'Classes/**/*'
1717
s.dependency 'FlutterMacOS'
1818

19-
s.platform = :osx, '10.15'
19+
s.platform = :osx, '10.11'
2020
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2121
s.swift_version = '5.0'
2222
end

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: screen_retriever
22
description: This plugin allows Flutter **desktop** apps to Retrieve information about screen size, displays, cursor position, etc.
3-
version: 0.0.2
3+
version: 0.1.0
44
homepage: https://github.com/leanflutter/screen_retriever
55

66
environment:

0 commit comments

Comments
 (0)