Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]: Unclear behavior when not specifying is_android and is_ios flags #33

Open
1 task done
mochizuki-pg opened this issue Sep 23, 2023 · 4 comments
Open
1 task done

Comments

@mochizuki-pg
Copy link

How can we help?

when I tried sending notifications to users who are subscribed on both Android and iOS platforms, I noticed that unless I explicitly set the is_android and is_ios flags, notifications weren't sent to my Android users.

OneSignal::Notification.new(
  app_id: ,
  contents: ,
  channel_for_external_user_ids: 'push',
  include_external_user_ids: ,
  app_url: ,
  ios_attachments: ,
  existing_android_channel_id: ,
  is_ios: true,    
  is_android: true 
)

documentation lists several flags like is_android, is_ios, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, and is_chrome as [optional]. However, the observed behavior suggests that we might need to specify them to ensure delivery. while these parameters are labeled as optional, do we essentially need to specify all of them to ensure the messages are delivered correctly?

The discrepancy between the documentation and the actual behavior has caused some confusion. Any clarification or guidance on this matter would be greatly appreciated.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bismark64
Copy link

Same issue here. Is this optional or required? What about if we don't want to specify to which platform we want to deliver?

@mochizuki-pg
Copy link
Author

@bismark64
Perhaps it is better to specify true or false explicitly, although the documentation mentions optional

@mochizuki-pg
Copy link
Author

mochizuki-pg commented Oct 23, 2023

For iOS only, I could send without writing
When adding other devices, such as Android, it was not sent to Android unless I explicitly wrote true.

@bismark64
Copy link

Yeah docs are really not clear regarding this. It's not optional if without it, it does not work imo..
It works for ios because is_ios defaults to true in any request. But if you want any other device, apparently, you need to explicitly define it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants