Skip to content

Commit 04c19f8

Browse files
committed
Fixed date catalyst bug.
1 parent 01f658e commit 04c19f8

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

Example Apps/SparrowKit.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,46 @@
5454
debugDocumentVersioning = "YES"
5555
debugServiceExtension = "internal"
5656
allowLocationSimulation = "YES">
57-
<BuildableProductRunnable
58-
runnableDebuggingMode = "0">
57+
<RemoteRunnable
58+
runnableDebuggingMode = "2"
59+
BundleIdentifier = "com.apple.Carousel"
60+
RemotePath = "/(null)">
5961
<BuildableReference
6062
BuildableIdentifier = "primary"
6163
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
6264
BuildableName = "watchOS Example.app"
6365
BlueprintName = "watchOS Example"
6466
ReferencedContainer = "container:SparrowKit.xcodeproj">
6567
</BuildableReference>
66-
</BuildableProductRunnable>
68+
</RemoteRunnable>
6769
</LaunchAction>
6870
<ProfileAction
6971
buildConfiguration = "Release"
7072
shouldUseLaunchSchemeArgsEnv = "YES"
7173
savedToolIdentifier = ""
7274
useCustomWorkingDirectory = "NO"
7375
debugDocumentVersioning = "YES">
74-
<BuildableProductRunnable
75-
runnableDebuggingMode = "0">
76+
<RemoteRunnable
77+
runnableDebuggingMode = "2"
78+
BundleIdentifier = "com.apple.Carousel"
79+
RemotePath = "/(null)">
7680
<BuildableReference
7781
BuildableIdentifier = "primary"
7882
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
7983
BuildableName = "watchOS Example.app"
8084
BlueprintName = "watchOS Example"
8185
ReferencedContainer = "container:SparrowKit.xcodeproj">
8286
</BuildableReference>
83-
</BuildableProductRunnable>
87+
</RemoteRunnable>
88+
<MacroExpansion>
89+
<BuildableReference
90+
BuildableIdentifier = "primary"
91+
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
92+
BuildableName = "watchOS Example.app"
93+
BlueprintName = "watchOS Example"
94+
ReferencedContainer = "container:SparrowKit.xcodeproj">
95+
</BuildableReference>
96+
</MacroExpansion>
8497
</ProfileAction>
8598
<AnalyzeAction
8699
buildConfiguration = "Debug">

Sources/SparrowKit/Foundation/Extensions/DateExtension.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ public extension Date {
2828

2929
#if (os(iOS) || os(tvOS))
3030
static var current: Date {
31+
#if targetEnvironment(macCatalyst)
32+
return Date()
33+
#else
3134
if #available(macOS 13, iOS 15, tvOS 15, watchOS 8, *) {
3235
return Date.now
3336
} else {
3437
return Date()
3538
}
39+
#endif
3640
}
3741
#endif
3842

SparrowKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SparrowKit'
4-
s.version = '3.3.5'
4+
s.version = '3.3.6'
55
s.summary = 'Collection of native Swift extensions to boost your development. Support tvOS and watchOS.'
66
s.homepage = 'https://github.com/ivanvorobei/SparrowKit'
77
s.source = { :git => 'https://github.com/ivanvorobei/SparrowKit.git', :tag => s.version }

0 commit comments

Comments
 (0)