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

sendTags doesn't return error when tag type is invalid #951

Closed
eeallen1 opened this issue Jun 22, 2021 · 2 comments · Fixed by #952
Closed

sendTags doesn't return error when tag type is invalid #951

eeallen1 opened this issue Jun 22, 2021 · 2 comments · Fixed by #952

Comments

@eeallen1
Copy link

Description:
OneSignal.sendTags callback doesn't ever complete when sending invalid tag (e.g. a date value)

Environment
iOS SDK version 3.5.2
via Cocoapods

Steps to Reproduce Issue:

var tags:[String:Any] = [
      "numPosts": user.numPosts,
      "rating": user.rating
  ]
  if let date = user.signupDate as? Date{
      tags["signup"] = date
  }
  
  OneSignal.sendTags(tags, onSuccess: {
      _ in
      //never gets here and tags are not sent
      print("one sig success")
  }, onFailure: {
      failure in
      //never gets here
      print("sendTags failure \(failure?.localizedDescription ?? "")")
  })
@emawby
Copy link
Contributor

emawby commented Jun 23, 2021

@eeallen1 Thank you for reporting I am looking into this!

emawby added a commit that referenced this issue Jun 23, 2021
Previously we would log a warning and return on bad input for the sendTags method. Now we will also call the failure block with an error object with information on what went wrong. This fixes #951
@emawby
Copy link
Contributor

emawby commented Jun 23, 2021

@eeallen1 This will be fixed in the next release I apologize for the inconvenience

emawby added a commit that referenced this issue Jun 23, 2021
Previously we would log a warning and return on bad input for the sendTags method. Now we will also call the failure block with an error object with information on what went wrong. This fixes #951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants