@kobe-brants/react-native-keep-awake 1.0.15 → 1.1.0

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/README.md CHANGED
@@ -5,18 +5,22 @@ Keep device screen awake for React Native
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- npm install react-native-keep-awake
8
+ npm install @kobe-brants/react-native-keep-awake
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
13
 
14
14
  ```js
15
- import { multiply } from 'react-native-keep-awake';
15
+ import KeepAwake from '@kobe-brants/react-native-keep-awake';
16
16
 
17
- // ...
17
+ useEffect(() => {
18
+ KeepAwake.activate();
18
19
 
19
- const result = multiply(3, 7);
20
+ return () => {
21
+ KeepAwake.deactivate();
22
+ };
23
+ }, []);
20
24
  ```
21
25
 
22
26
 
package/ios/KeepAwake.h CHANGED
@@ -1,9 +1,5 @@
1
- #ifdef __cplusplus
2
- #import "react-native-keep-awake.h"
3
- #endif
4
-
5
- #import "generated/RNKeepAwakeSpec/RNKeepAwakeSpec.h"
6
-
7
- @interface KeepAwake : NSObject <NativeKeepAwakeSpec>
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTViewManager.h>
8
3
 
4
+ @interface KeepAwake : NSObject <RCTBridgeModule>
9
5
  @end
package/ios/KeepAwake.mm CHANGED
@@ -1,4 +1,5 @@
1
1
  #import "KeepAwake.h"
2
+ #import <UIKit/UIKit.h>
2
3
 
3
4
  @implementation KeepAwake
4
5
  RCT_EXPORT_MODULE()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kobe-brants/react-native-keep-awake",
3
- "version": "1.0.15",
3
+ "version": "1.1.0",
4
4
  "description": "Keep device screen awake for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",