On PhoneGap on Android you can modify the App.java class to load any url. I can\'t find anywhere to change the entry point on the iOS version.
When testing I prefer to h
You could do this:
Create the default index.html and have it wrap and load your own html root file, that way you can keep your own directory structure and no need to do any modifications there.
Of course, phonegap is open source, so you could also commit a change to phonegap to change the iOS api similar to Android API. Currently it seems the root html file path is determined in class PhoneGapDelegate.m
you could do it
class/ AppDelegate.m
change self.viewController.startPage to ur startpage in AppDelegate.m
As of PhoneGap 2.2, you can now override the <content>
tag in your config.xml
:
<content src="http://www.example.com" />
PhoneGapDelegate.h defines a class method startPage which you can overload/redefine in your iOS app's AppDelegate.m file.
+ (NSString*) startPage;
For example:
+ (NSString*) startPage{
return @"http://m.google.com";
}
Will redefine the start page in PhoneGap. You will have to add google.com to your ExternalHosts in PhoneGap.plist. As of PhoneGap 1.2 If you do this and include Plugins in your native app, remotely host PhoneGap apps and their related *.js WILL be able to preform plugin actions. I've tested this with BarcodeScanner, ChildBrowser and ApplicationPreferences.
UPDATE
As of 1.4.0 and 1.4.0, startPage and wwwFolderName are properties instead of methods. They are still redefinable, but you can no longer have startPage point to a remote (non-local) phonegap installation like in my above example. (Which is kind of a bummer)