Changes required for AppStore approval

9 views
Skip to first unread message

Igor Faletski

unread,
Oct 11, 2008, 1:46:15 PM10/11/08
to phonegap
Hey guys,

We're using PhoneGap to power an existing webapp (http://
m.translink.ca) and make it location-aware.

It was extremely easy to get going with the PhoneGap platform, but
getting it into final shape is troublesome. Here's what one person on
iPhoneWebDev said on the mailing list:

"I had the same issue. What I did was to have a UIImageView on top of
the UIWebView. The UIImageView has a full screen graphic that has a
nice background and text introducing the app and saying "Please wait"
or something like that. Then I listen for the webViewDidFinishLoad
event and in there I make the image view invisible and he web view
visible.
Also, our app was rejected from the app store initially because it
was
just loading our webapp immediately and not checking for the presence
of a network connection. So make sure you first see if the network is
available and if it is not you'll need to prompt the user
accordingly.
Look at the Reachability sample class for code on checking network
availability."

In essence, the existing Default.png splash screen needs to stay up
until the webpage is fully loaded and show an error in case there is
no network connection.

I tried to make these changes for a couple of evenings, but being a
web dev I can't get it to be stable. Would someone from the core
PhoneGap crew be able to address this, as it's a common issue any
AppStore app would face?

Thanks once again for the amazing work,

Igor

Lieven Gekiere

unread,
Oct 11, 2008, 1:58:03 PM10/11/08
to phon...@googlegroups.com
I'm interested in seeing how you check if there is a network
connection. Could you please share the code or submit it back to GIT ?

Thanks !

Lieven

Stealth Dave

unread,
Oct 12, 2008, 5:19:50 PM10/12/08
to phonegap
It would be fairly trivial to add a javascript event that you could
call from your local application that would only reveal the viewport
when that javascript is called. This would mean you would have to
load a local page first that had the javascript embedded, but you
could use the same javascript to forward your client to the web app
and detect whether or not you could reach the web app over the network
(which would probably be more useful than just checking for a network
connection). For example:

<html><head><title>Your App</title>
<script>
// various javascript preloading
window.onload = gapRevealViewport;
</script>
</head>
<body>Your Page Here</body>
</html>

This means you would *have* to call gapRevealViewport somewhere on
your page or it would never show up, but it does give you precise
control of when to start displaying your app. I'll take a look at
implementing something like this; see where it goes.

- Dave

Dirk Holtwick

unread,
Oct 13, 2008, 4:08:04 AM10/13/08
to phon...@googlegroups.com
Hi,

this issue is solved in Big Five by showing the "Default.png" after
loading as a UIImage which will be removed when the web content is
loaded. This way there is no interruption between the launch phase and
the first shown web content.

http://www.big5apps.com/

http://code.google.com/p/big5/source/browse/trunk/common/big5ViewController.m?r=2

Cheers
Dirk

Igor Faletski schrieb:

Reply all
Reply to author
Forward
0 new messages