ios-phonegap-plugin icon indicating copy to clipboard operation
ios-phonegap-plugin copied to clipboard

is it working with phonegap 1.2.0?

Open Sly777 opened this issue 13 years ago • 6 comments

Hi all,

I tried it with phonegap 1.2.0 but its not working. Is it only my problem or problem for everyone? I did your integration list what you wrote. Its not giving any error.

Thanks

Sly777 avatar Nov 22 '11 16:11 Sly777

I'm curious as well. I didn't have much time to spend debugging it, but I didn't have success right out of the box.

iamcam avatar Nov 27 '11 22:11 iamcam

I just implemented it with PhoneGap 1.2.0, it is working fine - I registered the device ID with Urban Airship and I was able to receive notifications.

Can anyone provide an example of how to include a JSON payload to specify an alias, tag, badge value, or quiet time setting for this device token when registering? (RE: http://urbanairship.com/docs/push.html#registration)

nfitzpatrick avatar Dec 02 '11 07:12 nfitzpatrick

@nfitzpatrick It's been a while since I used this plugin, but I think the push composer can help you create the payload, then on the PG side, there are some JS func that help you consume it.

iamcam avatar Dec 12 '11 16:12 iamcam

@iamcam Thanks for the reply. I figured it out.

nfitzpatrick avatar Dec 13 '11 15:12 nfitzpatrick

@nfitzpatrick Realize you posted this 7 months ago, but wondering if you could shed some light on the solution for me. How did you send the payload? Thanks so much!!

ghost avatar Jul 20 '12 20:07 ghost

Got the payload working... if anyone else stumbles onto this here is what I did:

add these into the function registerUAPush()


var JSON_payload = {};
JSON_payload.alias = "1";   //add tags etc the same way

request.setRequestHeader("Content-Type", "application/json;");
request.send(JSON.stringify(JSON_payload));

ghost avatar Jul 20 '12 22:07 ghost