mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Co-authored-by: lostb1t <coding-mosses0z@icloud.com> Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com> Co-authored-by: Gauvain <68083474+Gauvino@users.noreply.github.com> Co-authored-by: Gauvino <uruknarb20@gmail.com> Co-authored-by: storm1er <le.storm1er@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Chris <182387676+whoopsi-daisy@users.noreply.github.com> Co-authored-by: arch-fan <55891793+arch-fan@users.noreply.github.com> Co-authored-by: Alex Kim <alexkim@Alexs-MacBook-Pro.local>
32 lines
968 B
Swift
32 lines
968 B
Swift
import ExpoModulesCore
|
|
|
|
protocol SimpleAppLifecycleListener {
|
|
func applicationDidEnterBackground() -> Void
|
|
func applicationDidEnterForeground() -> Void
|
|
}
|
|
|
|
public class AppLifecycleDelegate: ExpoAppDelegateSubscriber {
|
|
public func applicationDidBecomeActive(_ application: UIApplication) {
|
|
// The app has become active.
|
|
}
|
|
|
|
public func applicationWillResignActive(_ application: UIApplication) {
|
|
// The app is about to become inactive.
|
|
}
|
|
|
|
public func applicationDidEnterBackground(_ application: UIApplication) {
|
|
VLCManager.shared.listeners.forEach { listener in
|
|
listener.applicationDidEnterBackground()
|
|
}
|
|
}
|
|
|
|
public func applicationWillEnterForeground(_ application: UIApplication) {
|
|
VLCManager.shared.listeners.forEach { listener in
|
|
listener.applicationDidEnterForeground()
|
|
}
|
|
}
|
|
|
|
public func applicationWillTerminate(_ application: UIApplication) {
|
|
// The app is about to terminate.
|
|
}
|
|
} |