So in short, what I understand is:
1. You are able to send push notification to the device for which you have the deviceToken hardcoded in the code. 2. Push notification is not working in your deployed application and gives following error: Could not initialize class com.notnoop.apns.internal.Utilities
Can you send the complete stack trace? Also make sure you have your jars exported in following folder:
/Library/WebObjects/Applications/WOMan.woa/Contents/Resources/Java/
If you don't find the jar here, you still need to figure out the your packaging method.
Just do a Clean and Rebuild your application using Project > Clean... from the top menu.
If you have WOLips Ant Tools installed, you can use following:
Right Click the project node > WOLips Ant Tools > Install...
This will automatically build, package and copy your application and required frameworks in /Library/WebObjects/Applications and /Library/Frameworks folders respectively.
In practice, I delete my application from the /Library/WebObjects/Applications folder prior to reinstall it to avoid retention of stale contents. Same I do for my own frameworks if I make any changes in them.
Hope this works for you.
Farrukh
On 2011-06-29, at 11:41 PM, Jesse Tayler wrote: thanks for the insights - still able to send from eclipse without error but I've not quite gotten a push through just yet. On Jun 29, 2011, at 3:44 PM, Farrukh Ijaz wrote: The purpose of the url is to store deviceToken in your application so you could retrieve it for notifications. This doesn't need to be part of your WO application. It can be a .php url as long as you can retrieve the deviceToken.
I see, so the NSURLConnection code there is just to send to my own server app (WO) the device's ID so the server is aware. I think get the idea there.
just for test, the app sends the push to the hard coded device id returned from the iphone for now - I removed the ID's spaces as you noted earlier. ClassDefNotFound erros are raised when you don't have the .jar file exported as part of your application and it's not available any any of the classpath of your jvm running the application. If it's part of your WO app, make sure you've marked it exported.
ahh, I hadn't checked anything about the export --
I kinda see that I've not checked much, even the mysql adaptor isn't checked...
So, I went ahead and checked the jar for export, and the path looks ok to me but I still get an error
Could not initialize class com.notnoop.apns.internal.Utilities
not sure if utilities was the same class as last error, but the jar suggests it has all it's own dependencies - aside from the jar, I've not installed anything on the server and I include frameworks in the app and install as one big ball of WO, as I think most people do.
here's a screen of what Ive got for eclipse config - look ok to you?
<PastedGraphic-1.tiff>
|