Skip to content

Instantly share code, notes, and snippets.

@standinga
Created November 30, 2020 07:00
Show Gist options
  • Save standinga/cc3ea4de4cabb8d0cb7145460a167727 to your computer and use it in GitHub Desktop.
Save standinga/cc3ea4de4cabb8d0cb7145460a167727 to your computer and use it in GitHub Desktop.
IOS/OSX Networking AppDelegate
//
// AppDelegate.swift
// MultiConnect
//
// Created by michal on 29/11/2020.
//
import os.log
import UIKit
func log(_ message: String) {
let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "MPLogging")
os_log("%@", log: log, type: .debug, message)
}
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment