AppDelegate.swift 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //// CryptoSwift
  2. //
  3. // Copyright (C) 2014-2018 Marcin Krzyżanowski <marcin@krzyzanowskim.com>
  4. // This software is provided 'as-is', without any express or implied warranty.
  5. //
  6. // In no event will the authors be held liable for any damages arising from the use of this software.
  7. //
  8. // Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
  9. //
  10. // - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required.
  11. // - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  12. // - This notice may not be removed or altered from any source or binary distribution.
  13. //
  14. import UIKit
  15. @UIApplicationMain
  16. class AppDelegate: UIResponder, UIApplicationDelegate {
  17. var window: UIWindow?
  18. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  19. // Override point for customization after application launch.
  20. return true
  21. }
  22. func applicationWillResignActive(_ application: UIApplication) {
  23. // 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.
  24. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
  25. }
  26. func applicationDidEnterBackground(_ application: UIApplication) {
  27. // 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.
  28. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  29. }
  30. func applicationWillEnterForeground(_ application: UIApplication) {
  31. // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
  32. }
  33. func applicationDidBecomeActive(_ application: UIApplication) {
  34. // 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.
  35. }
  36. func applicationWillTerminate(_ application: UIApplication) {
  37. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  38. }
  39. }