react-native-netmera 1.9.0-beta03 → 1.9.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/.github/workflows/commit_sync.yml +53 -0
- package/README.md +41 -8
- package/android/build.gradle +1 -1
- package/ios/RNNetmera.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNNetmera.xcodeproj/project.xcworkspace/xcuserdata/gunesbaki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/package.json +3 -2
- package/scripts/yarn_rebuild.sh +31 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
- package/.github/ISSUE_TEMPLATE/feature.md +0 -17
- package/.github/ISSUE_TEMPLATE/release.md +0 -19
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Sync Commits to Client Repo
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
sync_to_repo_a:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v2
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0 # fetch the entire history
|
|
17
|
+
|
|
18
|
+
- name: Configure Git
|
|
19
|
+
run: |
|
|
20
|
+
git config --global user.email "engineering@initialcode.com.tr"
|
|
21
|
+
git config --global user.name "Initial Code"
|
|
22
|
+
|
|
23
|
+
- name: Add Repo A as remote
|
|
24
|
+
run: |
|
|
25
|
+
eval `ssh-agent -s`
|
|
26
|
+
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
27
|
+
git remote add repo-a "git@github.com:Netmera/netmera-sdk-react-native.git"
|
|
28
|
+
git fetch repo-a
|
|
29
|
+
|
|
30
|
+
- name: Pull latest changes from Repo A
|
|
31
|
+
run: |
|
|
32
|
+
eval `ssh-agent -s`
|
|
33
|
+
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
34
|
+
git pull repo-a master --rebase || git rebase --abort
|
|
35
|
+
|
|
36
|
+
- name: Remove .github folder
|
|
37
|
+
run: |
|
|
38
|
+
rm -rf .github
|
|
39
|
+
git add -A
|
|
40
|
+
git commit -m "Remove .github folder before pushing" || true
|
|
41
|
+
|
|
42
|
+
- name: Resolve conflicts if any and continue rebase
|
|
43
|
+
if: failure()
|
|
44
|
+
run: |
|
|
45
|
+
eval `ssh-agent -s`
|
|
46
|
+
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
47
|
+
git rebase --continue || git rebase --skip || true
|
|
48
|
+
|
|
49
|
+
- name: Push to Repo A
|
|
50
|
+
run: |
|
|
51
|
+
eval `ssh-agent -s`
|
|
52
|
+
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
53
|
+
git push repo-a master:master --force
|
package/README.md
CHANGED
|
@@ -285,6 +285,16 @@ AppRegistry.registerComponent(appName, () => App);
|
|
|
285
285
|
|
|
286
286
|
3. If you have custom Firebase Messaging integration, please see usage below.
|
|
287
287
|
|
|
288
|
+
1- Add the following line to your `AndroidManifest.xml` file inside the `application` tag to remove Netmera's default FCM service
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
<service
|
|
292
|
+
android:name="com.netmera.nmfcm.NMFirebaseService"
|
|
293
|
+
tools:node="remove" />
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
2- Update `FirebaseMessaging` methods like below
|
|
297
|
+
|
|
288
298
|
```
|
|
289
299
|
messaging()
|
|
290
300
|
.getToken(firebase.app().options.messagingSenderId)
|
|
@@ -308,20 +318,43 @@ messaging().setBackgroundMessageHandler(async (remoteMessage) => {
|
|
|
308
318
|
|
|
309
319
|
4. If you have custom Huawei Messaging integration, please see usage below.
|
|
310
320
|
|
|
321
|
+
1- Add the following line to your `AndroidManifest.xml` file inside the `application` tag to remove Netmera's default HMS service
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
<service
|
|
325
|
+
android:name="com.netmera.nmhms.NMHuaweiService"
|
|
326
|
+
tools:node="remove" />
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
2- Update `HuaweiPushKit` methods like below
|
|
330
|
+
|
|
311
331
|
```
|
|
312
332
|
HmsPushInstanceId.getToken("")
|
|
313
333
|
.then((result) => {
|
|
314
334
|
Netmera.onNetmeraNewToken(result.result)
|
|
315
335
|
})
|
|
316
336
|
|
|
317
|
-
HmsPushEvent.onRemoteMessageReceived(event => {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
337
|
+
HmsPushEvent.onRemoteMessageReceived((event) => {
|
|
338
|
+
const remoteMessage = new RNRemoteMessage(event.msg);
|
|
339
|
+
let data = JSON.parse(remoteMessage.getData());
|
|
340
|
+
if (Netmera.isNetmeraRemoteMessage(data)) {
|
|
341
|
+
Netmera.onNetmeraHuaweiPushMessageReceived(
|
|
342
|
+
remoteMessage.getFrom(),
|
|
343
|
+
data,
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
HmsPushMessaging.setBackgroundMessageHandler(async dataMessage => {
|
|
349
|
+
const remoteMessage = new RNRemoteMessage(dataMessage);
|
|
350
|
+
let data = JSON.parse(remoteMessage.getData());
|
|
351
|
+
if (Netmera.isNetmeraRemoteMessage(data)) {
|
|
352
|
+
Netmera.onNetmeraHuaweiPushMessageReceived(
|
|
353
|
+
remoteMessage.getFrom(),
|
|
354
|
+
data,
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
325
358
|
```
|
|
326
359
|
|
|
327
360
|
### Calling React Native methods
|
package/android/build.gradle
CHANGED
|
@@ -19,7 +19,7 @@ android {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
dependencies {
|
|
22
|
-
implementation 'com.netmera:nmcore:4.3.
|
|
22
|
+
implementation 'com.netmera:nmcore:4.3.2'
|
|
23
23
|
implementation 'com.netmera:nmfcm:4.0.2'
|
|
24
24
|
implementation 'com.netmera:nmhms:4.0.1'
|
|
25
25
|
implementation 'com.facebook.react:react-native:+'
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-netmera",
|
|
3
|
-
"version": "1.9.0
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Netmera React Native SDK",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"author": "netmera",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"rebuild": "scripts/yarn_rebuild.sh"
|
|
9
10
|
},
|
|
10
11
|
"keywords": [
|
|
11
12
|
"react-native",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "Removing node_modules..."
|
|
4
|
+
rm -rf node_modules
|
|
5
|
+
|
|
6
|
+
echo "Running yarn install..."
|
|
7
|
+
yarn install
|
|
8
|
+
|
|
9
|
+
echo "Navigating to example directory..."
|
|
10
|
+
cd example
|
|
11
|
+
|
|
12
|
+
echo "Removing node_modules in example directory..."
|
|
13
|
+
rm -rf node_modules
|
|
14
|
+
|
|
15
|
+
echo "Running yarn install in example directory..."
|
|
16
|
+
yarn install
|
|
17
|
+
|
|
18
|
+
echo "Navigating to ios directory..."
|
|
19
|
+
cd ios
|
|
20
|
+
|
|
21
|
+
echo "Removing Pods and Podfile.lock..."
|
|
22
|
+
rm -rf Pods
|
|
23
|
+
rm -f Podfile.lock
|
|
24
|
+
|
|
25
|
+
echo "Running pod install..."
|
|
26
|
+
pod install
|
|
27
|
+
|
|
28
|
+
echo "Navigating back to example directory..."
|
|
29
|
+
cd ../..
|
|
30
|
+
|
|
31
|
+
echo "Rebuild process completed successfully!"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Describe a bug that needs to be fixed
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Describe the bug**
|
|
8
|
-
<!--- A clear and concise description of what the bug is. -->
|
|
9
|
-
|
|
10
|
-
**To Reproduce**
|
|
11
|
-
Steps to reproduce the behavior:
|
|
12
|
-
|
|
13
|
-
**Expected behavior**
|
|
14
|
-
<!--- A clear and concise description of what you expected to happen. -->
|
|
15
|
-
|
|
16
|
-
**Testing**
|
|
17
|
-
<!--- A clear and concise description of how to test the fix. -->
|
|
18
|
-
|
|
19
|
-
**Screenshots**
|
|
20
|
-
<!--- If applicable, add screenshots to help explain your problem. -->
|
|
21
|
-
|
|
22
|
-
**Additional context**
|
|
23
|
-
<!--- Add any other context about the problem here. -->
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature
|
|
3
|
-
about: Describe a feature for this project
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
**Is your feature related to a problem? Please describe.**
|
|
7
|
-
<!--- A clear and concise description of what the problem is. -->
|
|
8
|
-
<!--- Ex. I'm always frustrated when [...] -->
|
|
9
|
-
|
|
10
|
-
**Testing**
|
|
11
|
-
<!--- A clear and concise description of how to test the fix. -->
|
|
12
|
-
|
|
13
|
-
**Additional context**
|
|
14
|
-
<!--- Add any other context or screenshots about the feature here. -->
|
|
15
|
-
|
|
16
|
-
**Acceptance criteria**
|
|
17
|
-
<!--- A list of the conditions that a software product must meet to be accepted by a user, a customer, or other system. -->
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Release
|
|
3
|
-
about: Describe a mobile app release.
|
|
4
|
-
---
|
|
5
|
-
**Type of release.**
|
|
6
|
-
<!--- Is this a Pre Release or a Prod release? -->
|
|
7
|
-
|
|
8
|
-
**New features**
|
|
9
|
-
<!-- Replace ADD_TIME_PERIOD_HERE with the scope of the release -->
|
|
10
|
-
<!-- Add new release features below. -->
|
|
11
|
-
We have completed the mobile dev worked the platform team had scoped out for the month of ADD_TIME_PERIOD_HERE and now it is time to deploy a new release.
|
|
12
|
-
Details for this build are as follows:
|
|
13
|
-
|
|
14
|
-
**Additional context**
|
|
15
|
-
<!--- Add any other context or screenshots about the feature here. -->
|
|
16
|
-
|
|
17
|
-
**Acceptance criteria**
|
|
18
|
-
<!--- A list of the conditions that a software product must meet to be accepted by a user, a customer, or other system. -->
|
|
19
|
-
Testers report no issues.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
## Related Issue
|
|
2
|
-
<!--- PRs should be related to open issues. -->
|
|
3
|
-
<!--- If suggesting a new feature or change, please discuss it in an issue first. -->
|
|
4
|
-
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce it. -->
|
|
5
|
-
|
|
6
|
-
<!--- Link to the issue here: -->
|
|
7
|
-
ISSUE LINK: https://app.asana.com/0/1203144541549209/ISSUE_NUMBER
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
<!--- Describe your changes in detail -->
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Types of changes
|
|
14
|
-
<!--- What types of changes does your code introduce? Delete options that are not relevant: -->
|
|
15
|
-
|
|
16
|
-
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
17
|
-
- [ ] New feature (non-breaking change which adds functionality)
|
|
18
|
-
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
|
19
|
-
|
|
20
|
-
## How Has This Been Tested?
|
|
21
|
-
<!--- Describe in detail how you tested your changes. -->
|
|
22
|
-
<!--- Include details of your testing environment, and the tests you ran to -->
|
|
23
|
-
<!--- see how your change affects other areas of the code, etc. -->
|
|
24
|
-
|
|
25
|
-
## Screenshots or Sample Output
|
|
26
|
-
~~~
|
|
27
|
-
PASTE_OUTPUT_HERE
|
|
28
|
-
~~~
|