pushwoosh-react-native-plugin 6.1.39 → 6.1.41
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/.github/ISSUE_TEMPLATE/bug_report.yml +4 -0
- package/package.json +1 -1
- package/pushwoosh-react-native-plugin.podspec +1 -1
- package/src/android/.gradle/5.6.4/fileChanges/last-build.bin +0 -0
- package/src/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
- package/src/android/.gradle/5.6.4/gc.properties +0 -0
- package/src/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/LICENSE +0 -21
- package/example/README.md +0 -58
- package/example/Screenshots/Android_1.png +0 -0
- package/example/Screenshots/Android_2.png +0 -0
- package/example/Screenshots/iOS_1.png +0 -0
- package/example/Screenshots/iOS_2.png +0 -0
- package/example/demoapp/.bundle/config +0 -2
- package/example/demoapp/.eslintrc.js +0 -4
- package/example/demoapp/.prettierrc.js +0 -7
- package/example/demoapp/.watchmanconfig +0 -1
- package/example/demoapp/Actions.js +0 -302
- package/example/demoapp/App.tsx +0 -118
- package/example/demoapp/Gemfile +0 -9
- package/example/demoapp/Gemfile.lock +0 -105
- package/example/demoapp/README.md +0 -79
- package/example/demoapp/Settings.js +0 -126
- package/example/demoapp/__tests__/App.test.tsx +0 -17
- package/example/demoapp/android/app/build.gradle +0 -118
- package/example/demoapp/android/app/debug.keystore +0 -0
- package/example/demoapp/android/app/google-services.json +0 -979
- package/example/demoapp/android/app/proguard-rules.pro +0 -10
- package/example/demoapp/android/app/src/debug/AndroidManifest.xml +0 -9
- package/example/demoapp/android/app/src/main/AndroidManifest.xml +0 -25
- package/example/demoapp/android/app/src/main/java/com/demoapp/MainActivity.kt +0 -22
- package/example/demoapp/android/app/src/main/java/com/demoapp/MainApplication.kt +0 -43
- package/example/demoapp/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/example/demoapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/demoapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/demoapp/android/app/src/main/res/values/strings.xml +0 -3
- package/example/demoapp/android/app/src/main/res/values/styles.xml +0 -9
- package/example/demoapp/android/build.gradle +0 -21
- package/example/demoapp/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/demoapp/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/example/demoapp/android/gradle.properties +0 -41
- package/example/demoapp/android/gradlew +0 -249
- package/example/demoapp/android/gradlew.bat +0 -92
- package/example/demoapp/android/settings.gradle +0 -4
- package/example/demoapp/app.json +0 -4
- package/example/demoapp/babel.config.js +0 -3
- package/example/demoapp/index.js +0 -46
- package/example/demoapp/ios/.xcode.env +0 -11
- package/example/demoapp/ios/NotificationService/Info.plist +0 -15
- package/example/demoapp/ios/NotificationService/NotificationService.entitlements +0 -8
- package/example/demoapp/ios/NotificationService/NotificationService.swift +0 -38
- package/example/demoapp/ios/Podfile +0 -40
- package/example/demoapp/ios/demoapp/AppDelegate.h +0 -6
- package/example/demoapp/ios/demoapp/AppDelegate.mm +0 -31
- package/example/demoapp/ios/demoapp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/demoapp/ios/demoapp/Images.xcassets/Contents.json +0 -6
- package/example/demoapp/ios/demoapp/Info.plist +0 -57
- package/example/demoapp/ios/demoapp/LaunchScreen.storyboard +0 -47
- package/example/demoapp/ios/demoapp/PrivacyInfo.xcprivacy +0 -37
- package/example/demoapp/ios/demoapp/demoapp.entitlements +0 -10
- package/example/demoapp/ios/demoapp/main.m +0 -10
- package/example/demoapp/ios/demoapp.xcodeproj/project.pbxproj +0 -937
- package/example/demoapp/ios/demoapp.xcodeproj/xcshareddata/xcschemes/demoapp.xcscheme +0 -88
- package/example/demoapp/ios/demoapp.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/demoapp/ios/demoapp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/demoapp/ios/demoappTests/Info.plist +0 -24
- package/example/demoapp/ios/demoappTests/demoappTests.m +0 -66
- package/example/demoapp/jest.config.js +0 -3
- package/example/demoapp/logos.png +0 -0
- package/example/demoapp/metro.config.js +0 -20
- package/example/demoapp/package.json +0 -42
- package/example/demoapp/tsconfig.json +0 -3
- package/example/demoapp/yarn.lock +0 -7153
|
@@ -58,6 +58,10 @@ body:
|
|
|
58
58
|
label: Your Pushwoosh React Native Plugin version
|
|
59
59
|
description: Your React Native Plugin version which was integrated to the app. You may find it on the [releases page](https://github.com/Pushwoosh/pushwoosh-react-native-plugin/releases)
|
|
60
60
|
options:
|
|
61
|
+
- 6.1.41
|
|
62
|
+
- 6.1.40
|
|
63
|
+
- 6.1.40
|
|
64
|
+
- 6.1.41
|
|
61
65
|
- 6.1.39
|
|
62
66
|
- 6.1.38
|
|
63
67
|
- 6.1.37
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
package/example/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 Pushwoosh
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/example/README.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# REACT NATIVE SAMPLE
|
|
2
|
-
|
|
3
|
-
## To launch and utilize a sample with Pushwoosh SDK integration, clone or download the repository archive.
|
|
4
|
-
|
|
5
|
-
### iOS
|
|
6
|
-
<img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/iOS_1.png" alt="Alt text" width="300"> <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/iOS_2.png" alt="Alt text" width="300">
|
|
7
|
-
|
|
8
|
-
### Android
|
|
9
|
-
<img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/Android_1.png" alt="Alt text" width="300"> <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/Android_2.png" alt="Alt text" width="300">
|
|
10
|
-
|
|
11
|
-
### 1. Open demoapp -> Settings.js and add your App ID and FCM Sender ID.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
/**
|
|
15
|
-
* initialize Pushwoosh SDK.
|
|
16
|
-
* Example params: {"pw_appid": "application id", "project_number": "FCM sender id"}
|
|
17
|
-
*
|
|
18
|
-
* 1. app_id - YOUR_APP_ID
|
|
19
|
-
* 2. sender_id - FCM_SENDER_ID
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
Pushwoosh.init({ "pw_appid" : "XXXXX-XXXXX", "project_number":"XXXXXXXXXXXX"});
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 2. Add 'google-services.json' file in android -> app folder.
|
|
27
|
-
|
|
28
|
-
### 3. Add GoogleServices gradle plugin to your project's build.gradle
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
// you should already have buildscript and dependencies blocks in your project's build.gradle so just put the classpath line there
|
|
32
|
-
|
|
33
|
-
buildscript {
|
|
34
|
-
dependencies {
|
|
35
|
-
classpath 'com.google.gms:google-services:4.3.3'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 4. Apply GoogleServicesPlugin in your app's build.gradle
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
// add these lines to the very end of your build.gradle
|
|
45
|
-
|
|
46
|
-
apply {
|
|
47
|
-
plugin com.google.gms.googleservices.GoogleServicesPlugin
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## The guide for SDK integration is available on Pushwoosh [website](https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/react-native/integrating-react-native-plugin).
|
|
53
|
-
|
|
54
|
-
Documentation:
|
|
55
|
-
https://github.com/Pushwoosh/pushwoosh-ios-sdk/tree/master/Documentation
|
|
56
|
-
|
|
57
|
-
Pushwoosh team
|
|
58
|
-
http://www.pushwoosh.com
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, StyleSheet, TextInput, ScrollView, TouchableOpacity, Text, Image, Alert } from 'react-native';
|
|
3
|
-
import Pushwoosh from 'pushwoosh-react-native-plugin';
|
|
4
|
-
|
|
5
|
-
const ButtonWithTextInput = ({ buttonText, onPress, placeholder1, placeholder2 }) => {
|
|
6
|
-
const [inputValue1, setInputValue1] = useState('');
|
|
7
|
-
const [inputValue2, setInputValue2] = useState('');
|
|
8
|
-
|
|
9
|
-
const handlePress = () => {
|
|
10
|
-
onPress(inputValue1, inputValue2);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<View style={styles.header}>
|
|
15
|
-
<TouchableOpacity
|
|
16
|
-
style={[styles.button, { flex: 1 }]}
|
|
17
|
-
onPress={handlePress}
|
|
18
|
-
>
|
|
19
|
-
<Text style={styles.buttonText}>{buttonText}</Text>
|
|
20
|
-
</TouchableOpacity>
|
|
21
|
-
{placeholder1 && (
|
|
22
|
-
<TextInput
|
|
23
|
-
style={[styles.textField, { flex: 1, marginRight: 5 }]}
|
|
24
|
-
placeholder={placeholder1}
|
|
25
|
-
value={inputValue1}
|
|
26
|
-
onChangeText={text => setInputValue1(text)}
|
|
27
|
-
/>
|
|
28
|
-
)}
|
|
29
|
-
{placeholder2 && (
|
|
30
|
-
<TextInput
|
|
31
|
-
style={[styles.textField, { flex: 1 }]}
|
|
32
|
-
placeholder={placeholder2}
|
|
33
|
-
value={inputValue2}
|
|
34
|
-
onChangeText={text => setInputValue2(text)}
|
|
35
|
-
/>
|
|
36
|
-
)}
|
|
37
|
-
</View>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const Button = ({ buttonText, onPress }) => {
|
|
42
|
-
return (
|
|
43
|
-
<View style={styles.header}>
|
|
44
|
-
<TouchableOpacity
|
|
45
|
-
style={[styles.button, { flex: 1 }]}
|
|
46
|
-
onPress={onPress}
|
|
47
|
-
>
|
|
48
|
-
<Text style={styles.buttonText}>{buttonText}</Text>
|
|
49
|
-
</TouchableOpacity>
|
|
50
|
-
</View>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const Actions = () => {
|
|
55
|
-
return (
|
|
56
|
-
<ScrollView contentContainerStyle={styles.container}>
|
|
57
|
-
<View style={styles.imageContainer}>
|
|
58
|
-
<Image
|
|
59
|
-
source={require('./logos.png')}
|
|
60
|
-
style={styles.image}
|
|
61
|
-
/>
|
|
62
|
-
</View>
|
|
63
|
-
<ButtonWithTextInput buttonText="SET USER ID" onPress={(inputValue1) => {
|
|
64
|
-
/**
|
|
65
|
-
* Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
66
|
-
* This allows data and events to be matched across multiple user devices.
|
|
67
|
-
*
|
|
68
|
-
* PUSHWOOSH CODE
|
|
69
|
-
* | |
|
|
70
|
-
* _| |_
|
|
71
|
-
* \ /
|
|
72
|
-
* \ /
|
|
73
|
-
* \_/
|
|
74
|
-
*/
|
|
75
|
-
Pushwoosh.setUserId(inputValue1,
|
|
76
|
-
() => {
|
|
77
|
-
console.log("User ID was successfully set.");
|
|
78
|
-
},
|
|
79
|
-
(error) => {
|
|
80
|
-
console.error("Failed to set User ID:", error);
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}} placeholder1="USER ID" />
|
|
84
|
-
|
|
85
|
-
<ButtonWithTextInput buttonText="POST EVENT" onPress={(inputValue1) => {
|
|
86
|
-
/**
|
|
87
|
-
* Post events for In-App Messages. This can trigger In-App message HTML as specified in Pushwoosh Control Panel.
|
|
88
|
-
* [event] is string name of the event
|
|
89
|
-
* [attributes] is map contains additional event attributes
|
|
90
|
-
*
|
|
91
|
-
* PUSHWOOSH CODE
|
|
92
|
-
* | |
|
|
93
|
-
* _| |_
|
|
94
|
-
* \ /
|
|
95
|
-
* \ /
|
|
96
|
-
* \_/
|
|
97
|
-
*/
|
|
98
|
-
Pushwoosh.postEvent(inputValue1, { attribute1: "value1", attribute2: "value2" });
|
|
99
|
-
}} placeholder1="EVENT NAME" />
|
|
100
|
-
|
|
101
|
-
<ButtonWithTextInput buttonText="SET LANGUAGE" onPress={(inputValue1) => {
|
|
102
|
-
/**
|
|
103
|
-
* setLanguage(language: string): void; method
|
|
104
|
-
*
|
|
105
|
-
* PUSHWOOSH CODE
|
|
106
|
-
* | |
|
|
107
|
-
* _| |_
|
|
108
|
-
* \ /
|
|
109
|
-
* \ /
|
|
110
|
-
* \_/
|
|
111
|
-
*/
|
|
112
|
-
Pushwoosh.setLanguage(inputValue1);
|
|
113
|
-
}} placeholder1="en" />
|
|
114
|
-
|
|
115
|
-
<ButtonWithTextInput buttonText="SET TAGS" onPress={(inputValue1, inputValue2) => {
|
|
116
|
-
/**
|
|
117
|
-
* Associates device with given [tags]. If setTags request fails tags will be resent on the next application launch.
|
|
118
|
-
*
|
|
119
|
-
* PUSHWOOSH CODE
|
|
120
|
-
* | |
|
|
121
|
-
* _| |_
|
|
122
|
-
* \ /
|
|
123
|
-
* \ /
|
|
124
|
-
* \_/
|
|
125
|
-
*/
|
|
126
|
-
Pushwoosh.setTags({ 'tags': inputValue1, 'value': inputValue2 },
|
|
127
|
-
() => {
|
|
128
|
-
console.log("Tags were successfully set.");
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
(error) => {
|
|
132
|
-
console.error("Failed to set tags:", error);
|
|
133
|
-
});
|
|
134
|
-
}} placeholder1="KEY" placeholder2="VALUE" />
|
|
135
|
-
|
|
136
|
-
<ButtonWithTextInput buttonText="USER EMAILS" onPress={(inputValue1, inputValue2) => {
|
|
137
|
-
/**
|
|
138
|
-
* SET USER EMAILS
|
|
139
|
-
* setUserEmails(userId: string, emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
|
|
140
|
-
*
|
|
141
|
-
* PUSHWOOSH CODE
|
|
142
|
-
* | |
|
|
143
|
-
* _| |_
|
|
144
|
-
* \ /
|
|
145
|
-
* \ /
|
|
146
|
-
* \_/
|
|
147
|
-
*/
|
|
148
|
-
Pushwoosh.setUserEmails(
|
|
149
|
-
inputValue1,
|
|
150
|
-
[inputValue2],
|
|
151
|
-
() => {
|
|
152
|
-
console.log("User emails were successfully set.");
|
|
153
|
-
},
|
|
154
|
-
(error) => {
|
|
155
|
-
console.error("Failed to set user emails:", error);
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
}} placeholder1="USER" placeholder2="EMAILS" />
|
|
159
|
-
<ButtonWithTextInput buttonText="SET EMAILS" onPress={(inputValue1) => {
|
|
160
|
-
/**
|
|
161
|
-
* SET EMAILS
|
|
162
|
-
* setEmails(emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
|
|
163
|
-
*
|
|
164
|
-
* PUSHWOOSH CODE
|
|
165
|
-
* | |
|
|
166
|
-
* _| |_
|
|
167
|
-
* \ /
|
|
168
|
-
* \ /
|
|
169
|
-
* \_/
|
|
170
|
-
*/
|
|
171
|
-
Pushwoosh.setEmails( [inputValue1],
|
|
172
|
-
() => {
|
|
173
|
-
console.log("Emails were successfully set.");
|
|
174
|
-
},
|
|
175
|
-
(error) => {
|
|
176
|
-
console.error("Failed to set emails:", error);
|
|
177
|
-
}
|
|
178
|
-
);
|
|
179
|
-
}} placeholder1="EMAILS" />
|
|
180
|
-
|
|
181
|
-
<Button buttonText="GET HWID" onPress={() => {
|
|
182
|
-
/**
|
|
183
|
-
* Pushwoosh HWID associated with current device
|
|
184
|
-
*
|
|
185
|
-
* PUSHWOOSH CODE
|
|
186
|
-
* | |
|
|
187
|
-
* _| |_
|
|
188
|
-
* \ /
|
|
189
|
-
* \ /
|
|
190
|
-
* \_/
|
|
191
|
-
*/
|
|
192
|
-
Pushwoosh.getHwid((hwid) => {
|
|
193
|
-
Alert.alert('HWID: ', hwid);
|
|
194
|
-
});
|
|
195
|
-
}}/>
|
|
196
|
-
|
|
197
|
-
<Button buttonText="GET PUSH TOKEN" onPress={() => {
|
|
198
|
-
/**
|
|
199
|
-
* Push notification token or null if device is not registered yet.
|
|
200
|
-
*
|
|
201
|
-
* PUSHWOOSH CODE
|
|
202
|
-
* | |
|
|
203
|
-
* _| |_
|
|
204
|
-
* \ /
|
|
205
|
-
* \ /
|
|
206
|
-
* \_/
|
|
207
|
-
*/
|
|
208
|
-
Pushwoosh.getPushToken((token) => {
|
|
209
|
-
Alert.alert('PUSH TOKEN: ', token);
|
|
210
|
-
});
|
|
211
|
-
}}/>
|
|
212
|
-
<Button buttonText="GET USER ID" onPress={() => {
|
|
213
|
-
/**
|
|
214
|
-
* GET USER ID
|
|
215
|
-
*
|
|
216
|
-
* PUSHWOOSH CODE
|
|
217
|
-
* | |
|
|
218
|
-
* _| |_
|
|
219
|
-
* \ /
|
|
220
|
-
* \ /
|
|
221
|
-
* \_/
|
|
222
|
-
*/
|
|
223
|
-
Pushwoosh.getUserId((userId) => {
|
|
224
|
-
Alert.alert('USER ID: ', userId);
|
|
225
|
-
});
|
|
226
|
-
}}/>
|
|
227
|
-
<Button
|
|
228
|
-
buttonText="SHOW PUSH NOTIFICATION ALERT" onPress={() => {
|
|
229
|
-
/**
|
|
230
|
-
* GET SHOW PUSH NOTIFICATION ALERT STATE
|
|
231
|
-
*
|
|
232
|
-
* PUSHWOOSH CODE
|
|
233
|
-
* | |
|
|
234
|
-
* _| |_
|
|
235
|
-
* \ /
|
|
236
|
-
* \ /
|
|
237
|
-
* \_/
|
|
238
|
-
*/
|
|
239
|
-
Pushwoosh.getShowPushnotificationAlert((willShow) => {
|
|
240
|
-
if (willShow) {
|
|
241
|
-
Alert.alert('PUSH NOTIFICATION ALERT ENABLED');
|
|
242
|
-
} else {
|
|
243
|
-
Alert.alert('PUSH NOTIFICATION ALERT DISABLED');
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
}}
|
|
247
|
-
/>
|
|
248
|
-
</ScrollView>
|
|
249
|
-
);
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
const styles = StyleSheet.create({
|
|
253
|
-
container: {
|
|
254
|
-
flexGrow: 1,
|
|
255
|
-
backgroundColor: '#ffffff',
|
|
256
|
-
alignItems: 'center',
|
|
257
|
-
},
|
|
258
|
-
header: {
|
|
259
|
-
flexDirection: 'row',
|
|
260
|
-
justifyContent: 'space-between',
|
|
261
|
-
paddingHorizontal: 20,
|
|
262
|
-
paddingVertical: 10,
|
|
263
|
-
},
|
|
264
|
-
textField: {
|
|
265
|
-
borderWidth: 1,
|
|
266
|
-
borderColor: '#cccccc',
|
|
267
|
-
borderRadius: 5,
|
|
268
|
-
padding: 10,
|
|
269
|
-
},
|
|
270
|
-
button: {
|
|
271
|
-
backgroundColor: '#cccccc',
|
|
272
|
-
borderRadius: 10,
|
|
273
|
-
paddingVertical: 10,
|
|
274
|
-
paddingHorizontal: 20,
|
|
275
|
-
marginRight: 10,
|
|
276
|
-
shadowColor: '#000',
|
|
277
|
-
shadowOffset: {
|
|
278
|
-
width: 0,
|
|
279
|
-
height: 2,
|
|
280
|
-
},
|
|
281
|
-
shadowOpacity: 0.25,
|
|
282
|
-
shadowRadius: 3.84,
|
|
283
|
-
elevation: 5,
|
|
284
|
-
},
|
|
285
|
-
buttonText: {
|
|
286
|
-
color: '#800080',
|
|
287
|
-
fontWeight: 'bold',
|
|
288
|
-
textAlign: 'center',
|
|
289
|
-
},
|
|
290
|
-
imageContainer: {
|
|
291
|
-
justifyContent: 'center',
|
|
292
|
-
alignItems: 'center',
|
|
293
|
-
marginTop: 20,
|
|
294
|
-
},
|
|
295
|
-
image: {
|
|
296
|
-
width: 75,
|
|
297
|
-
height: 75,
|
|
298
|
-
borderRadius: 20
|
|
299
|
-
},
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
export default Actions;
|
package/example/demoapp/App.tsx
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sample React Native App
|
|
3
|
-
* https://github.com/facebook/react-native
|
|
4
|
-
*
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import type {PropsWithChildren} from 'react';
|
|
10
|
-
import {
|
|
11
|
-
SafeAreaView,
|
|
12
|
-
ScrollView,
|
|
13
|
-
StatusBar,
|
|
14
|
-
StyleSheet,
|
|
15
|
-
Text,
|
|
16
|
-
useColorScheme,
|
|
17
|
-
View,
|
|
18
|
-
} from 'react-native';
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
Colors,
|
|
22
|
-
DebugInstructions,
|
|
23
|
-
Header,
|
|
24
|
-
LearnMoreLinks,
|
|
25
|
-
ReloadInstructions,
|
|
26
|
-
} from 'react-native/Libraries/NewAppScreen';
|
|
27
|
-
|
|
28
|
-
type SectionProps = PropsWithChildren<{
|
|
29
|
-
title: string;
|
|
30
|
-
}>;
|
|
31
|
-
|
|
32
|
-
function Section({children, title}: SectionProps): React.JSX.Element {
|
|
33
|
-
const isDarkMode = useColorScheme() === 'dark';
|
|
34
|
-
return (
|
|
35
|
-
<View style={styles.sectionContainer}>
|
|
36
|
-
<Text
|
|
37
|
-
style={[
|
|
38
|
-
styles.sectionTitle,
|
|
39
|
-
{
|
|
40
|
-
color: isDarkMode ? Colors.white : Colors.black,
|
|
41
|
-
},
|
|
42
|
-
]}>
|
|
43
|
-
{title}
|
|
44
|
-
</Text>
|
|
45
|
-
<Text
|
|
46
|
-
style={[
|
|
47
|
-
styles.sectionDescription,
|
|
48
|
-
{
|
|
49
|
-
color: isDarkMode ? Colors.light : Colors.dark,
|
|
50
|
-
},
|
|
51
|
-
]}>
|
|
52
|
-
{children}
|
|
53
|
-
</Text>
|
|
54
|
-
</View>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function App(): React.JSX.Element {
|
|
59
|
-
const isDarkMode = useColorScheme() === 'dark';
|
|
60
|
-
|
|
61
|
-
const backgroundStyle = {
|
|
62
|
-
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<SafeAreaView style={backgroundStyle}>
|
|
67
|
-
<StatusBar
|
|
68
|
-
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
|
69
|
-
backgroundColor={backgroundStyle.backgroundColor}
|
|
70
|
-
/>
|
|
71
|
-
<ScrollView
|
|
72
|
-
contentInsetAdjustmentBehavior="automatic"
|
|
73
|
-
style={backgroundStyle}>
|
|
74
|
-
<Header />
|
|
75
|
-
<View
|
|
76
|
-
style={{
|
|
77
|
-
backgroundColor: isDarkMode ? Colors.black : Colors.white,
|
|
78
|
-
}}>
|
|
79
|
-
<Section title="Step One">
|
|
80
|
-
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
|
|
81
|
-
screen and then come back to see your edits.
|
|
82
|
-
</Section>
|
|
83
|
-
<Section title="See Your Changes">
|
|
84
|
-
<ReloadInstructions />
|
|
85
|
-
</Section>
|
|
86
|
-
<Section title="Debug">
|
|
87
|
-
<DebugInstructions />
|
|
88
|
-
</Section>
|
|
89
|
-
<Section title="Learn More">
|
|
90
|
-
Read the docs to discover what to do next:
|
|
91
|
-
</Section>
|
|
92
|
-
<LearnMoreLinks />
|
|
93
|
-
</View>
|
|
94
|
-
</ScrollView>
|
|
95
|
-
</SafeAreaView>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const styles = StyleSheet.create({
|
|
100
|
-
sectionContainer: {
|
|
101
|
-
marginTop: 32,
|
|
102
|
-
paddingHorizontal: 24,
|
|
103
|
-
},
|
|
104
|
-
sectionTitle: {
|
|
105
|
-
fontSize: 24,
|
|
106
|
-
fontWeight: '600',
|
|
107
|
-
},
|
|
108
|
-
sectionDescription: {
|
|
109
|
-
marginTop: 8,
|
|
110
|
-
fontSize: 18,
|
|
111
|
-
fontWeight: '400',
|
|
112
|
-
},
|
|
113
|
-
highlight: {
|
|
114
|
-
fontWeight: '700',
|
|
115
|
-
},
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
export default App;
|
package/example/demoapp/Gemfile
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
-
ruby ">= 2.6.10"
|
|
5
|
-
|
|
6
|
-
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
|
|
7
|
-
# bound in the template on Cocoapods with next React Native release.
|
|
8
|
-
gem 'cocoapods', '>= 1.13', '< 1.15'
|
|
9
|
-
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: https://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
CFPropertyList (3.0.7)
|
|
5
|
-
base64
|
|
6
|
-
nkf
|
|
7
|
-
rexml
|
|
8
|
-
activesupport (6.1.7.7)
|
|
9
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
10
|
-
i18n (>= 1.6, < 2)
|
|
11
|
-
minitest (>= 5.1)
|
|
12
|
-
tzinfo (~> 2.0)
|
|
13
|
-
zeitwerk (~> 2.3)
|
|
14
|
-
addressable (2.8.6)
|
|
15
|
-
public_suffix (>= 2.0.2, < 6.0)
|
|
16
|
-
algoliasearch (1.27.5)
|
|
17
|
-
httpclient (~> 2.8, >= 2.8.3)
|
|
18
|
-
json (>= 1.5.1)
|
|
19
|
-
atomos (0.1.3)
|
|
20
|
-
base64 (0.2.0)
|
|
21
|
-
claide (1.1.0)
|
|
22
|
-
cocoapods (1.14.3)
|
|
23
|
-
addressable (~> 2.8)
|
|
24
|
-
claide (>= 1.0.2, < 2.0)
|
|
25
|
-
cocoapods-core (= 1.14.3)
|
|
26
|
-
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
27
|
-
cocoapods-downloader (>= 2.1, < 3.0)
|
|
28
|
-
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
29
|
-
cocoapods-search (>= 1.0.0, < 2.0)
|
|
30
|
-
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
31
|
-
cocoapods-try (>= 1.1.0, < 2.0)
|
|
32
|
-
colored2 (~> 3.1)
|
|
33
|
-
escape (~> 0.0.4)
|
|
34
|
-
fourflusher (>= 2.3.0, < 3.0)
|
|
35
|
-
gh_inspector (~> 1.0)
|
|
36
|
-
molinillo (~> 0.8.0)
|
|
37
|
-
nap (~> 1.0)
|
|
38
|
-
ruby-macho (>= 2.3.0, < 3.0)
|
|
39
|
-
xcodeproj (>= 1.23.0, < 2.0)
|
|
40
|
-
cocoapods-core (1.14.3)
|
|
41
|
-
activesupport (>= 5.0, < 8)
|
|
42
|
-
addressable (~> 2.8)
|
|
43
|
-
algoliasearch (~> 1.0)
|
|
44
|
-
concurrent-ruby (~> 1.1)
|
|
45
|
-
fuzzy_match (~> 2.0.4)
|
|
46
|
-
nap (~> 1.0)
|
|
47
|
-
netrc (~> 0.11)
|
|
48
|
-
public_suffix (~> 4.0)
|
|
49
|
-
typhoeus (~> 1.0)
|
|
50
|
-
cocoapods-deintegrate (1.0.5)
|
|
51
|
-
cocoapods-downloader (2.1)
|
|
52
|
-
cocoapods-plugins (1.0.0)
|
|
53
|
-
nap
|
|
54
|
-
cocoapods-search (1.0.1)
|
|
55
|
-
cocoapods-trunk (1.6.0)
|
|
56
|
-
nap (>= 0.8, < 2.0)
|
|
57
|
-
netrc (~> 0.11)
|
|
58
|
-
cocoapods-try (1.2.0)
|
|
59
|
-
colored2 (3.1.2)
|
|
60
|
-
concurrent-ruby (1.2.3)
|
|
61
|
-
escape (0.0.4)
|
|
62
|
-
ethon (0.16.0)
|
|
63
|
-
ffi (>= 1.15.0)
|
|
64
|
-
ffi (1.16.3)
|
|
65
|
-
fourflusher (2.3.1)
|
|
66
|
-
fuzzy_match (2.0.4)
|
|
67
|
-
gh_inspector (1.1.3)
|
|
68
|
-
httpclient (2.8.3)
|
|
69
|
-
i18n (1.14.5)
|
|
70
|
-
concurrent-ruby (~> 1.0)
|
|
71
|
-
json (2.7.2)
|
|
72
|
-
minitest (5.22.3)
|
|
73
|
-
molinillo (0.8.0)
|
|
74
|
-
nanaimo (0.3.0)
|
|
75
|
-
nap (1.1.0)
|
|
76
|
-
netrc (0.11.0)
|
|
77
|
-
nkf (0.2.0)
|
|
78
|
-
public_suffix (4.0.7)
|
|
79
|
-
rexml (3.2.6)
|
|
80
|
-
ruby-macho (2.5.1)
|
|
81
|
-
typhoeus (1.4.1)
|
|
82
|
-
ethon (>= 0.9.0)
|
|
83
|
-
tzinfo (2.0.6)
|
|
84
|
-
concurrent-ruby (~> 1.0)
|
|
85
|
-
xcodeproj (1.24.0)
|
|
86
|
-
CFPropertyList (>= 2.3.3, < 4.0)
|
|
87
|
-
atomos (~> 0.1.3)
|
|
88
|
-
claide (>= 1.0.2, < 2.0)
|
|
89
|
-
colored2 (~> 3.1)
|
|
90
|
-
nanaimo (~> 0.3.0)
|
|
91
|
-
rexml (~> 3.2.4)
|
|
92
|
-
zeitwerk (2.6.14)
|
|
93
|
-
|
|
94
|
-
PLATFORMS
|
|
95
|
-
ruby
|
|
96
|
-
|
|
97
|
-
DEPENDENCIES
|
|
98
|
-
activesupport (>= 6.1.7.5, < 7.1.0)
|
|
99
|
-
cocoapods (>= 1.13, < 1.15)
|
|
100
|
-
|
|
101
|
-
RUBY VERSION
|
|
102
|
-
ruby 2.6.10p210
|
|
103
|
-
|
|
104
|
-
BUNDLED WITH
|
|
105
|
-
1.17.2
|