Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit e5ab4e8

Browse files
committed
Update dependecy: Schedule
1 parent ef9c5cc commit e5ab4e8

File tree

4 files changed

+97
-30
lines changed

4 files changed

+97
-30
lines changed

Dynamic Dark Mode.xcodeproj/project.pbxproj

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
227DCC3CCE5447A63A72E85A /* Pods_Dynamic_Dark_Mode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50FA87572D9440C6D2C7E69B /* Pods_Dynamic_Dark_Mode.framework */; };
1110
5206B8BB2219B02600D22358 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206B8BA2219B02600D22358 /* Error.swift */; };
1211
5206B8BD2219B08100D22358 /* Notification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5206B8BC2219B08100D22358 /* Notification.swift */; };
1312
520EF73821A056A3003326F2 /* Location.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520EF73721A056A3003326F2 /* Location.swift */; };
@@ -42,7 +41,8 @@
4241
52DC7981215ECB48005EE97E /* Auxiliary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52DC7980215ECB48005EE97E /* Auxiliary.swift */; };
4342
706D395920E3766D0079535E /* TouchBarForSettingsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 706D395820E3766D0079535E /* TouchBarForSettingsVC.swift */; };
4443
706D395D20E377E40079535E /* Localizations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 706D395B20E377E40079535E /* Localizations.swift */; };
45-
CBBCAB8E78C6D298DDF7F5F1 /* Pods_DynamicLauncher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC8FCB4DC18A325265A67679 /* Pods_DynamicLauncher.framework */; };
44+
7E7F282AD302090AF69279B0 /* libPods-DynamicLauncher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D58D01DBFF842D733481BBB3 /* libPods-DynamicLauncher.a */; };
45+
8FF90AAC91457FF67E3939FF /* libPods-Dynamic Dark Mode.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B850F7B9A71BBC23571BE17E /* libPods-Dynamic Dark Mode.a */; };
4646
/* End PBXBuildFile section */
4747

4848
/* Begin PBXCopyFilesBuildPhase section */
@@ -67,7 +67,6 @@
6767
33A83F14EC576D06D70D083A /* Pods-Dynamic Dark Mode.release masless.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Dynamic Dark Mode.release masless.xcconfig"; path = "Pods/Target Support Files/Pods-Dynamic Dark Mode/Pods-Dynamic Dark Mode.release masless.xcconfig"; sourceTree = "<group>"; };
6868
4964734EDCE359C68AB9DF0D /* Pods-Dynamic.release masless.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Dynamic.release masless.xcconfig"; path = "Pods/Target Support Files/Pods-Dynamic/Pods-Dynamic.release masless.xcconfig"; sourceTree = "<group>"; };
6969
4FD3C614308BF3706BBC3D4F /* Pods_Dynamic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Dynamic.framework; sourceTree = BUILT_PRODUCTS_DIR; };
70-
50FA87572D9440C6D2C7E69B /* Pods_Dynamic_Dark_Mode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Dynamic_Dark_Mode.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7170
5206B8BA2219B02600D22358 /* Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = "<group>"; };
7271
5206B8BC2219B08100D22358 /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = "<group>"; };
7372
520EF73721A056A3003326F2 /* Location.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Location.swift; sourceTree = "<group>"; };
@@ -143,8 +142,9 @@
143142
88EA90C5D6B00D262E96441C /* Pods-DynamicLauncher.debug masless.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DynamicLauncher.debug masless.xcconfig"; path = "Pods/Target Support Files/Pods-DynamicLauncher/Pods-DynamicLauncher.debug masless.xcconfig"; sourceTree = "<group>"; };
144143
A85F5FCB123842467D0172A3 /* Pods-DynamicLauncher.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DynamicLauncher.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DynamicLauncher/Pods-DynamicLauncher.debug.xcconfig"; sourceTree = "<group>"; };
145144
AA2A0654FC318D2781A5572B /* Pods-Dynamic.debug masless.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Dynamic.debug masless.xcconfig"; path = "Pods/Target Support Files/Pods-Dynamic/Pods-Dynamic.debug masless.xcconfig"; sourceTree = "<group>"; };
146-
CC8FCB4DC18A325265A67679 /* Pods_DynamicLauncher.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DynamicLauncher.framework; sourceTree = BUILT_PRODUCTS_DIR; };
145+
B850F7B9A71BBC23571BE17E /* libPods-Dynamic Dark Mode.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Dynamic Dark Mode.a"; sourceTree = BUILT_PRODUCTS_DIR; };
147146
D3261CD208CCFBF73B34DA72 /* Pods-DynamicLauncher.release masless.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DynamicLauncher.release masless.xcconfig"; path = "Pods/Target Support Files/Pods-DynamicLauncher/Pods-DynamicLauncher.release masless.xcconfig"; sourceTree = "<group>"; };
147+
D58D01DBFF842D733481BBB3 /* libPods-DynamicLauncher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DynamicLauncher.a"; sourceTree = BUILT_PRODUCTS_DIR; };
148148
ED6A51F921772F27004DEFEA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = "<group>"; };
149149
ED6A51FB21772F28004DEFEA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
150150
ED6A51FC21772F28004DEFEA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -158,15 +158,15 @@
158158
isa = PBXFrameworksBuildPhase;
159159
buildActionMask = 2147483647;
160160
files = (
161-
227DCC3CCE5447A63A72E85A /* Pods_Dynamic_Dark_Mode.framework in Frameworks */,
161+
8FF90AAC91457FF67E3939FF /* libPods-Dynamic Dark Mode.a in Frameworks */,
162162
);
163163
runOnlyForDeploymentPostprocessing = 0;
164164
};
165165
52C3511520CC57B60073F0CA /* Frameworks */ = {
166166
isa = PBXFrameworksBuildPhase;
167167
buildActionMask = 2147483647;
168168
files = (
169-
CBBCAB8E78C6D298DDF7F5F1 /* Pods_DynamicLauncher.framework in Frameworks */,
169+
7E7F282AD302090AF69279B0 /* libPods-DynamicLauncher.a in Frameworks */,
170170
);
171171
runOnlyForDeploymentPostprocessing = 0;
172172
};
@@ -293,8 +293,8 @@
293293
children = (
294294
706D395E20E3796A0079535E /* DFRFoundation.framework */,
295295
4FD3C614308BF3706BBC3D4F /* Pods_Dynamic.framework */,
296-
CC8FCB4DC18A325265A67679 /* Pods_DynamicLauncher.framework */,
297-
50FA87572D9440C6D2C7E69B /* Pods_Dynamic_Dark_Mode.framework */,
296+
B850F7B9A71BBC23571BE17E /* libPods-Dynamic Dark Mode.a */,
297+
D58D01DBFF842D733481BBB3 /* libPods-DynamicLauncher.a */,
298298
);
299299
name = Frameworks;
300300
sourceTree = "<group>";
@@ -368,6 +368,7 @@
368368
52168FB620C8B47100869A9C /* Resources */,
369369
5237AE5220CCC084009CF037 /* Copy Files */,
370370
CA607805D8FDF1201D5CEF8A /* [CP] Embed Pods Frameworks */,
371+
7277058713CA751AC1ACE32E /* [CP] Copy Pods Resources */,
371372
);
372373
buildRules = (
373374
);
@@ -506,26 +507,88 @@
506507
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";
507508
showEnvVarsInLog = 0;
508509
};
510+
7277058713CA751AC1ACE32E /* [CP] Copy Pods Resources */ = {
511+
isa = PBXShellScriptBuildPhase;
512+
buildActionMask = 2147483647;
513+
files = (
514+
);
515+
inputFileListPaths = (
516+
);
517+
inputPaths = (
518+
"${SRCROOT}/Pods/Target Support Files/Pods-Dynamic Dark Mode/Pods-Dynamic Dark Mode-resources.sh",
519+
"${PODS_CONFIGURATION_BUILD_DIR}/MASShortcut/MASShortcut.bundle",
520+
"${PODS_ROOT}/LetsMove/ca.lproj",
521+
"${PODS_ROOT}/LetsMove/cs.lproj",
522+
"${PODS_ROOT}/LetsMove/da.lproj",
523+
"${PODS_ROOT}/LetsMove/de.lproj",
524+
"${PODS_ROOT}/LetsMove/en.lproj",
525+
"${PODS_ROOT}/LetsMove/es.lproj",
526+
"${PODS_ROOT}/LetsMove/fr.lproj",
527+
"${PODS_ROOT}/LetsMove/hu.lproj",
528+
"${PODS_ROOT}/LetsMove/it.lproj",
529+
"${PODS_ROOT}/LetsMove/ja.lproj",
530+
"${PODS_ROOT}/LetsMove/ko.lproj",
531+
"${PODS_ROOT}/LetsMove/mk.lproj",
532+
"${PODS_ROOT}/LetsMove/nb.lproj",
533+
"${PODS_ROOT}/LetsMove/nl.lproj",
534+
"${PODS_ROOT}/LetsMove/pl.lproj",
535+
"${PODS_ROOT}/LetsMove/pt.lproj",
536+
"${PODS_ROOT}/LetsMove/pt_BR.lproj",
537+
"${PODS_ROOT}/LetsMove/ru.lproj",
538+
"${PODS_ROOT}/LetsMove/sk.lproj",
539+
"${PODS_ROOT}/LetsMove/sr.lproj",
540+
"${PODS_ROOT}/LetsMove/sv.lproj",
541+
"${PODS_ROOT}/LetsMove/tr.lproj",
542+
"${PODS_ROOT}/LetsMove/zh_CN.lproj",
543+
"${PODS_ROOT}/LetsMove/zh_TW.lproj",
544+
);
545+
name = "[CP] Copy Pods Resources";
546+
outputFileListPaths = (
547+
);
548+
outputPaths = (
549+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MASShortcut.bundle",
550+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ca.lproj",
551+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/cs.lproj",
552+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/da.lproj",
553+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/de.lproj",
554+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/en.lproj",
555+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/es.lproj",
556+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/fr.lproj",
557+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/hu.lproj",
558+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/it.lproj",
559+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ja.lproj",
560+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ko.lproj",
561+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mk.lproj",
562+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/nb.lproj",
563+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/nl.lproj",
564+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/pl.lproj",
565+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/pt.lproj",
566+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/pt_BR.lproj",
567+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ru.lproj",
568+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/sk.lproj",
569+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/sr.lproj",
570+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/sv.lproj",
571+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/tr.lproj",
572+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/zh_CN.lproj",
573+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/zh_TW.lproj",
574+
);
575+
runOnlyForDeploymentPostprocessing = 0;
576+
shellPath = /bin/sh;
577+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Dynamic Dark Mode/Pods-Dynamic Dark Mode-resources.sh\"\n";
578+
showEnvVarsInLog = 0;
579+
};
509580
CA607805D8FDF1201D5CEF8A /* [CP] Embed Pods Frameworks */ = {
510581
isa = PBXShellScriptBuildPhase;
511582
buildActionMask = 2147483647;
512583
files = (
513584
);
514585
inputPaths = (
515586
"${SRCROOT}/Pods/Target Support Files/Pods-Dynamic Dark Mode/Pods-Dynamic Dark Mode-frameworks.sh",
516-
"${BUILT_PRODUCTS_DIR}/MASShortcut/MASShortcut.framework",
517-
"${BUILT_PRODUCTS_DIR}/Schedule/Schedule.framework",
518-
"${BUILT_PRODUCTS_DIR}/Solar/Solar.framework",
519-
"${BUILT_PRODUCTS_DIR}/LetsMove/LetsMove.framework",
520587
"${PODS_ROOT}/Sparkle/Sparkle.framework",
521588
"${PODS_ROOT}/Sparkle/Sparkle.framework.dSYM",
522589
);
523590
name = "[CP] Embed Pods Frameworks";
524591
outputPaths = (
525-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MASShortcut.framework",
526-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Schedule.framework",
527-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Solar.framework",
528-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LetsMove.framework",
529592
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sparkle.framework",
530593
"${DWARF_DSYM_FOLDER_PATH}/Sparkle.framework.dSYM",
531594
);

Dynamic/Components/Scheduler/Scheduler.swift

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ import Schedule
1414
public final class Scheduler: NSObject {
1515
public static let shared = Scheduler()
1616

17-
private weak var task: Task?
17+
private var task: Task? {
18+
didSet {
19+
oldValue?.cancel()
20+
}
21+
}
1822

1923
public func cancel() {
20-
task?.cancel()
2124
task = nil
2225
}
2326

@@ -43,7 +46,6 @@ public final class Scheduler: NSObject {
4346
AppleScript.checkPermission(onSuccess: decision.style.enable)
4447
}
4548
guard let date = decision.date else { return }
46-
cancel()
4749
task = Plan.at(date).do { [weak self] in self?.schedule() }
4850
}
4951

@@ -166,8 +168,11 @@ public final class Scheduler: NSObject {
166168
NotificationCenter.default.removeObserver(self)
167169
}
168170

169-
/// TaskHub has the ownership
170-
private weak var fakeClockChange: Task?
171+
private var fakeClockChange: Task? {
172+
didSet {
173+
oldValue?.cancel()
174+
}
175+
}
171176
/// Usually it takes 5~15 seconds to happen, so 30 seconds
172177
/// is a relatively safe but reasonable long waiting time.
173178
private let waitForfakeClockChange = Interval(seconds: 30)
@@ -181,9 +186,8 @@ public final class Scheduler: NSObject {
181186
}
182187

183188
@objc private func workspaceDidWake() {
184-
fakeClockChange?.cancel()
185189
fakeClockChange = Plan.after(waitForfakeClockChange).do { [weak self] in
186-
self?.fakeClockChange?.cancel()
190+
self?.fakeClockChange = nil
187191
}
188192
if let task = task {
189193
guard let expected = task.timeline.estimatedNextExecution else {

Podfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ platform :osx, '10.14'
33

44
target 'Dynamic Dark Mode' do
55
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6-
use_frameworks!
6+
# use_frameworks!
7+
use_modular_headers!
78

89
# Pods for Dynamic Dark Mode
910
pod 'Solar'
10-
pod 'Schedule', :git => 'https://github.com/jianstm/Schedule.git', :branch => '2.x'
11+
pod 'Schedule', :git => 'https://github.com/jianstm/Schedule.git'
1112
pod 'MASShortcut'
1213

1314
# Masless Only
@@ -17,7 +18,7 @@ end
1718

1819
target 'DynamicLauncher' do
1920
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
20-
use_frameworks!
21+
# use_frameworks!
2122

2223
# Pods for DynamicLauncher
2324

Podfile.lock

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PODS:
88
DEPENDENCIES:
99
- LetsMove
1010
- MASShortcut
11-
- Schedule (from `https://github.com/jianstm/Schedule.git`, branch `2.x`)
11+
- Schedule (from `https://github.com/jianstm/Schedule.git`)
1212
- Solar
1313
- Sparkle
1414

@@ -21,12 +21,11 @@ SPEC REPOS:
2121

2222
EXTERNAL SOURCES:
2323
Schedule:
24-
:branch: 2.x
2524
:git: https://github.com/jianstm/Schedule.git
2625

2726
CHECKOUT OPTIONS:
2827
Schedule:
29-
:commit: e34def36d70f7e8f245413386b178f4837ceb950
28+
:commit: cacc25bbd281afe8750e6ede3a4fa8f0c1b4f2f9
3029
:git: https://github.com/jianstm/Schedule.git
3130

3231
SPEC CHECKSUMS:
@@ -36,6 +35,6 @@ SPEC CHECKSUMS:
3635
Solar: 2dc6e7cc39186cb0c8228fa08df76fb50c7d8f24
3736
Sparkle: 3f75576db8b0265adef36c43249d747f22d0b708
3837

39-
PODFILE CHECKSUM: 2b1212962e756f4d069241e5373d1ced54636e2a
38+
PODFILE CHECKSUM: b832d3fce8f18ad9bb1325617c97e8aa7251aa08
4039

4140
COCOAPODS: 1.5.3

0 commit comments

Comments
 (0)