-
Notifications
You must be signed in to change notification settings - Fork 126
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
title-loc-args and loc-args are expected to be arrays of strings for APN #150
Comments
Hello @eli-zhang. Thanks for reporting this! I will look into this as soon as I find some time |
@eli-zhang I think I understand the issue now, please correct me if I am mistaken:
So your proposed solution is to let the input type remain as string but parse that string to a JSON array in |
Yep, that's correct! I actually spun up a fork of the repo to have a working version until you got around to this issue. It also doesn't break any type definitions in the |
@eli-zhang Can you test #151 and let me know if it works as expected on your end? |
Tested and it works as expected! Thanks for resolving this. |
@eli-zhang Thx for testing, I released the changes with v1.6.1 Not sure why the |
According to apple documentation, localization args like
title-loc-args
andloc-args
are expected to be an array of strings, not a string of an array of strings. However, FCM documentation says the expected type is a JSON array of strings. I wasn't able to get the localization arguments working when using a JSON array of strings for APN, but it works when I use a regular array of strings. Can we JSON.parse the string to an array (which would not change the type signature) in thesendAPN.js
file?The text was updated successfully, but these errors were encountered: