1

Using this thread: PhoneGap for iPhone: problem loading external URL, I have modified my iOS PhoneGap application to immediately load an external HTML page when the application launches. On this HTML page, the user can press any of several Javascript buttons that perform some action, but do not take the client away from that web page.

I am wondering if there is a way to send a "message", or some kind of notification, back to Objective-C (maybe somewhere in AppDelegate.m?) whenever a JavaScript button is pressed. Ideally, my goal is to send a JS Variable from the website back into Objective-C.

I'd appreciate any help, please let me know if I can clarify any part of this. Thanks.

Community
  • 1
  • 1
Objc55
  • 156
  • 1
  • 5
  • 18

1 Answers1

1

You will not be able to publish your app to the apple app store if you load a remote page on startup.

Why don`t you load a local file and some data via XHR after you app starts?

Daniel Kurka
  • 7,973
  • 2
  • 24
  • 43
  • Thanks for the reply. I don't intend to publish this to the app. store, though. – Objc55 Jan 30 '12 at 18:57
  • I think the concern is more that your app shows *something* when you start it when there's no internet connection. See [the fourth from bottom question here](http://wiki.phonegap.com/w/page/16494770/FAQ). – josh3736 Jan 30 '12 at 19:11
  • Again, thanks for the reply, but please don't worry about this issue; it will always work. – Objc55 Jan 30 '12 at 19:18