expo-keep-awake 12.7.0 → 12.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/android/build.gradle +4 -4
- package/expo-module.config.json +1 -1
- package/ios/ExpoKeepAwake.podspec +5 -1
- package/ios/KeepAwakeModule.swift +6 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 12.8.1 — 2024-01-10
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Added support for macOS platform. ([#26221](https://github.com/expo/expo/pull/26221) by [@tsapeta](https://github.com/tsapeta))
|
|
18
|
+
|
|
19
|
+
## 12.8.0 — 2023-11-14
|
|
20
|
+
|
|
21
|
+
### 🛠 Breaking changes
|
|
22
|
+
|
|
23
|
+
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
24
|
+
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
|
|
25
|
+
|
|
13
26
|
## 12.7.0 — 2023-10-17
|
|
14
27
|
|
|
15
28
|
### 🛠 Breaking changes
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '12.
|
|
6
|
+
version = '12.8.1'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -61,11 +61,11 @@ if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
|
61
61
|
android {
|
|
62
62
|
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
63
|
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
64
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
65
|
|
|
66
66
|
defaultConfig {
|
|
67
67
|
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
68
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
publishing {
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
namespace "expo.modules.keepawake"
|
|
95
95
|
defaultConfig {
|
|
96
96
|
versionCode 16
|
|
97
|
-
versionName "12.
|
|
97
|
+
versionName "12.8.1"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
package/expo-module.config.json
CHANGED
|
@@ -10,7 +10,11 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platforms = {
|
|
13
|
+
s.platforms = {
|
|
14
|
+
:ios => '13.4',
|
|
15
|
+
:osx => '10.15',
|
|
16
|
+
:tvos => '13.4'
|
|
17
|
+
}
|
|
14
18
|
s.swift_version = '5.4'
|
|
15
19
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
16
20
|
s.static_framework = true
|
|
@@ -25,9 +25,13 @@ public final class KeepAwakeModule: Module {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
AsyncFunction("isActivated") { () -> Bool in
|
|
28
|
+
#if os(iOS) || os(tvOS)
|
|
28
29
|
return DispatchQueue.main.sync {
|
|
29
30
|
return UIApplication.shared.isIdleTimerDisabled
|
|
30
31
|
}
|
|
32
|
+
#elseif os(macOS)
|
|
33
|
+
return false
|
|
34
|
+
#endif
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
OnAppEntersForeground {
|
|
@@ -45,7 +49,9 @@ public final class KeepAwakeModule: Module {
|
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
private func setActivated(_ activated: Bool) {
|
|
52
|
+
#if os(iOS) || os(tvOS)
|
|
48
53
|
DispatchQueue.main.async {
|
|
49
54
|
UIApplication.shared.isIdleTimerDisabled = activated
|
|
50
55
|
}
|
|
56
|
+
#endif
|
|
51
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-keep-awake",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.1",
|
|
4
4
|
"description": "Provides a React component that prevents the screen sleeping when rendered. It also exposes static methods to control the behavior imperatively.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"jest": {
|
|
43
43
|
"preset": "expo-module-scripts"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ca014bf2516c7644ef303f4c21fdd68de4d99f76"
|
|
46
46
|
}
|