From 26620c08316fc43579f2d6a6c380b732e65b66aa Mon Sep 17 00:00:00 2001 From: Xin Date: Sun, 8 Apr 2018 16:54:18 +0800 Subject: [PATCH] xcode 9.3 --- RRuleSwift.xcodeproj/project.pbxproj | 6 ++- .../xcschemes/RRuleSwift iOS.xcscheme | 4 +- .../xcschemes/RRuleSwift watchOS.xcscheme | 4 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++ RRuleSwiftExample-TodayExtension/Info.plist | 4 +- RRuleSwiftExample-Watch Extension/Info.plist | 4 +- RRuleSwiftExample-Watch/Info.plist | 4 +- RRuleSwiftExample.xcodeproj/project.pbxproj | 6 ++- .../RRuleSwiftExample-TodayExtension.xcscheme | 4 +- .../xcschemes/RRuleSwiftExample.xcscheme | 4 +- RRuleSwiftExample/Info.plist | 4 +- Sources/ExclusionDate.swift | 10 ++--- Sources/InclusionDate.swift | 10 ++--- Sources/JavaScriptBridge.swift | 14 +++---- Sources/RRule.swift | 38 +++++++++---------- Sources/Supporting Files/Info-iOS.plist | 2 +- Sources/Supporting Files/Info-watchOS.plist | 2 +- 17 files changed, 68 insertions(+), 60 deletions(-) create mode 100644 RRuleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/RRuleSwift.xcodeproj/project.pbxproj b/RRuleSwift.xcodeproj/project.pbxproj index f5b5aaf..93b4b4e 100644 --- a/RRuleSwift.xcodeproj/project.pbxproj +++ b/RRuleSwift.xcodeproj/project.pbxproj @@ -184,7 +184,7 @@ D31B138E1CA8E02E00D0B863 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = Teambition; TargetAttributes = { D31B13961CA8E02E00D0B863 = { @@ -281,12 +281,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -338,12 +340,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme index 8024c3e..01b7c8a 100644 --- a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme +++ b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme index 9bc4410..f4900c1 100644 --- a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme +++ b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/RRuleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RRuleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RRuleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RRuleSwiftExample-TodayExtension/Info.plist b/RRuleSwiftExample-TodayExtension/Info.plist index f284c85..370b842 100644 --- a/RRuleSwiftExample-TodayExtension/Info.plist +++ b/RRuleSwiftExample-TodayExtension/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion - 12 + 15 NSExtension NSExtensionMainStoryboard diff --git a/RRuleSwiftExample-Watch Extension/Info.plist b/RRuleSwiftExample-Watch Extension/Info.plist index ddf308e..db21886 100644 --- a/RRuleSwiftExample-Watch Extension/Info.plist +++ b/RRuleSwiftExample-Watch Extension/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion - 12 + 15 NSExtension NSExtensionAttributes diff --git a/RRuleSwiftExample-Watch/Info.plist b/RRuleSwiftExample-Watch/Info.plist index fc526b9..3ee85ca 100644 --- a/RRuleSwiftExample-Watch/Info.plist +++ b/RRuleSwiftExample-Watch/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion - 12 + 15 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/RRuleSwiftExample.xcodeproj/project.pbxproj b/RRuleSwiftExample.xcodeproj/project.pbxproj index 5df60f2..016df7b 100644 --- a/RRuleSwiftExample.xcodeproj/project.pbxproj +++ b/RRuleSwiftExample.xcodeproj/project.pbxproj @@ -308,7 +308,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = Teambition; TargetAttributes = { D31B13771CA8D8E400D0B863 = { @@ -473,12 +473,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -527,12 +529,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme index a9198ab..7f80c23 100644 --- a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme +++ b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme @@ -1,6 +1,6 @@ @@ -61,7 +60,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample.xcscheme b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample.xcscheme index 737ce73..8fa3e80 100644 --- a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample.xcscheme +++ b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample.xcscheme @@ -1,6 +1,6 @@ @@ -46,7 +45,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/RRuleSwiftExample/Info.plist b/RRuleSwiftExample/Info.plist index d413150..d2333a8 100644 --- a/RRuleSwiftExample/Info.plist +++ b/RRuleSwiftExample/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion - 12 + 15 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/Sources/ExclusionDate.swift b/Sources/ExclusionDate.swift index 74595fd..63d17df 100644 --- a/Sources/ExclusionDate.swift +++ b/Sources/ExclusionDate.swift @@ -25,14 +25,14 @@ public struct ExclusionDate { return nil } let exdateString = String(string.suffix(from: range.upperBound)) - let exdates = exdateString.components(separatedBy: ",").flatMap { (dateString) -> String? in - if (dateString.isEmpty || dateString.characters.count == 0) { + let exdates = exdateString.components(separatedBy: ",").compactMap { (dateString) -> String? in + if dateString.isEmpty { return nil } return dateString } - self.dates = exdates.flatMap({ (dateString) -> Date? in + self.dates = exdates.compactMap({ (dateString) -> Date? in if let date = RRule.dateFormatter.date(from: dateString) { return date } else if let date = RRule.realDate(dateString) { @@ -54,8 +54,8 @@ public struct ExclusionDate { return nil } - if String(exdateString.suffix(from: exdateString.characters.index(exdateString.endIndex, offsetBy: -1))) == "," { - exdateString.remove(at: exdateString.characters.index(exdateString.endIndex, offsetBy: -1)) + if String(exdateString.suffix(from: exdateString.index(exdateString.endIndex, offsetBy: -1))) == "," { + exdateString.remove(at: exdateString.index(exdateString.endIndex, offsetBy: -1)) } return exdateString diff --git a/Sources/InclusionDate.swift b/Sources/InclusionDate.swift index bfb4dc1..d4acaf2 100644 --- a/Sources/InclusionDate.swift +++ b/Sources/InclusionDate.swift @@ -22,14 +22,14 @@ public struct InclusionDate { return nil } let rdateString = String(string.suffix(from: range.upperBound)) - let rdates = rdateString.components(separatedBy: ",").flatMap { (dateString) -> String? in - if (dateString.isEmpty || dateString.characters.count == 0) { + let rdates = rdateString.components(separatedBy: ",").compactMap { (dateString) -> String? in + if dateString.isEmpty { return nil } return dateString } - self.dates = rdates.flatMap({ (dateString) -> Date? in + self.dates = rdates.compactMap({ (dateString) -> Date? in if let date = RRule.dateFormatter.date(from: dateString) { return date } else if let date = RRule.realDate(dateString) { @@ -48,8 +48,8 @@ public struct InclusionDate { rdateString += dateStrings.joined(separator: ",") } - if String(rdateString.suffix(from: rdateString.characters.index(rdateString.endIndex, offsetBy: -1))) == "," { - rdateString.remove(at: rdateString.characters.index(rdateString.endIndex, offsetBy: -1)) + if String(rdateString.suffix(from: rdateString.index(rdateString.endIndex, offsetBy: -1))) == "," { + rdateString.remove(at: rdateString.index(rdateString.endIndex, offsetBy: -1)) } return rdateString diff --git a/Sources/JavaScriptBridge.swift b/Sources/JavaScriptBridge.swift index 364261e..ec1b6fd 100644 --- a/Sources/JavaScriptBridge.swift +++ b/Sources/JavaScriptBridge.swift @@ -67,7 +67,7 @@ internal extension RecurrenceRule { jsonString += "count: \(endlessRecurrenceCount)," } - let bysetposStrings = bysetpos.flatMap({ (setpo) -> String? in + let bysetposStrings = bysetpos.compactMap({ (setpo) -> String? in guard (-366...366 ~= setpo) && (setpo != 0) else { return nil } @@ -77,7 +77,7 @@ internal extension RecurrenceRule { jsonString += "bysetpos: [\(bysetposStrings.joined(separator: ","))]," } - let byyeardayStrings = byyearday.flatMap({ (yearday) -> String? in + let byyeardayStrings = byyearday.compactMap({ (yearday) -> String? in guard (-366...366 ~= yearday) && (yearday != 0) else { return nil } @@ -87,7 +87,7 @@ internal extension RecurrenceRule { jsonString += "byyearday: [\(byyeardayStrings.joined(separator: ","))]," } - let bymonthStrings = bymonth.flatMap({ (month) -> String? in + let bymonthStrings = bymonth.compactMap({ (month) -> String? in guard 1...12 ~= month else { return nil } @@ -97,7 +97,7 @@ internal extension RecurrenceRule { jsonString += "bymonth: [\(bymonthStrings.joined(separator: ","))]," } - let byweeknoStrings = byweekno.flatMap({ (weekno) -> String? in + let byweeknoStrings = byweekno.compactMap({ (weekno) -> String? in guard (-53...53 ~= weekno) && (weekno != 0) else { return nil } @@ -107,7 +107,7 @@ internal extension RecurrenceRule { jsonString += "byweekno: [\(byweeknoStrings.joined(separator: ","))]," } - let bymonthdayStrings = bymonthday.flatMap({ (monthday) -> String? in + let bymonthdayStrings = bymonthday.compactMap({ (monthday) -> String? in guard (-31...31 ~= monthday) && (monthday != 0) else { return nil } @@ -145,8 +145,8 @@ internal extension RecurrenceRule { jsonString += "bysecond: [\(bysecondStrings.joined(separator: ","))]" } - if String(jsonString.suffix(from: jsonString.characters.index(jsonString.endIndex, offsetBy: -1))) == "," { - jsonString.remove(at: jsonString.characters.index(jsonString.endIndex, offsetBy: -1)) + if String(jsonString.suffix(from: jsonString.index(jsonString.endIndex, offsetBy: -1))) == "," { + jsonString.remove(at: jsonString.index(jsonString.endIndex, offsetBy: -1)) } return jsonString diff --git a/Sources/RRule.swift b/Sources/RRule.swift index 0c70402..b3b97de 100644 --- a/Sources/RRule.swift +++ b/Sources/RRule.swift @@ -36,8 +36,8 @@ public struct RRule { return nil } let ruleString = String(string.suffix(from: range.upperBound)) - let rules = ruleString.components(separatedBy: ";").flatMap { (rule) -> String? in - if (rule.isEmpty || rule.characters.count == 0) { + let rules = ruleString.components(separatedBy: ";").compactMap { (rule) -> String? in + if rule.isEmpty { return nil } return rule @@ -52,7 +52,7 @@ public struct RRule { } let ruleName = ruleComponents[0] let ruleValue = ruleComponents[1] - guard !ruleValue.isEmpty && ruleValue.characters.count > 0 else { + guard !ruleValue.isEmpty else { continue } @@ -93,7 +93,7 @@ public struct RRule { } if ruleName == "BYSETPOS" { - let bysetpos = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let bysetpos = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in guard let setpo = Int(string), (-366...366 ~= setpo) && (setpo != 0) else { return nil } @@ -103,7 +103,7 @@ public struct RRule { } if ruleName == "BYYEARDAY" { - let byyearday = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let byyearday = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in guard let yearday = Int(string), (-366...366 ~= yearday) && (yearday != 0) else { return nil } @@ -113,7 +113,7 @@ public struct RRule { } if ruleName == "BYMONTH" { - let bymonth = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let bymonth = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in guard let month = Int(string), 1...12 ~= month else { return nil } @@ -123,7 +123,7 @@ public struct RRule { } if ruleName == "BYWEEKNO" { - let byweekno = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let byweekno = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in guard let weekno = Int(string), (-53...53 ~= weekno) && (weekno != 0) else { return nil } @@ -133,7 +133,7 @@ public struct RRule { } if ruleName == "BYMONTHDAY" { - let bymonthday = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let bymonthday = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in guard let monthday = Int(string), (-31...31 ~= monthday) && (monthday != 0) else { return nil } @@ -145,28 +145,28 @@ public struct RRule { if ruleName == "BYDAY" { // These variables will define the weekdays where the recurrence will be applied. // In the RFC documentation, it is specified as BYDAY, but was renamed to avoid the ambiguity of that argument. - let byweekday = ruleValue.components(separatedBy: ",").flatMap({ (string) -> EKWeekday? in + let byweekday = ruleValue.components(separatedBy: ",").compactMap({ (string) -> EKWeekday? in return EKWeekday.weekdayFromSymbol(string) }) recurrenceRule.byweekday = byweekday.sorted(by: <) } if ruleName == "BYHOUR" { - let byhour = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let byhour = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in return Int(string) }) recurrenceRule.byhour = byhour.sorted(by: <) } if ruleName == "BYMINUTE" { - let byminute = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let byminute = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in return Int(string) }) recurrenceRule.byminute = byminute.sorted(by: <) } if ruleName == "BYSECOND" { - let bysecond = ruleValue.components(separatedBy: ",").flatMap({ (string) -> Int? in + let bysecond = ruleValue.components(separatedBy: ",").compactMap({ (string) -> Int? in return Int(string) }) recurrenceRule.bysecond = bysecond.sorted(by: <) @@ -200,7 +200,7 @@ public struct RRule { rruleString += "COUNT=\(count);" } - let bysetposStrings = rule.bysetpos.flatMap({ (setpo) -> String? in + let bysetposStrings = rule.bysetpos.compactMap({ (setpo) -> String? in guard (-366...366 ~= setpo) && (setpo != 0) else { return nil } @@ -210,7 +210,7 @@ public struct RRule { rruleString += "BYSETPOS=\(bysetposStrings.joined(separator: ","));" } - let byyeardayStrings = rule.byyearday.flatMap({ (yearday) -> String? in + let byyeardayStrings = rule.byyearday.compactMap({ (yearday) -> String? in guard (-366...366 ~= yearday) && (yearday != 0) else { return nil } @@ -220,7 +220,7 @@ public struct RRule { rruleString += "BYYEARDAY=\(byyeardayStrings.joined(separator: ","));" } - let bymonthStrings = rule.bymonth.flatMap({ (month) -> String? in + let bymonthStrings = rule.bymonth.compactMap({ (month) -> String? in guard 1...12 ~= month else { return nil } @@ -230,7 +230,7 @@ public struct RRule { rruleString += "BYMONTH=\(bymonthStrings.joined(separator: ","));" } - let byweeknoStrings = rule.byweekno.flatMap({ (weekno) -> String? in + let byweeknoStrings = rule.byweekno.compactMap({ (weekno) -> String? in guard (-53...53 ~= weekno) && (weekno != 0) else { return nil } @@ -240,7 +240,7 @@ public struct RRule { rruleString += "BYWEEKNO=\(byweeknoStrings.joined(separator: ","));" } - let bymonthdayStrings = rule.bymonthday.flatMap({ (monthday) -> String? in + let bymonthdayStrings = rule.bymonthday.compactMap({ (monthday) -> String? in guard (-31...31 ~= monthday) && (monthday != 0) else { return nil } @@ -278,8 +278,8 @@ public struct RRule { rruleString += "BYSECOND=\(bysecondStrings.joined(separator: ","));" } - if String(rruleString.suffix(from: rruleString.characters.index(rruleString.endIndex, offsetBy: -1))) == ";" { - rruleString.remove(at: rruleString.characters.index(rruleString.endIndex, offsetBy: -1)) + if String(rruleString.suffix(from: rruleString.index(rruleString.endIndex, offsetBy: -1))) == ";" { + rruleString.remove(at: rruleString.index(rruleString.endIndex, offsetBy: -1)) } return rruleString diff --git a/Sources/Supporting Files/Info-iOS.plist b/Sources/Supporting Files/Info-iOS.plist index 6019f05..c941094 100644 --- a/Sources/Supporting Files/Info-iOS.plist +++ b/Sources/Supporting Files/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/Supporting Files/Info-watchOS.plist b/Sources/Supporting Files/Info-watchOS.plist index 6019f05..c941094 100644 --- a/Sources/Supporting Files/Info-watchOS.plist +++ b/Sources/Supporting Files/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.2.0 + 0.4.0 CFBundleSignature ???? CFBundleVersion