urbanairship / ios-phonegap-plugin

This repo is deprecated. Please see: https://github.com/urbanairship/phonegap-ua-push
https://github.com/urbanairship/phonegap-ua-push
68 stars 11 forks source link

Phonegap Version Outdated #5

Open gusennan opened 12 years ago

gusennan commented 12 years ago

Two things that took me a while to figure out to get this project to work correctly, and I think should be added to the read me, are:

1.) If you're using mac and have a different version of phone gap installed in Xcode, the javascript file in the www directory needs to updated to match your version. In my case this was version 1.2.

2.) go.urbanairship.com needs to be added to the phonegap.plist as an external host.

See this thread on stack overflow:

http://stackoverflow.com/questions/7907345/implementing-urban-airship-with-phonegap-for-ios-get-stuck-on-registering/8427078#8427078

gusennan commented 12 years ago

By the way, despite the pitfall, thanks for putting this together. It will be a great help.

surfjedi commented 12 years ago

I had similar issue. But by doing the two fixes above I can recieve test push notifications in sample app.

But the jascript logging and the message inner html, etc. arent working.

I am Using:

  1. phonegap 1.3.0
  2. xcode 4
  3. iphone 4, and ipad 2, both with ios 5 for testing

    I can get the nslogging active, but thats all. Please see log below:

(other stuff) sharedlibrary apply-load-rules all 2012-02-29 22:32:31.697 UAPhoneGap[812:707] active [Switching to process 8195 thread 0x2003] [Switching to process 8451 thread 0x2103] 2012-02-29 22:32:32.926 UAPhoneGap[812:707] Device initialization: DeviceInfo = {"name":"Lee Blazek’s iPhone4","uuid":"4b42862d14cb9c9647599fdac8d3d9499ac4d29f","platform":"iPhone","gap":"1.3.0","version":"5.0.1","connection":{"type":"wifi"}}; [Switching to process 9731 thread 0x2603] 2012-02-29 22:36:03.596 UAPhoneGap[812:707] active 2012-02-29 22:36:08.851 UAPhoneGap[812:707] active 2012-02-29 22:36:13.928 UAPhoneGap[812:707] active 2012-02-29 22:36:24.959 UAPhoneGap[812:707] active 2012-02-29 22:36:41.766 UAPhoneGap[812:707] active 2012-02-29 22:36:49.031 UAPhoneGap[812:707] active 2012-02-29 22:37:05.751 UAPhoneGap[812:707] active 2012-02-29 22:40:52.633 UAPhoneGap[812:707] active

Any ideas or does phone gap 1.3.o have some different logging set up?

surfjedi commented 12 years ago

And actually upon further investigation..

When running the app thru xcode and debuging in Xcode on iPhone 4, iOS5 the above still occurs. I get test pushes thru, but the app displays no changes in the HTML, or Xcode debuging.

BUT when i run the app after the the phone is restarted, and not debugging with xcode or plugged in some things are displayed:

  1. Device token
  2. Status: 401 Error when registering UA push service
  3. error: Unauthorized
  4. Notification recieved{and the notification)

But it wont do anything when hooked up to Xcode to Debug?? Strange -> any one have any ideas?

Thanks in advance!