Thanks for your great efforts with this module/app.
My DrupalGap enabled site works nicely, I can access it using your DrupalGap code, but only if I open that in a normal browser window (I can log in and do all the CRUD stuff).

But when it comes to compiling for iOS I always get the following error when trying to setup my site or access the demo: "welcome.html Unauthorized".

I'm using version/tag 1.02.zip, took ios.index.html, renamed it to index.html and changed phonegap.js to cordova-1.8.1.js (correct name and path).

Any ideas what's going wrong?

Regards,
Daniel

PS: Just upgraded to PhonGap/Cordova 1.9.0 and the issue stays the same.

Comments

tyler.frankenstein’s picture

Status: Active » Needs review

I think you need to set the ExternalHosts in PhoneGap.plist or Cordova.plist in xCode to allow connections to your domain. Or you can use * to allow wild card connections.

daniel wentsch’s picture

Thanks a lot, Tyler!
Now it's working. What a great feeling to have an own app that talks to my own drupal installation :)

tyler.frankenstein’s picture

Status: Needs review » Closed (works as designed)

No problem, building mobile apps for Drupal is indeed a great feeling!

If you have some time, please feel free to add some instructional notes for iOS/PhoneGap/Cordova to the DrupalGap documentation:

http://drupal.org/node/1603690

daniel wentsch’s picture

Ok, I'm glad if I can contribute something and I'll try to add a part about iOS later this week.

bsmith451’s picture

Title: Can't connect from iOS-Simulator or iPhone: "Unauthorized" » DrupalGap is not responding.

I have all the setup for the DrupalGap on my test site working (autoload/services/views-datasources) and I have my PhoneGap install on Eclipse that works.
I built a new project based on the directions, and I get a msg that says my DrupalGap isn't responding and I get a white screen of death. I get 'Settings' if I use the menu button in the emulator.
I modified the location of the phonegap.js to be phonegao/phonegap.js because that is where the file is per the instructions.

Here is my index.html that I grabbed from the GIT download and modified to add the cordova.js ref. I think I am real close.

*update: I'm getting the following error now: The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

<!DOCTYPE HTML>
<html>
  <head>
    <title>DrupalGap</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>    
    <script type="text/javascript" charset="utf-8" src="drupalgap/phonegap.js"></script>
    
    <link rel="stylesheet" href="jquery.mobile-1.0.min.css" /> 
    <script src="jquery-1.6.4.min.js"></script>
    <script src="jquery.mobile-1.0.min.js"></script>
    
    <link rel="stylesheet" href="drupalgap/drupalgap.css" />
    <script src="drupalgap/services/comment.js"></script>
    <script src="drupalgap/services/content.js"></script>
    <script src="drupalgap/services/drupalgap.js"></script>
    <script src="drupalgap/services/node.js"></script>
    <script src=
.
.
.
s.daniel’s picture

Title: DrupalGap is not responding. » Can't connect from iOS-Simulator or iPhone: "Unauthorized"

Please create a new issue since this is a different topic than the one Daniel Wentsch was talking about. See http://drupal.org/node/73179 for more details.

btw: I got this error most often when there was no connection to the server available on the client. May also be a wrong reference - your reference to both cordova-1.9.0.js and phonegap.js is definetly wrong. Use the cordova file only.
Make sure to check the eclipse LogCat tab within eclipse. I't may provide information on the cause. Also try to upload your www folder to your server and check weather the site is working there. (Lets continue in a new issue though please.)

s.daniel’s picture

Issue summary: View changes

updated cordova version