fix(tvos): enable wakelock plugin

This commit is contained in:
edde746
2026-05-03 01:26:12 +02:00
parent 8820c0e059
commit e9a706fa72
4 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -1407,8 +1407,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: wakelock_plus path: wakelock_plus
ref: HEAD ref: "8595fee595c952b73d430f2eab05f2e0d858290e"
resolved-ref: "0085d705c80a961a4a5eeaa4ee8f723dcf4bc9b8" resolved-ref: "8595fee595c952b73d430f2eab05f2e0d858290e"
url: "https://github.com/edde746/wakelock_plus" url: "https://github.com/edde746/wakelock_plus"
source: git source: git
version: "1.4.0" version: "1.4.0"
+1
View File
@@ -37,6 +37,7 @@ dependencies:
wakelock_plus: wakelock_plus:
git: git:
url: https://github.com/edde746/wakelock_plus url: https://github.com/edde746/wakelock_plus
ref: 8595fee595c952b73d430f2eab05f2e0d858290e
path: wakelock_plus path: wakelock_plus
path_provider: ^2.1.0 path_provider: ^2.1.0
path: ^1.9.0 path: ^1.9.0
+1 -1
View File
@@ -12,7 +12,7 @@ project 'Runner', {
# compiled from tvos/Runner/Plugins/ via tvos/scripts/wire_plugins.rb. # compiled from tvos/Runner/Plugins/ via tvos/scripts/wire_plugins.rb.
require 'json' require 'json'
tvos_pod_plugins = %w[universal_gamepad os_media_controls] tvos_pod_plugins = %w[universal_gamepad os_media_controls wakelock_plus]
plugins_deps = File.expand_path('../.flutter-plugins-dependencies', __dir__) plugins_deps = File.expand_path('../.flutter-plugins-dependencies', __dir__)
unless File.exist?(plugins_deps) unless File.exist?(plugins_deps)
+4
View File
@@ -3,6 +3,7 @@ import UIKit
import AVFoundation import AVFoundation
import universal_gamepad import universal_gamepad
import os_media_controls import os_media_controls
import wakelock_plus
@main @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
@@ -44,6 +45,9 @@ import os_media_controls
if let r = self.registrar(forPlugin: "OsMediaControlsPlugin") { if let r = self.registrar(forPlugin: "OsMediaControlsPlugin") {
OsMediaControlsPlugin.register(with: r) OsMediaControlsPlugin.register(with: r)
} }
if let r = self.registrar(forPlugin: "WakelockPlusPlugin") {
WakelockPlusPlugin.register(with: r)
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }