Does PhoneGap now fully support iPad?

179 views
Skip to first unread message

George C Brackett

unread,
Oct 3, 2010, 9:13:18 PM10/3/10
to phonegap
From the Apple review guidelines:

"iPhone apps must also run on iPad without modification, at iPhone
resolution, and at 2X iPhone 3GS resolution."

My almost-finished-really(!) iPhone/iPod Touch app does run in the
iPad simulator under iOS 3.2 (it is written for iOS 4.1), displaying a
main screen and an image-loading screen in both orientations, but two
crucial controls, one a standard jQTouch chevron list element, and one
a large image button, do not work. Both involve $
(selector).click( function() {}); calls. (There may be other non-
functional controls, but I can't get to them.) This occurs in both 1x
and 2x mode.

If there are little gotchas in making an iPhone app run in full and
half size on the iPad, could someone point me toward the reference(s)?
Thanks!

Giacomo Balli

unread,
Oct 4, 2010, 5:33:56 AM10/4/10
to phonegap
I believe there is a distinction that has to be made. One thing is an
iphone app running on ipad and another one is a universal app. odds
are you're fine in the first case, in the second you will have to
revise most of the app's visual layout.

On Oct 4, 3:13 am, George C Brackett <georgecbrack...@gmail.com>
wrote:

George C Brackett

unread,
Oct 4, 2010, 8:21:14 AM10/4/10
to phonegap
Right. I'm planning to reformat the app eventually as a full-screen
iPad app, but I want to release it now as just an iPhone/iPod Touch
app. The review requirement that it run anyway on the iPad in an
iPhone display format took me by surprise. Any idea why a control
would be non-functional on the iPad when it's always been functional
on the iPhone?

George C Brackett

unread,
Oct 4, 2010, 9:38:25 PM10/4/10
to phonegap
I've discovered that my app, which uses the SQLite database, is able
to create a database on iPhone/iPad, but it cannot insert data into
the database on the iPad while it does so just fine on the iPhone. I
get the same results using iOS 4.1 and its corresponding XCode app, as
well as the new iOS 4.2 beta and its corresponding XCode app. I get
the same results in the simulator(s) as well as on a newly-purchased
iPad device.

Anyone else have this problem? Does PhoneGap support database
manipulation on the iPad?

On Oct 4, 8:21 am, George C Brackett <georgecbrack...@gmail.com>

Giacomo Balli

unread,
Oct 5, 2010, 3:50:47 AM10/5/10
to phonegap
From experience, if your app is iPhone only, make sure everything
works on iPhone and then you should have no problems.

On Oct 5, 3:38 am, George C Brackett <georgecbrack...@gmail.com>

Shazron Abdullah

unread,
Oct 5, 2010, 6:52:31 AM10/5/10
to George C Brackett, phonegap
I haven't tried it on iOS 4.x, but on iOS 3.2.2 on the iPad, creating web sql databases is fine.
This has nothing to do with phonegap btw...

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

George C Brackett

unread,
Oct 5, 2010, 11:46:10 AM10/5/10
to phonegap
That's what I thought, too, but this statement in the review
guidelines seems to say otherwise:

"iPhone apps must also run on iPad without modification, at iPhone
resolution, and at 2X iPhone 3GS resolution."

I've used try/catch and so far have found no errors in the insert
code; it even returns result.rowsAffected = 1. But there is no row in
the database at all. (I can check with the iPad simulator, which
stores the database on my hard drive.) I'll keep digging, but the
behavior is clearly different on iPad 3.2 and iPhone 4.1.

On Oct 4, 5:33 am, Giacomo Balli <giacomoba...@gmail.com> wrote:

George C Brackett

unread,
Oct 5, 2010, 11:47:02 AM10/5/10
to phonegap
See reply to Giacomo. I can create a database, but not insert records.
Still hunting.

On Oct 5, 6:52 am, Shazron Abdullah <shazron.abdul...@nitobi.com>
wrote:

Yann Ferréol

unread,
Oct 19, 2010, 7:42:00 AM10/19/10
to phonegap
Hi,

I had the same problem as you. The button where SQL are executed
didn't worked on iPad but was ok on iPhone. I noticed that iPad is
more sensitive to mistakes in the code than iPhone and others
smartphone (Android). Make sure that the SQL request is correct. If
you need that your request use data stored in a variable, store first
your request in a variable and only then use the variable in the
executeSQL function.

for example:
var request = 'UPDATE table SET row1=?, row2=? WHERE id=' + rowID +
';'; //concatenate the rowID for the WHERE clause
var data = [value1, value2];
db.transaction(
function(transaction) {
transaction.executeSql(request, data, refreshEntries(),
errorHandler);
}
);

for a insert statement replace the variable request by using: var
request = 'INSERT INTO table (rowID, row1, row2) VALUES
(generateID(), ?, ?);';

hope this will help to resolve your problem...



On 5 oct, 17:47, George C Brackett <georgecbrack...@gmail.com> wrote:
> See reply to Giacomo. I can create a database, but not insert records.
> Still hunting.
>
> On Oct 5, 6:52 am, Shazron Abdullah <shazron.abdul...@nitobi.com>
> wrote:
>
>
>
> > I haven't tried it on iOS 4.x, but on iOS 3.2.2 on theiPad, creating web sql databases is fine.
> > This has nothing to do with phonegap btw...
>
> > On 2010-10-04, at 6:38 PM, George C Brackett wrote:
>
> > > I've discovered that my app, which uses the SQLite database, is able
> > > to create a database on iPhone/iPad, but it cannot insert data into
> > > the database on theiPadwhile it does so just fine on the iPhone. I
> > > get the same results using iOS 4.1 and its corresponding XCode app, as
> > > well as the new iOS 4.2 beta and its corresponding XCode app. I get
> > > the same results in the simulator(s) as well as on a newly-purchased
> > >iPaddevice.
>
> > > Anyone else have this problem? Does PhoneGap support database
> > > manipulation on theiPad?
>
> > > On Oct 4, 8:21 am, George C Brackett <georgecbrack...@gmail.com>
> > > wrote:
> > >> Right. I'm planning to reformat the app eventually as a full-screen
> > >>iPadapp, but I want to release it now as just an iPhone/iPod Touch
> > >> app. The review requirement that it run anyway on theiPadin an
> > >> iPhone display format took me by surprise. Any idea why a control
> > >> would be non-functional on theiPadwhen it's always been functional
> > >> on the iPhone?
>
> > >> On Oct 4, 5:33 am, Giacomo Balli <giacomoba...@gmail.com> wrote:
>
> > >>> I believe there is a distinction that has to be made. One thing is an
> > >>> iphone app running onipadand another one is a universal app. odds
> > >>> are you're fine in the first case, in the second you will have to
> > >>> revise most of the app's visual layout.
>
> > >>> On Oct 4, 3:13 am, George C Brackett <georgecbrack...@gmail.com>
> > >>> wrote:
>
> > >>>> From the Apple review guidelines:
>
> > >>>> "iPhone apps must also run oniPadwithout modification, at iPhone
> > >>>> resolution, and at 2X iPhone 3GS resolution."
>
> > >>>> My almost-finished-really(!) iPhone/iPod Touch app does run in the
> > >>>>iPadsimulator under iOS 3.2 (it is written for iOS 4.1), displaying a
> > >>>> main screen and an image-loading screen in both orientations, but two
> > >>>> crucial controls, one a standard jQTouch chevron list element, and one
> > >>>> a large image button, do not work. Both involve $
> > >>>> (selector).click( function() {}); calls. (There may be other non-
> > >>>> functional controls, but I can't get to them.) This occurs in both 1x
> > >>>> and 2x mode.
>
> > >>>> If there are little gotchas in making an iPhone app run in full and
> > >>>> half size on theiPad, could someone point me toward the reference(s)?

alanw

unread,
Oct 23, 2010, 8:02:22 PM10/23/10
to phonegap
I'm also new and hoping to use phonegap for an iPad app but my first
try just created a small iPhone version. In the Xcode simulator I
have to use the 2x button. How can I make it full screen on iPad
please?

Thanks in advance!
Alan

On Oct 3, 9:13 pm, George C Brackett <georgecbrack...@gmail.com>
wrote:
> From the Apple review guidelines:
>
> "iPhone apps must also run oniPadwithout modification, at iPhone
> resolution, and at 2X iPhone 3GS resolution."
>
> My almost-finished-really(!) iPhone/iPod Touch app does run in theiPadsimulator under iOS 3.2 (it is written for iOS 4.1), displaying a
> main screen and an image-loading screen in both orientations, but two
> crucial controls, one a standard jQTouch chevron list element, and one
> a large image button, do not work. Both involve $
> (selector).click( function() {}); calls. (There may be other non-
> functional controls, but I can't get to them.) This occurs in both 1x
> and 2x mode.
>
> If there are little gotchas in making an iPhone app run in full and
> half size on theiPad, could someone point me toward the reference(s)?
> Thanks!

Nick McCloud

unread,
Oct 24, 2010, 4:01:20 AM10/24/10
to phonegap
Either click the 2x button for instant relief or use the iPad project
resources to create an iPad only app.

youngpip

unread,
Oct 24, 2010, 5:49:13 AM10/24/10
to phonegap
Hi George,

I also developed an iPhone app (using Phonegap) which uses an sqlite
database and tested it in the iPad simulator. The insertion of records
worked without a problem for me. As Yann says, I think the iPad is
just a bit more sensitive and sometimes needs things writing a bit
more explicitly. For example I had a problem with using localStorage
where it just wouldn't set a localStorage variable to a new value. In
the end I had to clear the variable first then set it. Very odd and
annoying! I also had to make sure I was using the getItem and setItem
methods instead of the alternative syntax which Jonathan Stark uses in
his book.

Maybe if you posted a snippet of your DB insertion code we might be
able to spot something?

Cheers,
Phil


On Oct 5, 4:47 pm, George C Brackett <georgecbrack...@gmail.com>

Giacomo Balli

unread,
Oct 24, 2010, 7:08:42 AM10/24/10
to phonegap
include ipad in the targeted devices.

alanw

unread,
Oct 24, 2010, 7:47:08 AM10/24/10
to phonegap
@Nick, I'm trying to create a universal app - is this possible?
Thanks
Alan

alanw

unread,
Oct 24, 2010, 7:45:37 AM10/24/10
to phonegap
@Giacomo can you please elaborate further? I've been trying to change
it in the simulator but missing something

Thanks!
Alan

alanw

unread,
Oct 24, 2010, 7:44:05 AM10/24/10
to phonegap
Where can I find the iPad project resources and will it be possible to
write a "universal" app with PhoneGap?

Thanks,
Alan

On Oct 24, 4:01 am, Nick McCloud <n...@descartes.co.uk> wrote:
Reply all
Reply to author
Forward
0 new messages