Caps-iOS/CapCollector/AppDelegate.swift

43 lines
1.1 KiB
Swift
Raw Normal View History

2018-05-05 08:08:37 +02:00
//
// AppDelegate.swift
2018-08-16 11:18:27 +02:00
// CapFinder
2018-05-05 08:08:37 +02:00
//
2018-08-16 11:18:27 +02:00
// Created by User on 31.01.18.
// Copyright © 2018 User. All rights reserved.
2018-05-05 08:08:37 +02:00
//
import UIKit
2018-08-16 11:18:27 +02:00
import CoreData
import SwiftyDropbox
2018-05-05 08:08:37 +02:00
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
2018-08-16 11:18:27 +02:00
/// Main tint color of the app
static let tintColor = UIColor(red: 122/255, green: 155/255, blue: 41/255, alpha: 1)
2018-05-05 08:08:37 +02:00
var window: UIWindow?
2018-08-16 11:18:27 +02:00
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
DropboxClientsManager.setupWithAppKey("n81tx2g638wuffl")
DiskManager.setupOnFirstLaunch()
return true
}
var frontmostViewController: UIViewController? {
var controller = window?.rootViewController
while let presentedViewController = controller?.presentedViewController {
controller = presentedViewController
}
return controller
}
2018-05-05 08:08:37 +02:00
2018-08-16 11:18:27 +02:00
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
DropboxController.shared.handle(url: url)
2018-05-05 08:08:37 +02:00
return true
}
}