Skip to content

Commit

Permalink
Merge pull request #937 from OneSignal/release_3.6.3
Browse files Browse the repository at this point in the history
Release for 3.6.3
  • Loading branch information
mikechoch authored Jan 18, 2020
2 parents c35be55 + ae9572f commit d3466b9
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 5 deletions.
44 changes: 44 additions & 0 deletions examples/RNOneSignal/.yarnclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# test directories
__tests__
test
tests
powered-test

# asset directories
docs
doc
website
images

# examples
example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
appveyor.yml
circle.yml
codeship-services.yml
codeship-steps.yml
wercker.yml
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.travis.yml

# misc
*.md
13 changes: 11 additions & 2 deletions examples/RNOneSignal/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,21 @@ export default class App extends Component {
// Create a set of triggers in a map and add them all at once
var triggers = {
trigger2: '2',
trigger3: '3',
trigger3: true,
};
OneSignal.addTriggers(triggers);

// Get trigger value for the key
OneSignal.getTriggerValueForKey('trigger3')
.then(response => {
console.log('trigger3 value: ' + response);
})
.catch(e => {
console.error(e);
});

// Create an array of keys to remove triggers for
var removeTriggers = ['trigger2', 'trigger3'];
var removeTriggers = ['trigger1', 'trigger2'];
OneSignal.removeTriggersForKeys(removeTriggers);
}

Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ export default class OneSignal {
static postNotification(contents, data, player_id, otherParameters) {
if (!checkIfInitialized()) return;

RNOneSignal.postNotification(contents, data, player_id, otherParameters);
if (Platform.OS === 'android')
RNOneSignal.postNotification(JSON.stringify(contents), JSON.stringify(data), JSON.stringify(player_id), JSON.stringify(otherParameters));
else
RNOneSignal.postNotification(contents, data, player_id, otherParameters);
}

static clearOneSignalNotifications() {
Expand Down
Binary file modified ios/libOneSignal.a
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-onesignal",
"version": "3.6.2",
"version": "3.6.3",
"description": "React Native OneSignal SDK",
"main": "index",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion react-native-onesignal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Pod::Spec.new do |s|
# pod 'React', :path => '../node_modules/react-native/'

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

0 comments on commit d3466b9

Please sign in to comment.