Skip to content

Commit d3466b9

Browse files
authored
Merge pull request #937 from OneSignal/release_3.6.3
Release for 3.6.3
2 parents c35be55 + ae9572f commit d3466b9

File tree

6 files changed

+61
-5
lines changed

6 files changed

+61
-5
lines changed

examples/RNOneSignal/.yarnclean

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# test directories
2+
__tests__
3+
test
4+
tests
5+
powered-test
6+
7+
# asset directories
8+
docs
9+
doc
10+
website
11+
images
12+
13+
# examples
14+
example
15+
examples
16+
17+
# code coverage directories
18+
coverage
19+
.nyc_output
20+
21+
# build scripts
22+
Makefile
23+
Gulpfile.js
24+
Gruntfile.js
25+
26+
# configs
27+
appveyor.yml
28+
circle.yml
29+
codeship-services.yml
30+
codeship-steps.yml
31+
wercker.yml
32+
.tern-project
33+
.gitattributes
34+
.editorconfig
35+
.*ignore
36+
.eslintrc
37+
.jshintrc
38+
.flowconfig
39+
.documentup.json
40+
.yarn-metadata.json
41+
.travis.yml
42+
43+
# misc
44+
*.md

examples/RNOneSignal/App.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,21 @@ export default class App extends Component {
128128
// Create a set of triggers in a map and add them all at once
129129
var triggers = {
130130
trigger2: '2',
131-
trigger3: '3',
131+
trigger3: true,
132132
};
133133
OneSignal.addTriggers(triggers);
134134

135+
// Get trigger value for the key
136+
OneSignal.getTriggerValueForKey('trigger3')
137+
.then(response => {
138+
console.log('trigger3 value: ' + response);
139+
})
140+
.catch(e => {
141+
console.error(e);
142+
});
143+
135144
// Create an array of keys to remove triggers for
136-
var removeTriggers = ['trigger2', 'trigger3'];
145+
var removeTriggers = ['trigger1', 'trigger2'];
137146
OneSignal.removeTriggersForKeys(removeTriggers);
138147
}
139148

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,10 @@ export default class OneSignal {
351351
static postNotification(contents, data, player_id, otherParameters) {
352352
if (!checkIfInitialized()) return;
353353

354-
RNOneSignal.postNotification(contents, data, player_id, otherParameters);
354+
if (Platform.OS === 'android')
355+
RNOneSignal.postNotification(JSON.stringify(contents), JSON.stringify(data), JSON.stringify(player_id), JSON.stringify(otherParameters));
356+
else
357+
RNOneSignal.postNotification(contents, data, player_id, otherParameters);
355358
}
356359

357360
static clearOneSignalNotifications() {

ios/libOneSignal.a

29.6 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-onesignal",
3-
"version": "3.6.2",
3+
"version": "3.6.3",
44
"description": "React Native OneSignal SDK",
55
"main": "index",
66
"scripts": {

react-native-onesignal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Pod::Spec.new do |s|
2222
# pod 'React', :path => '../node_modules/react-native/'
2323

2424
# The Native OneSignal-iOS-SDK from cocoapods.
25-
s.dependency 'OneSignal', '2.12.4'
25+
s.dependency 'OneSignal', '2.12.5'
2626
end

0 commit comments

Comments
 (0)