Skip to content

Commit e64c358

Browse files
authored
Merge pull request #95 from diegotori/fix_spm_integration
Fix SPM integration
2 parents 10150ba + e29c0fc commit e64c358

File tree

13 files changed

+163
-80
lines changed

13 files changed

+163
-80
lines changed

wakelock_plus/android/src/main/kotlin/dev/fluttercommunity/plus/wakelock/WakelockPlusMessages.g.kt

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
1+
// Autogenerated from Pigeon (v25.3.0), do not edit directly.
22
// See also: https://pub.dev/packages/pigeon
33
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
44

@@ -44,6 +44,36 @@ class WakelockPlusFlutterError (
4444
override val message: String? = null,
4545
val details: Any? = null
4646
) : Throwable()
47+
private fun deepEqualsWakelockPlusMessages(a: Any?, b: Any?): Boolean {
48+
if (a is ByteArray && b is ByteArray) {
49+
return a.contentEquals(b)
50+
}
51+
if (a is IntArray && b is IntArray) {
52+
return a.contentEquals(b)
53+
}
54+
if (a is LongArray && b is LongArray) {
55+
return a.contentEquals(b)
56+
}
57+
if (a is DoubleArray && b is DoubleArray) {
58+
return a.contentEquals(b)
59+
}
60+
if (a is Array<*> && b is Array<*>) {
61+
return a.size == b.size &&
62+
a.indices.all{ deepEqualsWakelockPlusMessages(a[it], b[it]) }
63+
}
64+
if (a is List<*> && b is List<*>) {
65+
return a.size == b.size &&
66+
a.indices.all{ deepEqualsWakelockPlusMessages(a[it], b[it]) }
67+
}
68+
if (a is Map<*, *> && b is Map<*, *>) {
69+
return a.size == b.size && a.all {
70+
(b as Map<Any?, Any?>).containsKey(it.key) &&
71+
deepEqualsWakelockPlusMessages(it.value, b[it.key])
72+
}
73+
}
74+
return a == b
75+
}
76+
4777

4878
/**
4979
* Message for toggling the wakelock on the platform side.
@@ -65,6 +95,16 @@ data class ToggleMessage (
6595
enable,
6696
)
6797
}
98+
override fun equals(other: Any?): Boolean {
99+
if (other !is ToggleMessage) {
100+
return false
101+
}
102+
if (this === other) {
103+
return true
104+
}
105+
return deepEqualsWakelockPlusMessages(toList(), other.toList()) }
106+
107+
override fun hashCode(): Int = toList().hashCode()
68108
}
69109

70110
/**
@@ -87,6 +127,16 @@ data class IsEnabledMessage (
87127
enabled,
88128
)
89129
}
130+
override fun equals(other: Any?): Boolean {
131+
if (other !is IsEnabledMessage) {
132+
return false
133+
}
134+
if (this === other) {
135+
return true
136+
}
137+
return deepEqualsWakelockPlusMessages(toList(), other.toList()) }
138+
139+
override fun hashCode(): Int = toList().hashCode()
90140
}
91141
private open class WakelockPlusMessagesPigeonCodec : StandardMessageCodec() {
92142
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {

wakelock_plus/example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ EXTERNAL SOURCES:
2525

2626
SPEC CHECKSUMS:
2727
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
28-
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
29-
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
30-
wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
28+
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
29+
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
30+
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
3131

3232
PODFILE CHECKSUM: beab77b38961de946f08660e554f80ac174dc842
3333

34-
COCOAPODS: 1.16.1
34+
COCOAPODS: 1.16.2

wakelock_plus/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
ignoresPersistentStateOnLaunch = "NO"
6060
debugDocumentVersioning = "YES"
6161
debugServiceExtension = "internal"
62+
enableGPUValidationMode = "1"
6263
allowLocationSimulation = "YES">
6364
<BuildableProductRunnable
6465
runnableDebuggingMode = "0">

wakelock_plus/ios/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ profile
99

1010
DerivedData/
1111
build/
12+
.build/
1213
GeneratedPluginRegistrant.h
1314
GeneratedPluginRegistrant.m
1415

wakelock_plus/ios/wakelock_plus.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Plugin that allows you to keep the device screen awake, i.e. prevent the screen
1616
s.source_files = 'wakelock_plus/Sources/wakelock_plus/**/*.{h,m}'
1717
s.public_header_files = 'wakelock_plus/Sources/wakelock_plus/include/**/*.h'
1818
s.dependency 'Flutter'
19-
s.platform = :ios, '11.0'
19+
s.platform = :ios, '12.0'
2020

2121
# Flutter.framework does not contain a i386 slice.
2222
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }

wakelock_plus/ios/wakelock_plus/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
name: "wakelock_plus",
1818
dependencies: [],
1919
resources: [
20-
.process("Resources")
20+
.process("PrivacyInfo.xcprivacy"),
2121
],
2222
cSettings: [
2323
.headerSearchPath("include/wakelock_plus")

wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/UIApplication+idleTimerLock.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by suyao on 2021/12/17.
66
//
77

8-
#import "UIApplication+idleTimerLock.h"
8+
#import "./include/wakelock_plus/UIApplication+idleTimerLock.h"
99
#import <objc/runtime.h>
1010

1111
static NSString *idleTimerLockKey = @"idleTimerLockKey";

wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/WakelockPlusPlugin.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#import "WakelockPlusPlugin.h"
2-
#import "messages.g.h"
3-
#import "UIApplication+idleTimerLock.h"
1+
#import "./include/wakelock_plus/WakelockPlusPlugin.h"
2+
#import "./include/wakelock_plus/messages.g.h"
3+
#import "./include/wakelock_plus/UIApplication+idleTimerLock.h"
44

55
@interface WakelockPlusPlugin () <WAKELOCKPLUSWakelockPlusApi>
66

wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/messages.g.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
1+
// Autogenerated from Pigeon (v25.3.0), do not edit directly.
22
// See also: https://pub.dev/packages/pigeon
33

44
#import <Foundation/Foundation.h>

wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/messages.g.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
1+
// Autogenerated from Pigeon (v25.3.0), do not edit directly.
22
// See also: https://pub.dev/packages/pigeon
33

44
#import "./include/wakelock_plus/messages.g.h"

0 commit comments

Comments
 (0)