Skip to content

Commit 05cef82

Browse files
committed
Migrate to Swift 5
Signed-off-by: Jingwen Peng <[email protected]>
1 parent 458a6e9 commit 05cef82

24 files changed

+227
-245
lines changed

BingPaper.xcodeproj/project.pbxproj

+61-73
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
7082E9B74124607292FF75C4 /* Pods_BingPaperTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BingPaperTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6767
7602FDFC1B522F8000E6EC7D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/StatusBarView.xib; sourceTree = "<group>"; };
6868
7602FE021B526EC900E6EC7D /* BingPictureManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BingPictureManager.swift; sourceTree = "<group>"; };
69-
7602FE041B52961D00E6EC7D /* BingPaper.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = BingPaper.playground; sourceTree = "<group>"; };
69+
7602FE041B52961D00E6EC7D /* BingPaper.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = BingPaper.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
7070
761A8E8D1DAA402100C69356 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/GeneralPreferencesView.strings"; sourceTree = "<group>"; };
7171
761FBF5D1DA7824F00F4409E /* BingPaperLoginItem.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BingPaperLoginItem.app; sourceTree = BUILT_PRODUCTS_DIR; };
7272
761FBF5F1DA7824F00F4409E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -353,7 +353,6 @@
353353
763C22A21AB2DCC000BACA07 /* Resources */,
354354
761FBF331DA780AB00F4409E /* CopyFiles */,
355355
2748003AFB0F47C15CA172C2 /* [CP] Embed Pods Frameworks */,
356-
A04A85D975CD436987AA0E30 /* [CP] Copy Pods Resources */,
357356
);
358357
buildRules = (
359358
);
@@ -372,8 +371,6 @@
372371
763C22B21AB2DCC000BACA07 /* Sources */,
373372
763C22B31AB2DCC000BACA07 /* Frameworks */,
374373
763C22B41AB2DCC000BACA07 /* Resources */,
375-
B06DFCBAA05E19845E7479C1 /* [CP] Embed Pods Frameworks */,
376-
C9BDBDC04FC4D8933F5B9CDB /* [CP] Copy Pods Resources */,
377374
);
378375
buildRules = (
379376
);
@@ -393,12 +390,11 @@
393390
attributes = {
394391
LastSwiftMigration = 0730;
395392
LastSwiftUpdateCheck = 0800;
396-
LastUpgradeCheck = 0800;
393+
LastUpgradeCheck = 1140;
397394
ORGANIZATIONNAME = "Peng Jingwen";
398395
TargetAttributes = {
399396
761FBF5C1DA7824F00F4409E = {
400397
CreatedOnToolsVersion = 8.0;
401-
DevelopmentTeam = RTLZDJ5FTU;
402398
ProvisioningStyle = Automatic;
403399
SystemCapabilities = {
404400
com.apple.Sandbox = {
@@ -413,7 +409,6 @@
413409
};
414410
763C22A31AB2DCC000BACA07 = {
415411
CreatedOnToolsVersion = 6.2;
416-
DevelopmentTeam = RTLZDJ5FTU;
417412
LastSwiftMigration = 0800;
418413
ProvisioningStyle = Automatic;
419414
SystemCapabilities = {
@@ -437,6 +432,7 @@
437432
developmentRegion = English;
438433
hasScannedForEncodings = 0;
439434
knownRegions = (
435+
English,
440436
en,
441437
Base,
442438
"zh-Hans",
@@ -500,13 +496,16 @@
500496
files = (
501497
);
502498
inputPaths = (
499+
"${PODS_ROOT}/Target Support Files/Pods-BingPaper/Pods-BingPaper-frameworks.sh",
500+
"${BUILT_PRODUCTS_DIR}/MASPreferences/MASPreferences.framework",
503501
);
504502
name = "[CP] Embed Pods Frameworks";
505503
outputPaths = (
504+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MASPreferences.framework",
506505
);
507506
runOnlyForDeploymentPostprocessing = 0;
508507
shellPath = /bin/sh;
509-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BingPaper/Pods-BingPaper-frameworks.sh\"\n";
508+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BingPaper/Pods-BingPaper-frameworks.sh\"\n";
510509
showEnvVarsInLog = 0;
511510
};
512511
605B15CE0A3F8E4E44964224 /* [CP] Check Pods Manifest.lock */ = {
@@ -515,13 +514,16 @@
515514
files = (
516515
);
517516
inputPaths = (
517+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
518+
"${PODS_ROOT}/Manifest.lock",
518519
);
519520
name = "[CP] Check Pods Manifest.lock";
520521
outputPaths = (
522+
"$(DERIVED_FILE_DIR)/Pods-BingPaper-checkManifestLockResult.txt",
521523
);
522524
runOnlyForDeploymentPostprocessing = 0;
523525
shellPath = /bin/sh;
524-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
526+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
525527
showEnvVarsInLog = 0;
526528
};
527529
889E05C623D0AA8A26C3554A /* [CP] Check Pods Manifest.lock */ = {
@@ -530,58 +532,16 @@
530532
files = (
531533
);
532534
inputPaths = (
535+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
536+
"${PODS_ROOT}/Manifest.lock",
533537
);
534538
name = "[CP] Check Pods Manifest.lock";
535539
outputPaths = (
540+
"$(DERIVED_FILE_DIR)/Pods-BingPaperTests-checkManifestLockResult.txt",
536541
);
537542
runOnlyForDeploymentPostprocessing = 0;
538543
shellPath = /bin/sh;
539-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
540-
showEnvVarsInLog = 0;
541-
};
542-
A04A85D975CD436987AA0E30 /* [CP] Copy Pods Resources */ = {
543-
isa = PBXShellScriptBuildPhase;
544-
buildActionMask = 2147483647;
545-
files = (
546-
);
547-
inputPaths = (
548-
);
549-
name = "[CP] Copy Pods Resources";
550-
outputPaths = (
551-
);
552-
runOnlyForDeploymentPostprocessing = 0;
553-
shellPath = /bin/sh;
554-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BingPaper/Pods-BingPaper-resources.sh\"\n";
555-
showEnvVarsInLog = 0;
556-
};
557-
B06DFCBAA05E19845E7479C1 /* [CP] Embed Pods Frameworks */ = {
558-
isa = PBXShellScriptBuildPhase;
559-
buildActionMask = 2147483647;
560-
files = (
561-
);
562-
inputPaths = (
563-
);
564-
name = "[CP] Embed Pods Frameworks";
565-
outputPaths = (
566-
);
567-
runOnlyForDeploymentPostprocessing = 0;
568-
shellPath = /bin/sh;
569-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BingPaperTests/Pods-BingPaperTests-frameworks.sh\"\n";
570-
showEnvVarsInLog = 0;
571-
};
572-
C9BDBDC04FC4D8933F5B9CDB /* [CP] Copy Pods Resources */ = {
573-
isa = PBXShellScriptBuildPhase;
574-
buildActionMask = 2147483647;
575-
files = (
576-
);
577-
inputPaths = (
578-
);
579-
name = "[CP] Copy Pods Resources";
580-
outputPaths = (
581-
);
582-
runOnlyForDeploymentPostprocessing = 0;
583-
shellPath = /bin/sh;
584-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BingPaperTests/Pods-BingPaperTests-resources.sh\"\n";
544+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
585545
showEnvVarsInLog = 0;
586546
};
587547
/* End PBXShellScriptBuildPhase section */
@@ -701,16 +661,19 @@
701661
CODE_SIGN_ENTITLEMENTS = BingPaperLoginItemTests/BingPaperLoginItem.entitlements;
702662
CODE_SIGN_IDENTITY = "Mac Developer";
703663
COMBINE_HIDPI_IMAGES = YES;
664+
CURRENT_PROJECT_VERSION = 45;
704665
DEBUG_INFORMATION_FORMAT = dwarf;
705-
DEVELOPMENT_TEAM = RTLZDJ5FTU;
666+
DEVELOPMENT_TEAM = 9AXW95X4H5;
667+
ENABLE_HARDENED_RUNTIME = YES;
706668
INFOPLIST_FILE = BingPaperLoginItem/Info.plist;
707669
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
708-
MACOSX_DEPLOYMENT_TARGET = 10.10;
709-
PRODUCT_BUNDLE_IDENTIFIER = com.prettyxw.mac.BingPaperLoginItem;
670+
MACOSX_DEPLOYMENT_TARGET = 10.15;
671+
MARKETING_VERSION = 0.10.1;
672+
PRODUCT_BUNDLE_IDENTIFIER = io.pjw.mac.BingPaperLoginItem;
710673
PRODUCT_NAME = "$(TARGET_NAME)";
711674
SKIP_INSTALL = YES;
712675
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
713-
SWIFT_VERSION = 3.0;
676+
SWIFT_VERSION = 5.0;
714677
};
715678
name = Debug;
716679
};
@@ -724,14 +687,17 @@
724687
CODE_SIGN_ENTITLEMENTS = BingPaperLoginItemTests/BingPaperLoginItem.entitlements;
725688
CODE_SIGN_IDENTITY = "Mac Developer";
726689
COMBINE_HIDPI_IMAGES = YES;
727-
DEVELOPMENT_TEAM = RTLZDJ5FTU;
690+
CURRENT_PROJECT_VERSION = 45;
691+
DEVELOPMENT_TEAM = 9AXW95X4H5;
692+
ENABLE_HARDENED_RUNTIME = YES;
728693
INFOPLIST_FILE = BingPaperLoginItem/Info.plist;
729694
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
730-
MACOSX_DEPLOYMENT_TARGET = 10.10;
731-
PRODUCT_BUNDLE_IDENTIFIER = com.prettyxw.mac.BingPaperLoginItem;
695+
MACOSX_DEPLOYMENT_TARGET = 10.15;
696+
MARKETING_VERSION = 0.10.1;
697+
PRODUCT_BUNDLE_IDENTIFIER = io.pjw.mac.BingPaperLoginItem;
732698
PRODUCT_NAME = "$(TARGET_NAME)";
733699
SKIP_INSTALL = YES;
734-
SWIFT_VERSION = 3.0;
700+
SWIFT_VERSION = 5.0;
735701
};
736702
name = Release;
737703
};
@@ -784,14 +750,22 @@
784750
CLANG_CXX_LIBRARY = "libc++";
785751
CLANG_ENABLE_MODULES = YES;
786752
CLANG_ENABLE_OBJC_ARC = YES;
753+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
787754
CLANG_WARN_BOOL_CONVERSION = YES;
755+
CLANG_WARN_COMMA = YES;
788756
CLANG_WARN_CONSTANT_CONVERSION = YES;
757+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
789758
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
790759
CLANG_WARN_EMPTY_BODY = YES;
791760
CLANG_WARN_ENUM_CONVERSION = YES;
792761
CLANG_WARN_INFINITE_RECURSION = YES;
793762
CLANG_WARN_INT_CONVERSION = YES;
763+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
764+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
765+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
794766
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
767+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
768+
CLANG_WARN_STRICT_PROTOTYPES = YES;
795769
CLANG_WARN_SUSPICIOUS_MOVE = YES;
796770
CLANG_WARN_UNREACHABLE_CODE = YES;
797771
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -831,14 +805,22 @@
831805
CLANG_CXX_LIBRARY = "libc++";
832806
CLANG_ENABLE_MODULES = YES;
833807
CLANG_ENABLE_OBJC_ARC = YES;
808+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
834809
CLANG_WARN_BOOL_CONVERSION = YES;
810+
CLANG_WARN_COMMA = YES;
835811
CLANG_WARN_CONSTANT_CONVERSION = YES;
812+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
836813
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
837814
CLANG_WARN_EMPTY_BODY = YES;
838815
CLANG_WARN_ENUM_CONVERSION = YES;
839816
CLANG_WARN_INFINITE_RECURSION = YES;
840817
CLANG_WARN_INT_CONVERSION = YES;
818+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
819+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
820+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
841821
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
822+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
823+
CLANG_WARN_STRICT_PROTOTYPES = YES;
842824
CLANG_WARN_SUSPICIOUS_MOVE = YES;
843825
CLANG_WARN_UNREACHABLE_CODE = YES;
844826
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -868,15 +850,17 @@
868850
buildSettings = {
869851
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon Bing";
870852
CODE_SIGN_ENTITLEMENTS = BingPaper/BingPaper.entitlements;
871-
CODE_SIGN_IDENTITY = "";
853+
CODE_SIGN_IDENTITY = "Apple Development";
872854
COMBINE_HIDPI_IMAGES = YES;
873-
DEVELOPMENT_TEAM = RTLZDJ5FTU;
855+
CURRENT_PROJECT_VERSION = 45;
856+
DEVELOPMENT_TEAM = 9AXW95X4H5;
874857
INFOPLIST_FILE = BingPaper/Info.plist;
875858
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
876-
MACOSX_DEPLOYMENT_TARGET = 10.10;
877-
PRODUCT_BUNDLE_IDENTIFIER = "com.prettyxw.mac.$(PRODUCT_NAME:rfc1034identifier)";
859+
MACOSX_DEPLOYMENT_TARGET = 10.15;
860+
MARKETING_VERSION = 0.10.1;
861+
PRODUCT_BUNDLE_IDENTIFIER = io.pjw.mac.BingPaper;
878862
PRODUCT_NAME = "$(TARGET_NAME)";
879-
SWIFT_VERSION = 3.0;
863+
SWIFT_VERSION = 5.0;
880864
};
881865
name = Debug;
882866
};
@@ -886,15 +870,17 @@
886870
buildSettings = {
887871
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon Bing";
888872
CODE_SIGN_ENTITLEMENTS = BingPaper/BingPaper.entitlements;
889-
CODE_SIGN_IDENTITY = "";
873+
CODE_SIGN_IDENTITY = "Apple Development";
890874
COMBINE_HIDPI_IMAGES = YES;
891-
DEVELOPMENT_TEAM = RTLZDJ5FTU;
875+
CURRENT_PROJECT_VERSION = 45;
876+
DEVELOPMENT_TEAM = 9AXW95X4H5;
892877
INFOPLIST_FILE = BingPaper/Info.plist;
893878
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
894-
MACOSX_DEPLOYMENT_TARGET = 10.10;
895-
PRODUCT_BUNDLE_IDENTIFIER = "com.prettyxw.mac.$(PRODUCT_NAME:rfc1034identifier)";
879+
MACOSX_DEPLOYMENT_TARGET = 10.15;
880+
MARKETING_VERSION = 0.10.1;
881+
PRODUCT_BUNDLE_IDENTIFIER = io.pjw.mac.BingPaper;
896882
PRODUCT_NAME = "$(TARGET_NAME)";
897-
SWIFT_VERSION = 3.0;
883+
SWIFT_VERSION = 5.0;
898884
};
899885
name = Release;
900886
};
@@ -903,6 +889,7 @@
903889
baseConfigurationReference = F28A1DC1EC2F3D8A4E2CD43D /* Pods-BingPaperTests.debug.xcconfig */;
904890
buildSettings = {
905891
BUNDLE_LOADER = "$(TEST_HOST)";
892+
CODE_SIGN_IDENTITY = "-";
906893
COMBINE_HIDPI_IMAGES = YES;
907894
FRAMEWORK_SEARCH_PATHS = (
908895
"$(DEVELOPER_FRAMEWORKS_DIR)",
@@ -926,6 +913,7 @@
926913
baseConfigurationReference = 948600370E83C7A1EA54FA4D /* Pods-BingPaperTests.release.xcconfig */;
927914
buildSettings = {
928915
BUNDLE_LOADER = "$(TEST_HOST)";
916+
CODE_SIGN_IDENTITY = "-";
929917
COMBINE_HIDPI_IMAGES = YES;
930918
FRAMEWORK_SEARCH_PATHS = (
931919
"$(DEVELOPER_FRAMEWORKS_DIR)",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

BingPaper/AboutPreferencesViewController.swift

+9-13
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22
// AboutPreferencesViewController.swift
33
// BingPaper
44
//
5-
// Created by Aspire on 2016-09-27.
6-
// Copyright © 2016 Peng Jingwen. All rights reserved.
5+
// Created by Jingwen Peng on 2016-09-27.
6+
// Copyright © 2016 Jingwen Peng. All rights reserved.
77
//
88

99
import Cocoa
1010
import MASPreferences
1111

1212
class AboutPreferencesViewController: NSViewController, MASPreferencesViewController {
13-
14-
override var identifier: String? {
15-
get { return "About" }
16-
set { super.identifier = newValue }
17-
}
18-
19-
var toolbarItemImage: NSImage! = #imageLiteral(resourceName: "Envolope")
20-
var toolbarItemLabel: String! = NSLocalizedString("About", comment: "N/A")
13+
14+
var viewIdentifier: String = "About"
15+
var toolbarItemImage: NSImage? = #imageLiteral(resourceName: "Envolope")
16+
var toolbarItemLabel: String? = NSLocalizedString("About", comment: "N/A")
2117

2218
@IBOutlet weak var versionAndBuildString: NSTextField!
2319

@@ -26,7 +22,7 @@ class AboutPreferencesViewController: NSViewController, MASPreferencesViewContro
2622
}
2723

2824
init() {
29-
super.init(nibName: "AboutPreferencesView", bundle: Bundle())!
25+
super.init(nibName: "AboutPreferencesView", bundle: Bundle())
3026
}
3127

3228
override func viewDidLoad() {
@@ -44,10 +40,10 @@ class AboutPreferencesViewController: NSViewController, MASPreferencesViewContro
4440
}
4541

4642
@IBAction func openEmail(_ sender: NSButton) {
47-
NSWorkspace.shared().open(NSURL(string: "mailto:[email protected]") as! URL)
43+
NSWorkspace.shared.open(NSURL(string: "mailto:[email protected]")! as URL)
4844
}
4945

5046
@IBAction func openWebsite(_ sender: NSButton) {
51-
NSWorkspace.shared().open(NSURL(string: "https://pjw.io") as! URL)
47+
NSWorkspace.shared.open(NSURL(string: "https://pjw.io")! as URL)
5248
}
5349
}

BingPaper/AppDelegate.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// AppDelegate.swift
33
// BingPaper
44
//
5-
// Created by Peng Jingwen on 2015-03-13.
6-
// Copyright (c) 2015 Peng Jingwen. All rights reserved.
5+
// Created by Jingwen Peng on 2015-03-13.
6+
// Copyright (c) 2015 Jingwen Peng. All rights reserved.
77
//
88

99
import Cocoa
@@ -15,7 +15,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
1515

1616
override func awakeFromNib(){
1717

18-
let statusItem = NSStatusBar.system().statusItem(withLength: -1);
18+
let statusItem = NSStatusBar.system.statusItem(withLength: -1);
1919

2020
statusItem.view = StatusBarView(image: #imageLiteral(resourceName: "StatusBarIcon"), statusItem: statusItem, popover: self.popover)
2121
}

0 commit comments

Comments
 (0)