Topic
  • 6 replies
  • Latest Post - ‏2012-04-23T13:36:28Z by IdanAdar
SystemAdmin
SystemAdmin
570 Posts

Pinned topic Failing to run PushApplication example on iOS

‏2012-04-19T20:55:41Z |
I am trying to run the PushApplication example on iOS. I import the project and create a new environment for iPhone. I added the apns-certificate-sandbox.p12 into the PushApplication app directory and updated the xml to include the pushSender entry. That is all I have done. When I run as an xcode project, xcode loads but when I start the application it "stalls" on the Worklight screen. The last log message I get is "wlclient init started".

I am using iOS 5.1 and Xcode 4.3 and have other applications working.

I have no idea how to debug as I have changed nothing in the project?

thanks for any clues.
  • SystemAdmin
    SystemAdmin
    570 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-19T21:44:07Z  
    So, it definitely has something to do with authorization. This is the line that is failing:
    authPort = WLJSX.\$('auth');

    authPort is null. Perhaps I can't use "dummy" authentication on iOS when testing push? My other working apps have no authentication.
  • IdanAdar
    IdanAdar
    288 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-20T13:45:47Z  
    It seems you are using samples that require jQuery support, and there are special builds for this. So my question is: what is your Worklight version and build number?
  • SystemAdmin
    SystemAdmin
    570 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-20T15:09:22Z  
    So how would I know that I need a special setup to run the tutorials? I am using 4.2.2.1283. The code shows including prototype.js just like my other, working app. Does the build process dictate the JavaScript library used?
  • IdanAdar
    IdanAdar
    288 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-20T20:29:04Z  
    Another question: where did you get the sample from?
  • SystemAdmin
    SystemAdmin
    570 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-23T13:17:22Z  
    I got the sample from this page: http://www.worklight.com/download/get-started/4.2.1/. I downloaded the exercises for Module 21.
  • IdanAdar
    IdanAdar
    288 Posts

    Re: Failing to run PushApplication example on iOS

    ‏2012-04-23T13:36:28Z  
    I will guess and say that you are from IBM... and got a jQuery-supporting version of Worklight Studio.
    If that's true, then the samples you got from the Worklight website are not compatible with the jQuery version of Worklight Studio.

    From the same location you got this version of Worklight Studio, you can also get updated samples.