react-native-simple-openvpn
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "react-native-simple-openvpn", | ||
"title": "React Native Simple Openvpn", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "React Native Open VPN Module", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -16,3 +16,3 @@ # react-native-simple-openvpn | ||
| --------------- | ------------ | | ||
| 1.0.0 ~ 1.1.0 | 0.56 ~ 0.66 | | ||
| 1.0.0 ~ 1.2.0 | 0.56 ~ 0.66 | | ||
@@ -56,2 +56,33 @@ ## Preview | ||
#### Disable VPN connection when app is terminated in iOS | ||
Add the following to your project's `AppDelegate.m` : | ||
```diff | ||
+ #import "RNSimpleOpenvpn.h" | ||
@implementation AppDelegate | ||
// ... | ||
+ - (void)applicationWillTerminate:(UIApplication *)application | ||
+ { | ||
+ [RNSimpleOpenvpn dispose]; | ||
+ } | ||
@end | ||
``` | ||
Please make sure the Header Search Paths of Build Settings contain the following paths: | ||
```txt | ||
$(SRCROOT)/../node_modules/react-native-simple-openvpn/ios | ||
``` | ||
Or, if using CocoaPods, the following paths should be automatically included there: | ||
```txt | ||
"${PODS_ROOT}/Headers/Public/react-native-simple-openvpn" | ||
``` | ||
## Example | ||
@@ -58,0 +89,0 @@ |
@@ -16,3 +16,3 @@ # react-native-simple-openvpn | ||
| --------------- | ------------ | | ||
| 1.0.0 ~ 1.1.0 | 0.56 ~ 0.66 | | ||
| 1.0.0 ~ 1.2.0 | 0.56 ~ 0.66 | | ||
@@ -56,2 +56,33 @@ ## 预览 | ||
#### 后台退出 App 时关闭 VPN 连接 | ||
在项目的 `AppDelegate.m` 中添加以下代码: | ||
```diff | ||
+ #import "RNSimpleOpenvpn.h" | ||
@implementation AppDelegate | ||
// ... | ||
+ - (void)applicationWillTerminate:(UIApplication *)application | ||
+ { | ||
+ [RNSimpleOpenvpn dispose]; | ||
+ } | ||
@end | ||
``` | ||
请确保 Build Settings 的 Header Search Paths 包含以下路径: | ||
```txt | ||
$(SRCROOT)/../node_modules/react-native-simple-openvpn/ios | ||
``` | ||
或者, 如果你使用 CocoaPods 的话,Header Search Paths 应该会自动包含以下路径: | ||
```txt | ||
"${PODS_ROOT}/Headers/Public/react-native-simple-openvpn" | ||
``` | ||
## 示例 | ||
@@ -58,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10370843
90
277