Skip to content

Commit

Permalink
Fix building for Mac Catalyst on Xcode 12 (#2078)
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-claassen authored Sep 18, 2020
1 parent 9fe153d commit e1bb4d6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file.
* Update SelectorViewController.swift (#2062)
* Fix subtitle field row constraints (#2069)
* Create a workaround for Swift crash (#2057, #2061)
* Fix date row style/rendering issues for iOS14 (#2067)
* Fix date row style/rendering issues for iOS 14 (#2067)

### [5.2.1](https://github.com/xmartlabs/Eureka/releases/tag/5.2.1)

Expand Down
4 changes: 3 additions & 1 deletion Eureka.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = Xmartlabs;
TargetAttributes = {
51729DEA1B9A4F5E004A00EB = {
Expand Down Expand Up @@ -622,6 +622,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -682,6 +683,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
24 changes: 10 additions & 14 deletions Eureka.xcodeproj/xcshareddata/xcschemes/Eureka.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "51729DEA1B9A4F5E004A00EB"
BuildableName = "Eureka.framework"
BlueprintName = "Eureka"
ReferencedContainer = "container:Eureka.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "51729DEA1B9A4F5E004A00EB"
BuildableName = "Eureka.framework"
BlueprintName = "Eureka"
ReferencedContainer = "container:Eureka.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:Eureka.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 3 additions & 1 deletion Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
51729E121B9A54F1004A00EB /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = Xmartlabs;
TargetAttributes = {
51729E191B9A54F1004A00EB = {
Expand Down Expand Up @@ -538,6 +538,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -593,6 +594,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
2 changes: 1 addition & 1 deletion Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
23 changes: 13 additions & 10 deletions Source/Rows/DateInlineRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ extension DatePickerRowProtocol {

func configurePickerStyle(_ cell: DatePickerCell, _ mode: UIDatePicker.Mode = .dateAndTime) {
cell.datePicker.datePickerMode = mode
if #available(iOS 14.0, *) {
#if swift(>=5.3)
cell.datePicker.preferredDatePickerStyle = .inline
#else
cell.datePicker.preferredDatePickerStyle = .wheels
#endif
}
else if #available(iOS 13.4, *) {
cell.datePicker.preferredDatePickerStyle = .wheels
}
// For Xcode 11.4 and above
#if swift(>=5.2)
if #available(iOS 14.0, *) {
#if swift(>=5.3) && !(os(OSX) || (os(iOS) && targetEnvironment(macCatalyst)))
cell.datePicker.preferredDatePickerStyle = .inline
#else
cell.datePicker.preferredDatePickerStyle = .wheels
#endif
}
else if #available(iOS 13.4, *) {
cell.datePicker.preferredDatePickerStyle = .wheels
}
#endif
}

}
Expand Down

0 comments on commit e1bb4d6

Please sign in to comment.