|
1 | 1 | # react-native-exit-app
|
2 |
| -Exit / Close / Kill / shutdown your react native app. Does not invoke a crash notification. |
3 | 2 |
|
4 |
| -NOTICE: |
5 |
| -- for React Native < 0.47 use react-native-exit-app <1.x.x |
6 |
| -- for React Native > 0.47 use react-native-exit-app >=1.x.x |
7 |
| -- React Native with **new architecture** enabled use react-native-exit-app >=2.x.x (**compatible with old architecture**) |
| 3 | +本项目基于 [react-native-exit-app](https://github.com/wumke/react-native-exit-app) |
8 | 4 |
|
9 |
| -## Setup |
| 5 | +## 文档地址 / Documentation URL |
10 | 6 |
|
11 |
| -NOTICE: |
12 |
| -Installation steps can be skipped in new architecture and newer React Native versions, just |
13 |
| -```bash |
14 |
| -npm install react-native-exit-app --save |
15 |
| -``` |
| 7 | +[中文 / Chinese](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-exit-app.md) |
16 | 8 |
|
17 |
| -Fast and easy: |
18 |
| -```bash |
19 |
| -npm install react-native-exit-app --save |
20 |
| -react-native link react-native-exit-app |
21 |
| -``` |
| 9 | +## Codegen |
22 | 10 |
|
23 |
| -Or manual: add the latest version as dependeny to your package.json. |
| 11 | +该库已接入 codegen,具体请查阅文档。 |
24 | 12 |
|
25 |
| -```javascript |
26 |
| -{ |
27 |
| - "name": "YourProject", |
28 |
| - ... |
29 |
| - }, |
30 |
| - "dependencies": { |
31 |
| - ... |
32 |
| - "react-native-exit-app": "0.1.0", |
33 |
| - ... |
34 |
| - } |
35 |
| -``` |
| 13 | +The library has been integrated with codegen. Please refer to the documentation for details. |
36 | 14 |
|
37 |
| -#### iOS |
38 |
| -* Add RNExitApp.xcoderproj into your project in the Libraries folder. |
39 |
| -* Add the .a file on the General tab of your target under Linked Frameworks And Libraries |
40 |
| -* Add the .a file on the Build Phases tab of your target under Link Binary With Libraries |
| 15 | +## 请悉知 / Acknowledgements |
41 | 16 |
|
42 |
| -#### Android |
43 |
| -* In the settings.gradle |
44 |
| - ``` |
45 |
| - include ':react-native-exit-app', ':app' |
46 |
| - project(':react-native-exit-app').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-exit-app/android') |
47 |
| - ``` |
48 |
| -* In the build.gradle |
49 |
| - ``` |
50 |
| - compile project(':react-native-exit-app') |
51 |
| - ``` |
52 |
| -* In MainApplication.java |
53 |
| - ``` |
54 |
| - import com.github.wumke.RNExitApp.RNExitAppPackage; |
55 |
| - ... |
56 |
| - @Override |
57 |
| - protected List<ReactPackage> getPackages() { |
58 |
| - return Arrays.<ReactPackage>asList( |
59 |
| - ... |
60 |
| - new RNExitAppPackage(), |
61 |
| - ... |
62 |
| - ); |
63 |
| - } |
64 |
| - ... |
65 |
| - ``` |
66 |
| -## Usage |
67 |
| - |
68 |
| -```javascript |
69 |
| -import RNExitApp from 'react-native-exit-app'; |
70 |
| -... |
71 |
| -RNExitApp.exitApp(); |
72 |
| -... |
73 |
| -``` |
74 |
| - |
75 |
| -## Versioning |
76 |
| - |
77 |
| -This project uses semantic versioning: MAJOR.MINOR.PATCH. |
78 |
| -This means that releases within the same MAJOR version are always backwards compatible. For more info see [semver.org](http://semver.org/). |
| 17 | +本项目基于 [The MIT License (MIT)](https://github.com/wumke/react-native-exit-app/blob/master/LICENSE) ,请自由地享受和参与开源。 |
0 commit comments