mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-03-18 07:24:14 +01:00
Swift 4 and tweaks to example projects
This commit is contained in:
@@ -28,12 +28,13 @@
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
AppDelegate.setupArmchair()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
let Pages = "361309726" // Pages iOS
|
||||
let appID = "361309726" // Pages iOS
|
||||
|
||||
#elseif os(OSX)
|
||||
|
||||
@@ -43,9 +44,12 @@
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@IBOutlet weak var window: NSWindow!
|
||||
|
||||
override init() {
|
||||
AppDelegate.setupArmchair()
|
||||
}
|
||||
}
|
||||
|
||||
let Pages = "409201541" // Pages Mac
|
||||
let appID = "409201541" // Pages Mac
|
||||
|
||||
#else
|
||||
#endif
|
||||
@@ -54,10 +58,6 @@ import Armchair
|
||||
|
||||
extension AppDelegate {
|
||||
|
||||
override class func initialize() {
|
||||
AppDelegate.setupArmchair()
|
||||
}
|
||||
|
||||
class func setupArmchair() {
|
||||
// Normally, all the setup would be here.
|
||||
// But, because we are presenting a few different setups in the example,
|
||||
@@ -68,7 +68,7 @@ extension AppDelegate {
|
||||
// because it needs to receive application life-cycle notifications
|
||||
//
|
||||
// NOTE: The appID call always has to go before any other Armchair calls
|
||||
Armchair.appID(Pages)
|
||||
Armchair.appID(appID)
|
||||
Armchair.debugEnabled(true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user