expo-keep-awake 12.8.0 → 12.8.2

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 CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 12.8.2 — 2024-01-18
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 12.8.1 — 2024-01-10
18
+
19
+ ### 🎉 New features
20
+
21
+ - Added support for macOS platform. ([#26221](https://github.com/expo/expo/pull/26221) by [@tsapeta](https://github.com/tsapeta))
22
+
13
23
  ## 12.8.0 — 2023-11-14
14
24
 
15
25
  ### 🛠 Breaking changes
@@ -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.8.0'
6
+ version = '12.8.2'
7
7
 
8
8
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
9
9
  if (expoModulesCorePlugin.exists()) {
@@ -94,7 +94,7 @@ android {
94
94
  namespace "expo.modules.keepawake"
95
95
  defaultConfig {
96
96
  versionCode 16
97
- versionName "12.8.0"
97
+ versionName "12.8.2"
98
98
  }
99
99
  }
100
100
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "platforms": ["ios", "android"],
3
- "ios": {
2
+ "platforms": ["apple", "android"],
3
+ "apple": {
4
4
  "modules": ["KeepAwakeModule"]
5
5
  },
6
6
  "android": {
@@ -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 = { :ios => '13.4', :tvos => '13.4'}
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.8.0",
3
+ "version": "12.8.2",
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": "3142a086578deffd8704a8f1b6f0f661527d836c"
45
+ "gitHead": "102899632731658eecba006c0d1c79b98ba8f5f7"
46
46
  }