Reply to Post
Hard Core Coder
51 Posts
Member since ‎09.29.2009

SMS sample in Sencha as native iPhone app

 Am trying to put the SMS sample app (Sencha)

   with Phonegap(Cordova) as native app on iPhone.

     Configured config.js with '/att/javaapi'

     and AttProvider.js  this.apiBasePath as http://myserver:8080

       But when I run app in iPhone device or Simulator

         and click "Send Message" button or any button

            An ERROR box is immediately returned on App UI

                        {"xhrError":{ "status":0, "statusText":"" }}

            The request is not getting sent to server from native app.

            How can I fix this?

 

     There is no documentation for configuring Sample app for remote native client.

thanks

Gokul

AT&T Support
jayantkenjale
3 Posts
Member since ‎02.03.2012

Re: SMS sample in Sencha as native iPhone app

Are you changing the apiBasePath in config.js and in AttProvider? You will have to change apiBasePath in config.js alone.

 

Thanks, 

Jayant K Kenjale

Hard Core Coder
51 Posts
Member since ‎09.29.2009

Re: SMS sample in Sencha as native iPhone app

Hi Jayant,

     what should i set it to

         set it to http://myserver:8080/att/javaapi

          and http://myserver:8080/

     and now it returns xhrError status 401 statusText Unauthorized

thanks

Gokul

Hard Core Coder
51 Posts
Member since ‎09.29.2009

Re: SMS sample in Sencha as native iPhone app

Log says ERROR whitelist rejection url='http://myserver:8080/att/direct-router'

AT&T Support
jayantkenjale
3 Posts
Member since ‎02.03.2012

Re: SMS sample in Sencha as native iPhone app

Thanks for sharing the error message. Are you running this app in simulater/emulator? or on device? is your myserver visible? Which server side implementation are you using?

 

Thanks,

Jayant K Kenjale 

Hard Core Coder
51 Posts
Member since ‎09.29.2009

Re: SMS sample in Sencha as native iPhone app

Hi Jayant,'

Am running on device and simulator.

Same error on both

 Yes. myserver is visible and running java standalone version

of attapi server on port 8080. Can access the server URL and send SMS.

thanks

Gokul

AT&T Support
jayantkenjale
3 Posts
Member since ‎02.03.2012

Re: SMS sample in Sencha as native iPhone app

Looks like the error you are facing is related to PhoneGap. Looks like there is external host with PhoneGap.plist.

 

Please read more here - 

http://stackoverflow.com/questions/8045478/phonegap-links-not-working

 

Thanks,

Jayant K Kenjale

Hard Core Coder
51 Posts
Member since ‎09.29.2009

Re: SMS sample in Sencha as native iPhone app

Hi Jayant,

   thanks for solution.

   Adding ExternalHosts key with a value of * to phonegap.plist worked

thanks

Gokul

  • of 1