View Full Version : Using Ext.data.Store( ) with iPhone App wrapped in PhoneGap

13 Dec 2011, 5:51 PM
Hello, this is probably just a confirmation question but couldnt find an exact "yes" on the web.

So I have a Ext.data.Store call with url set to some remote php file that serves up json.
I've never dealt with App Store so I'm not sure if I just wrap my code around PhoneGap, App Store will complain.

MyApp.stores.mydata = new Ext.data.Store({
model : 'somemodel',
proxy : {

type: 'ajax',
url: 'https://somedomain.com/servejson.php',
reader: {

type: 'json',
root: 'sample'



The following code should not cause any problems for App Store with PhoneGap, right???

Thanks you ! :D

14 Dec 2011, 7:27 AM
I don't see any reason why it should. People have used the data package a lot as it's almost needed in most apps.

16 Dec 2011, 2:34 PM
hmmm... not sure what to do.
http://www.sencha.com/forum/archive/index.php/t-134893.html? post seems to address the same topic. I've followed it using type:'scripttag' as well, but just hangs with "Loading"

I'm not sure how to debug since i'm using phonegap with xcode. I've tried both as simulator and on iPhone4 itself.
Any pointers??

Thank you.

16 Dec 2011, 2:41 PM
What do you know... as soon as i post that it doesnt work, I find something that works.

following this direction & this post :



this is probably due to the new whitelist feature of phonegap. if you're working on xcode you should be able to add domain names in file PhoneGap.plist (under <project name>/Supporting Files). there's a section called ExternalHosts. add your remote domains there (wildcards work).

here's a screenshot: http://www.prosoxi.com/2011/10/08/xcode-phonegap-white-list-rejection/