apps-sdk 1.0.70 → 1.0.71
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/package.json +2 -1
- package/src/components/PayWall.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apps-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"description": "Apps SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"expo-constants": "^15.4.5",
|
|
16
16
|
"expo-device": "^5.9.3",
|
|
17
17
|
"expo-file-system": "^16.0.6",
|
|
18
|
+
"expo-linking": "^6.2.2",
|
|
18
19
|
"expo-localization": "^14.8.3",
|
|
19
20
|
"expo-media-library": "^15.9.1",
|
|
20
21
|
"expo-notifications": "^0.23.0",
|
|
@@ -6,6 +6,7 @@ import Utils from "../libraries/Utils";
|
|
|
6
6
|
import Networking from "../libraries/Networking";
|
|
7
7
|
import PayWallLogic from "../libraries/PayWallLogic";
|
|
8
8
|
import Session from "../libraries/Session";
|
|
9
|
+
import * as Linking from 'expo-linking';
|
|
9
10
|
import * as config from "../../config";
|
|
10
11
|
|
|
11
12
|
class PayWall extends React.Component {
|
|
@@ -121,7 +122,17 @@ class PayWall extends React.Component {
|
|
|
121
122
|
return (
|
|
122
123
|
<BottomSheet visible={visible} onBackButtonPress={onClose} onBackdropPress={onClose}>
|
|
123
124
|
<View style={styles.bottomNavigationView}>
|
|
124
|
-
<WebView style={{flex:1}} source={{ uri: this.paywallData.url }} javaScriptEnabled ref={this.webviewRef} onMessage={this.handleMessage} onError={(err) => {console.log('Error al cargar webview:',err)}} injectedJavaScript={PayWallLogic.paywallJS}
|
|
125
|
+
<WebView style={{flex:1}} source={{ uri: this.paywallData.url }} javaScriptEnabled ref={this.webviewRef} onMessage={this.handleMessage} onError={(err) => {console.log('Error al cargar webview:',err)}} injectedJavaScript={PayWallLogic.paywallJS}
|
|
126
|
+
onShouldStartLoadWithRequest={request => {
|
|
127
|
+
console.log('request', request);
|
|
128
|
+
if (request.url !== this.paywallData.url) {
|
|
129
|
+
Linking.openURL(request.url);
|
|
130
|
+
return false;
|
|
131
|
+
} else {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
125
136
|
</View>
|
|
126
137
|
</BottomSheet>
|
|
127
138
|
);
|