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

format option should accept string or symbol. #34

Open
grossjo opened this issue Jun 6, 2014 · 3 comments
Open

format option should accept string or symbol. #34

grossjo opened this issue Jun 6, 2014 · 3 comments

Comments

@grossjo
Copy link

grossjo commented Jun 6, 2014

Crashes is a string is passed for format.

@NicosKaralis
Copy link
Owner

sorry, could you elaborate your problem? i can't understand what is happening to you

@btate
Copy link

btate commented Dec 7, 2014

I'm having the same thing. I'm saving my extra data as a json string in my database. So I need to pass that string in the :other section of APNS.

@NicosKaralis
Copy link
Owner

Can you elaborate more? Which method are you running that gives this error?

This should work, just remember :other should be a hash because the payload needs a key, if other is a string it cannot infer a key to use (should check that on future version)

APNS.send_notification(device_token, :alert => 'Hello iPhone!', :badge => 1, :sound => 'default', 
                                :other => {:string => 'object transformed to json string'})

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

3 participants