OneSignal-Cordova-SDK
OneSignal-Cordova-SDK copied to clipboard
[Bug]: Crash if number is sent as value to addAlias
What happened?
Crashes on IOS (not sure about Android) when a number is sent instead of a string in the value of addAlias. Typecasting values to string before sending to OneSignal sdk resolves the crash.
Steps to reproduce?
1. Install the plugin (latest)
2. during app init, call `OneSignal.User.addAlias('myalias', 123);`
3. observe IOS crash
What did you expect to happen?
I expect onesignal plugin to typecast values to string (especially if is integer). If some other non-stringable value, throw error instead of executing a crash.
OneSignal Cordova SDK version
5.2.3 & 5.2.4
Which platform(s) are affected?
- [X] iOS
- [ ] Android
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct