@kobe-brants/react-native-keep-awake 1.0.13 → 1.0.14

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.
Files changed (2) hide show
  1. package/ios/KeepAwake.mm +14 -4
  2. package/package.json +1 -1
package/ios/KeepAwake.mm CHANGED
@@ -3,18 +3,28 @@
3
3
  @implementation KeepAwake
4
4
  RCT_EXPORT_MODULE()
5
5
 
6
- RCT_EXPORT_METHOD(activate)
7
- {
6
+ - (jsi::Value)activate:(jsi::Runtime & _Nonnull)rt
7
+ args:(jsi::Value const * _Nonnull)args
8
+ count:(size_t)count {
8
9
  dispatch_async(dispatch_get_main_queue(), ^{
9
10
  [UIApplication sharedApplication].idleTimerDisabled = YES;
10
11
  });
12
+ return jsi::Value::undefined();
11
13
  }
12
14
 
13
- RCT_EXPORT_METHOD(deactivate)
14
- {
15
+ - (jsi::Value)deactivate:(jsi::Runtime & _Nonnull)rt
16
+ args:(jsi::Value const * _Nonnull)args
17
+ count:(size_t)count {
15
18
  dispatch_async(dispatch_get_main_queue(), ^{
16
19
  [UIApplication sharedApplication].idleTimerDisabled = NO;
17
20
  });
21
+ return jsi::Value::undefined();
22
+ }
23
+
24
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
25
+ (const facebook::react::ObjCTurboModule::InitParams &)params
26
+ {
27
+ return std::make_shared<facebook::react::NativeKeepAwakeSpecJSI>(params);
18
28
  }
19
29
 
20
30
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kobe-brants/react-native-keep-awake",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Keep device screen awake for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",