Skip to content

Commit

Permalink
Fixed date catalyst bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Oct 11, 2021
1 parent 01f658e commit 04c19f8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,46 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/(null)">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/(null)">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
4 changes: 4 additions & 0 deletions Sources/SparrowKit/Foundation/Extensions/DateExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ public extension Date {

#if (os(iOS) || os(tvOS))
static var current: Date {
#if targetEnvironment(macCatalyst)
return Date()
#else
if #available(macOS 13, iOS 15, tvOS 15, watchOS 8, *) {
return Date.now
} else {
return Date()
}
#endif
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion SparrowKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

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

0 comments on commit 04c19f8

Please sign in to comment.