Skip to content

Commit

Permalink
xcode 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed Apr 8, 2018
1 parent 141beab commit 26620c0
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 60 deletions.
6 changes: 5 additions & 1 deletion RRuleSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
D31B138E1CA8E02E00D0B863 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = Teambition;
TargetAttributes = {
D31B13961CA8E02E00D0B863 = {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
8 changes: 8 additions & 0 deletions RRuleSwift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions RRuleSwiftExample-TodayExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>15</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
Expand Down
4 changes: 2 additions & 2 deletions RRuleSwiftExample-Watch Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>15</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 deletions RRuleSwiftExample-Watch/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>15</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
6 changes: 5 additions & 1 deletion RRuleSwiftExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = Teambition;
TargetAttributes = {
D31B13771CA8D8E400D0B863 = {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down Expand Up @@ -41,7 +41,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -61,7 +60,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -46,7 +45,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 2 additions & 2 deletions RRuleSwiftExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>15</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
10 changes: 5 additions & 5 deletions Sources/ExclusionDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Sources/InclusionDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions Sources/JavaScriptBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 26620c0

Please sign in to comment.