mirror of
https://github.com/google/GoogleUtilities
synced 2026-11-10 22:35:54 +05:45
36 lines
802 B
Swift
36 lines
802 B
Swift
//
|
|
// SwiftUI_iOSApp.swift
|
|
// SwiftUI-iOS
|
|
//
|
|
// Created by Maksym Malyhin on 2021-02-22.
|
|
//
|
|
|
|
import SwiftUI
|
|
import GoogleMulticastAppDelegate
|
|
|
|
@objc
|
|
class AppDelegate: NSObject, MulticastAppDelegateProtocol.Delegate {
|
|
func application(_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
|
return true
|
|
}
|
|
}
|
|
|
|
@main
|
|
struct SwiftUI_iOSApp: App {
|
|
// Set `MulticastAppDelegate` as an App Delegate.
|
|
@UIApplicationDelegateAdaptor(MulticastAppDelegate.self) var delegate
|
|
|
|
init() {
|
|
// Register the app's own App Delegate as an interceptor.
|
|
self.delegate.appDelegate = AppDelegate()
|
|
}
|
|
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
}
|
|
}
|
|
}
|