Skip to content

Commit

Permalink
support Xcode 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinhope committed Sep 26, 2018
1 parent 7520cda commit 0d82cff
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 40 deletions.
8 changes: 4 additions & 4 deletions RRuleSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -417,7 +417,7 @@
PRODUCT_NAME = RRuleSwift;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -441,7 +441,7 @@
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -466,7 +466,7 @@
SKIP_INSTALL = YES;
SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME)-Swift.h";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down
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.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</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.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</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.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
16 changes: 8 additions & 8 deletions RRuleSwiftExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample;
PRODUCT_NAME = RRuleSwiftExample;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -588,7 +588,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample;
PRODUCT_NAME = RRuleSwiftExample;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -601,7 +601,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.TodayExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -614,7 +614,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.TodayExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -630,7 +630,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -648,7 +648,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -664,7 +664,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -680,7 +680,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down
20 changes: 6 additions & 14 deletions RRuleSwiftExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,29 @@ import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.

}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.

}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.

}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

func applicationWillTerminate(_ application: UIApplication) {

}
}

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.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
8 changes: 4 additions & 4 deletions RRuleSwiftExample/RRuleExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ extension RRuleExampleViewController: UITableViewDataSource, UITableViewDelegate
cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
}
cell?.selectionStyle = .none
cell?.textLabel?.font = UIFont.systemFont(ofSize: 15)
cell?.textLabel?.font = .systemFont(ofSize: 15)
cell?.textLabel?.text = kWeekdays[indexPath.row]
let weekdays = rule.byweekday.map({ (weekday) -> IndexPath in
return IndexPath(row: weekday.toNumberSymbol(), section: 6)
Expand All @@ -215,7 +215,7 @@ extension RRuleExampleViewController: UITableViewDataSource, UITableViewDelegate
cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
}
cell?.selectionStyle = .none
cell?.textLabel?.font = UIFont.systemFont(ofSize: 15)
cell?.textLabel?.font = .systemFont(ofSize: 15)
cell?.textLabel?.text = kMonths[indexPath.row]
let months = rule.bymonth.map({ (month) -> IndexPath in
return IndexPath(row: month - 1, section: 7)
Expand All @@ -232,7 +232,7 @@ extension RRuleExampleViewController: UITableViewDataSource, UITableViewDelegate
cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
}
cell?.selectionStyle = .none
cell?.textLabel?.font = UIFont.systemFont(ofSize: 15)
cell?.textLabel?.font = .systemFont(ofSize: 15)
cell?.textLabel?.text = String(indexPath.row + 1)
let monthdays = rule.bymonthday.map({ (month) -> IndexPath in
return IndexPath(row: month - 1, section: 8)
Expand All @@ -248,7 +248,7 @@ extension RRuleExampleViewController: UITableViewDataSource, UITableViewDelegate
if cell == nil {
cell = UITableViewCell(style: .default, reuseIdentifier: "Cell")
}
cell?.textLabel?.font = UIFont.systemFont(ofSize: 15)
cell?.textLabel?.font = .systemFont(ofSize: 15)
return cell!
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Supporting Files/Info-iOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Supporting Files/Info-watchOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.4.1</string>
<string>0.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 0d82cff

Please sign in to comment.