├── README ├── Plugins ├── iPod.js ├── README ├── ChildBrowser │ ├── compass.png │ ├── arrow_left.png │ ├── arrow_right.png │ ├── but_refresh.png │ ├── ChildBrowserCommand.h │ ├── ChildBrowserViewController.h │ ├── ChildBrowser.js │ ├── README.txt │ ├── ChildBrowserCommand.m │ └── ChildBrowserViewController.m ├── iPodCommand.m ├── iPodCommand.h ├── iPodViewController.h ├── iPod │ ├── iPodViewController.h │ ├── iPod.js │ ├── iPodCommand.h │ ├── iPodViewController.m │ └── iPodCommand.m ├── ActivityIndicator │ ├── ActivityIndicatorCommand.h │ ├── ActivityIndicator.js │ ├── ActivityIndicatorCommand.m │ └── DSActivityView.h ├── iPodViewController.m └── NativeControls │ ├── NativeControls.h │ ├── NativeControls.js │ └── NativeControls.m ├── Resources-iPad └── README ├── beep.wav ├── icon.png ├── Default.png ├── icon-72.png ├── icon@2x.png ├── www ├── beep.wav ├── PhoneGapShim2.js ├── iPod.js ├── ActivityIndicator.js ├── childBrowserTest.html ├── HelloPhoneGap.css ├── PhoneGapShim1.js ├── ChildBrowser.js ├── APIExample.html ├── file.html ├── events.html ├── media.html ├── storage.html ├── device.html ├── childBrowser.html ├── network.html ├── debug.html ├── notification.html ├── index.html ├── accelerometer.html ├── Compass.html ├── custom.html ├── nativeControls.html ├── geolocation.html ├── contacts.html ├── camera.html └── NativeControls.js ├── .gitignore ├── Default-Landscape.png ├── Default-Portrait.png ├── HelloPhoneGap_Start.zip ├── PhoneGapBuildSettings.xcconfig ├── HelloPhoneGap_Prefix.pch ├── HelloPhoneGap.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── hiedi.xcuserdatad │ ├── xcschemes │ ├── xcschememanagement.plist │ └── HelloPhoneGap.xcscheme │ └── xcdebugger │ └── Breakpoints.xcbkptlist ├── PluginCopy.sh ├── PhoneGap.plist ├── main.m ├── Classes ├── HelloPhoneGapAppDelegate.h └── HelloPhoneGapAppDelegate.m ├── HelloPhoneGap-Info.plist └── HelloPhoneGap-iPad.xcodeproj └── project.pbxproj /README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Plugins/iPod.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Resources-iPad/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /beep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/beep.wav -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/icon.png -------------------------------------------------------------------------------- /Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Default.png -------------------------------------------------------------------------------- /icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/icon-72.png -------------------------------------------------------------------------------- /icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/icon@2x.png -------------------------------------------------------------------------------- /www/beep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/www/beep.wav -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.perspectivev3 3 | *.pbxuser 4 | .DS_Store 5 | build 6 | www/phonegap.js 7 | -------------------------------------------------------------------------------- /Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Default-Landscape.png -------------------------------------------------------------------------------- /Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Default-Portrait.png -------------------------------------------------------------------------------- /HelloPhoneGap_Start.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/HelloPhoneGap_Start.zip -------------------------------------------------------------------------------- /Plugins/README: -------------------------------------------------------------------------------- 1 | Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. -------------------------------------------------------------------------------- /Plugins/ChildBrowser/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Plugins/ChildBrowser/compass.png -------------------------------------------------------------------------------- /Plugins/ChildBrowser/arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Plugins/ChildBrowser/arrow_left.png -------------------------------------------------------------------------------- /Plugins/ChildBrowser/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Plugins/ChildBrowser/arrow_right.png -------------------------------------------------------------------------------- /Plugins/ChildBrowser/but_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiediutley/HelloPhoneGap/HEAD/Plugins/ChildBrowser/but_refresh.png -------------------------------------------------------------------------------- /PhoneGapBuildSettings.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // PhoneGap.xcconfig 3 | // HelloPhoneGap 4 | // 5 | 6 | // Override this to use your project specific PHONEGAPLIB 7 | PHONEGAPLIB = $(PHONEGAPLIB) -------------------------------------------------------------------------------- /HelloPhoneGap_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HelloPhoneGap' target in the 'HelloPhoneGap' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /HelloPhoneGap.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PluginCopy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script.sh 4 | # HelloPhoneGap 5 | # 6 | # Created by Hiedi Utley on 3/30/11. 7 | # Copyright 2011 Chariot Solutions, LLC. All rights reserved. 8 | 9 | cp -rf ${PROJECT_DIR}/Plugins/*/*.js ${PROJECT_DIR}/www 10 | -------------------------------------------------------------------------------- /Plugins/iPodCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // iPodCommand.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import "iPodCommand.h" 10 | 11 | 12 | @implementation iPodCommand 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /www/PhoneGapShim2.js: -------------------------------------------------------------------------------- 1 | function StopGap() { 2 | function deviceready() { 3 | // fire off deviceready 4 | var e = document.createEvent('Events'); 5 | e.initEvent('deviceready'); 6 | document.dispatchEvent(e); 7 | } 8 | 9 | window.PhoneGap = {}; 10 | deviceready(); 11 | } 12 | -------------------------------------------------------------------------------- /Plugins/iPodCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // iPodCommand.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface iPodCommand : PhoneGapCommand { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Plugins/iPodViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // iPodViewController.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface iPodViewController : UIViewController { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Plugins/iPod/iPodViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // iPodViewController.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface iPodViewController : UIViewController { 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PhoneGap.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DetectPhoneNumber 6 | 7 | TopActivityIndicator 8 | gray 9 | EnableLocation 10 | 11 | EnableAcceleration 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 3/14/11. 6 | // Copyright Chariot Solutions, LLC 2011. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, @"HelloPhoneGapAppDelegate"); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Classes/HelloPhoneGapAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HelloPhoneGapAppDelegate.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 3/14/11. 6 | // Copyright Chariot Solutions, LLC 2011. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapDelegate.h" 11 | #import 12 | 13 | @interface HelloPhoneGapAppDelegate : PhoneGapDelegate { 14 | 15 | MPMediaItemCollection * selectedSong; 16 | 17 | } 18 | @property (nonatomic, retain) MPMediaItemCollection * selectedSong; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /www/iPod.js: -------------------------------------------------------------------------------- 1 | function iPod() 2 | { 3 | 4 | }; 5 | 6 | iPod.prototype.selectSong = function(successCallback, failureCallback) 7 | { 8 | PhoneGap.exec('iPodCommand.selectSong', successCallback, failureCallback); 9 | 10 | }; 11 | 12 | iPod.prototype.playSong = function() 13 | { 14 | PhoneGap.exec('iPodCommand.playSong'); 15 | 16 | 17 | }; 18 | 19 | iPod.install = function() 20 | { 21 | if(!window.plugins) 22 | { 23 | window.plugins = {}; 24 | } 25 | 26 | window.plugins.iPod = new iPod(); 27 | return window.plugins.iPod; 28 | }; 29 | 30 | PhoneGap.addConstructor(iPod.install); 31 | 32 | -------------------------------------------------------------------------------- /Plugins/iPod/iPod.js: -------------------------------------------------------------------------------- 1 | function iPod() 2 | { 3 | 4 | }; 5 | 6 | iPod.prototype.selectSong = function(successCallback, failureCallback) 7 | { 8 | PhoneGap.exec('iPodCommand.selectSong', successCallback, failureCallback); 9 | 10 | }; 11 | 12 | iPod.prototype.playSong = function() 13 | { 14 | PhoneGap.exec('iPodCommand.playSong'); 15 | 16 | 17 | }; 18 | 19 | iPod.install = function() 20 | { 21 | if(!window.plugins) 22 | { 23 | window.plugins = {}; 24 | } 25 | 26 | window.plugins.iPod = new iPod(); 27 | return window.plugins.iPod; 28 | }; 29 | 30 | PhoneGap.addConstructor(iPod.install); 31 | 32 | -------------------------------------------------------------------------------- /HelloPhoneGap.xcodeproj/xcuserdata/hiedi.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HelloPhoneGap.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1D6058900D05DD3D006BFB54 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Plugins/ActivityIndicator/ActivityIndicatorCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityIndicatorCommand.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/8/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | 12 | @interface ActivityIndicatorCommand : PhoneGapCommand { 13 | 14 | } 15 | 16 | - (void) show:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 17 | - (void) hide:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 18 | - (void) updateMessage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 19 | @end 20 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/ChildBrowserCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhoneGap ! ChildBrowserCommand 3 | // 4 | // 5 | // Created by Jesse MacFadyen on 10-05-29. 6 | // Copyright 2010 Nitobi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | #import "ChildBrowserViewController.h" 12 | 13 | 14 | 15 | @interface ChildBrowserCommand : PhoneGapCommand { 16 | 17 | ChildBrowserViewController* childBrowser; 18 | } 19 | 20 | @property (nonatomic, retain) ChildBrowserViewController *childBrowser; 21 | 22 | 23 | - (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 24 | -(void) onChildLocationChange:(NSString*)newLoc; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /www/ActivityIndicator.js: -------------------------------------------------------------------------------- 1 | function ActivityIndicator() 2 | { 3 | 4 | }; 5 | 6 | ActivityIndicator.prototype.show = function(message) 7 | { 8 | PhoneGap.exec('ActivityIndicatorCommand.show', message); 9 | 10 | }; 11 | 12 | ActivityIndicator.prototype.updateMessage = function(message) 13 | { 14 | PhoneGap.exec('ActivityIndicatorCommand.updateMessage', message); 15 | 16 | }; 17 | 18 | ActivityIndicator.prototype.hide = function() 19 | { 20 | PhoneGap.exec('ActivityIndicatorCommand.hide'); 21 | 22 | 23 | }; 24 | 25 | ActivityIndicator.install = function() 26 | { 27 | if(!window.plugins) 28 | { 29 | window.plugins = {}; 30 | } 31 | 32 | window.plugins.activityIndicator = new ActivityIndicator(); 33 | return window.plugins.activityIndicator; 34 | }; 35 | 36 | PhoneGap.addConstructor(ActivityIndicator.install); 37 | 38 | -------------------------------------------------------------------------------- /Plugins/ActivityIndicator/ActivityIndicator.js: -------------------------------------------------------------------------------- 1 | function ActivityIndicator() 2 | { 3 | 4 | }; 5 | 6 | ActivityIndicator.prototype.show = function(message) 7 | { 8 | PhoneGap.exec('ActivityIndicatorCommand.show', message); 9 | 10 | }; 11 | 12 | ActivityIndicator.prototype.updateMessage = function(message) 13 | { 14 | PhoneGap.exec('ActivityIndicatorCommand.updateMessage', message); 15 | 16 | }; 17 | 18 | ActivityIndicator.prototype.hide = function() 19 | { 20 | PhoneGap.exec('ActivityIndicatorCommand.hide'); 21 | 22 | 23 | }; 24 | 25 | ActivityIndicator.install = function() 26 | { 27 | if(!window.plugins) 28 | { 29 | window.plugins = {}; 30 | } 31 | 32 | window.plugins.activityIndicator = new ActivityIndicator(); 33 | return window.plugins.activityIndicator; 34 | }; 35 | 36 | PhoneGap.addConstructor(ActivityIndicator.install); 37 | 38 | -------------------------------------------------------------------------------- /Plugins/iPod/iPodCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // iPodCommand.h 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PhoneGapCommand.h" 11 | #import 12 | 13 | @interface iPodCommand : PhoneGapCommand { 14 | 15 | 16 | NSString * successCallback; 17 | NSString * failureCallback; 18 | 19 | } 20 | 21 | @property (nonatomic, retain) NSString * successCallback; 22 | @property (nonatomic, retain) NSString * failureCallback; 23 | 24 | - (void) selectSong:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 25 | - (void) playSong:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options; 26 | - (void) showMediaPicker; 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Plugins/ActivityIndicator/ActivityIndicatorCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityIndicatorCommand.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/8/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import "ActivityIndicatorCommand.h" 10 | #import "DSActivityView.h" 11 | 12 | @implementation ActivityIndicatorCommand 13 | 14 | - (void) show:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 15 | { 16 | NSString * message = [arguments objectAtIndex:0]; 17 | [DSBezelActivityView newActivityViewForView:[[self appViewController] view] withLabel:message]; 18 | } 19 | - (void) hide:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 20 | { 21 | [DSBezelActivityView removeViewAnimated:YES]; 22 | } 23 | - (void) updateMessage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 24 | { 25 | NSString * message = [arguments objectAtIndex:0]; 26 | [DSBezelActivityView updateMessage:message]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /www/childBrowserTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 23 | 24 | 25 |
21 | I am a local file! 22 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /www/HelloPhoneGap.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | margin: 0px; 4 | background-color: #CCCCCC; 5 | font-family: arial, helvetica; 6 | font-size: 12pt; 7 | 8 | } 9 | 10 | h1, .phoneGapAPITitle 11 | { 12 | font-size:16pt; 13 | font-weight: bold; 14 | color: purple; 15 | background-color:white; 16 | 17 | } 18 | 19 | .phoneGapReady 20 | { 21 | font-size: 10pt; 22 | font-weight: bold; 23 | color: white; 24 | height: 15px; 25 | width: 320px; 26 | background-color: purple; 27 | vertical-align: middle; 28 | padding: 10px; 29 | } 30 | 31 | .phoneGapAPI 32 | { 33 | height: 380px; 34 | width: 320px; 35 | padding: 10px; 36 | overflow: auto; 37 | 38 | 39 | } 40 | 41 | button , .phoneGapAPIButton , .phoneGapAPIIndexButton 42 | { 43 | font-size: 12pt; 44 | color: green; 45 | background-color: #FFFF99; 46 | } 47 | 48 | .phoneGapAPIIndexButton 49 | { 50 | width: 220px; 51 | 52 | } 53 | .phoneGapAPIIndex 54 | { 55 | position: absolute; 56 | top: 10px; 57 | left: 250px; 58 | 59 | } 60 | 61 | a 62 | { 63 | font-size: 12pt; 64 | color: green; 65 | } -------------------------------------------------------------------------------- /Plugins/iPod/iPodViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // iPodViewController.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import "iPodViewController.h" 10 | 11 | 12 | @implementation iPodViewController 13 | 14 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 15 | { 16 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 17 | if (self) { 18 | // Custom initialization 19 | } 20 | return self; 21 | } 22 | 23 | 24 | 25 | - (void)dealloc 26 | { 27 | [super dealloc]; 28 | } 29 | 30 | - (void)didReceiveMemoryWarning 31 | { 32 | // Releases the view if it doesn't have a superview. 33 | [super didReceiveMemoryWarning]; 34 | 35 | // Release any cached data, images, etc that aren't in use. 36 | } 37 | 38 | #pragma mark - View lifecycle 39 | 40 | 41 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 42 | { 43 | // Return YES for supported orientations 44 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Plugins/iPodViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // iPodViewController.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import "iPodViewController.h" 10 | 11 | 12 | @implementation iPodViewController 13 | 14 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 15 | { 16 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 17 | if (self) { 18 | // Custom initialization 19 | } 20 | return self; 21 | } 22 | 23 | - (void)dealloc 24 | { 25 | [super dealloc]; 26 | } 27 | 28 | - (void)didReceiveMemoryWarning 29 | { 30 | // Releases the view if it doesn't have a superview. 31 | [super didReceiveMemoryWarning]; 32 | 33 | // Release any cached data, images, etc that aren't in use. 34 | } 35 | 36 | #pragma mark - View lifecycle 37 | 38 | /* 39 | // Implement loadView to create a view hierarchy programmatically, without using a nib. 40 | - (void)loadView 41 | { 42 | } 43 | */ 44 | 45 | /* 46 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 47 | - (void)viewDidLoad 48 | { 49 | [super viewDidLoad]; 50 | } 51 | */ 52 | 53 | - (void)viewDidUnload 54 | { 55 | [super viewDidUnload]; 56 | // Release any retained subviews of the main view. 57 | // e.g. self.myOutlet = nil; 58 | } 59 | 60 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 61 | { 62 | // Return YES for supported orientations 63 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/ChildBrowserViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ChildBrowserViewController.h 3 | // 4 | // Created by Jesse MacFadyen on 21/07/09. 5 | // Copyright 2009 Nitobi. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @protocol ChildBrowserDelegate 11 | 12 | 13 | 14 | /* 15 | * onChildLocationChanging:newLoc 16 | * 17 | * Discussion: 18 | * Invoked when a new page has loaded 19 | */ 20 | -(void) onChildLocationChange:(NSString*)newLoc; 21 | -(void) onOpenInSafari; 22 | -(void) onClose; 23 | @end 24 | 25 | 26 | @interface ChildBrowserViewController : UIViewController < UIWebViewDelegate > { 27 | IBOutlet UIWebView* webView; 28 | IBOutlet UIBarButtonItem* closeBtn; 29 | IBOutlet UIBarButtonItem* refreshBtn; 30 | IBOutlet UILabel* addressLabel; 31 | IBOutlet UIBarButtonItem* backBtn; 32 | IBOutlet UIBarButtonItem* fwdBtn; 33 | IBOutlet UIBarButtonItem* safariBtn; 34 | IBOutlet UIActivityIndicatorView* spinner; 35 | BOOL scaleEnabled; 36 | BOOL isImage; 37 | NSString* imageURL; 38 | NSArray* supportedOrientations; 39 | id delegate; 40 | } 41 | 42 | @property (nonatomic, retain)id delegate; 43 | @property (nonatomic, retain) NSArray* supportedOrientations; 44 | @property(retain) NSString* imageURL; 45 | @property(assign) BOOL isImage; 46 | 47 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation; 48 | - (ChildBrowserViewController*)initWithScale:(BOOL)enabled; 49 | - (IBAction)onDoneButtonPress:(id)sender; 50 | - (IBAction)onSafariButtonPress:(id)sender; 51 | - (void)loadURL:(NSString*)url; 52 | -(void)closeBrowser; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /HelloPhoneGap-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | icon.png 13 | CFBundleIconFiles 14 | 15 | icon.png 16 | icon@2x.png 17 | icon-72.png 18 | 19 | CFBundleIdentifier 20 | com.yourcompany.HelloPhoneGap 21 | CFBundleInfoDictionaryVersion 22 | 6.0 23 | CFBundleName 24 | ${PRODUCT_NAME} 25 | CFBundlePackageType 26 | APPL 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 1.0 31 | LSRequiresIPhoneOS 32 | 33 | NSMainNibFile 34 | 35 | NSMainNibFile~ipad 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Plugins/NativeControls/NativeControls.h: -------------------------------------------------------------------------------- 1 | // 2 | // NativeControls.h 3 | // 4 | // 5 | // Created by Jesse MacFadyen on 10-02-03. 6 | // MIT Licensed 7 | 8 | // Originally this code was developed my Michael Nachbaur 9 | // Formerly -> PhoneGap :: UIControls.h 10 | // Created by Michael Nachbaur on 13/04/09. 11 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 12 | 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import "PhoneGapCommand.h" 18 | 19 | @interface NativeControls : PhoneGapCommand { 20 | UITabBar* tabBar; 21 | NSMutableDictionary* tabBarItems; 22 | 23 | UIToolbar* toolBar; 24 | UIBarButtonItem* toolBarTitle; 25 | NSMutableDictionary* toolBarItems; 26 | CGRect originalWebViewBounds; 27 | 28 | } 29 | 30 | /* Tab Bar methods 31 | */ 32 | - (void)createTabBar:(NSArray*)arguments withDict:(NSDictionary*)options; 33 | - (void)showTabBar:(NSArray*)arguments withDict:(NSDictionary*)options; 34 | - (void)hideTabBar:(NSArray*)arguments withDict:(NSDictionary*)options; 35 | - (void)showTabBarItems:(NSArray*)arguments withDict:(NSDictionary*)options; 36 | - (void)createTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options; 37 | - (void)updateTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options; 38 | - (void)selectTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options; 39 | 40 | /* Tool Bar methods 41 | */ 42 | - (void)createToolBar:(NSArray*)arguments withDict:(NSDictionary*)options; 43 | - (void)setToolBarTitle:(NSArray*)arguments withDict:(NSDictionary*)options; 44 | - (void)toolBarTitleClicked; 45 | 46 | /* ActionSheet 47 | */ 48 | - (void)createActionSheet:(NSArray*)arguments withDict:(NSDictionary*)options; 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /www/PhoneGapShim1.js: -------------------------------------------------------------------------------- 1 | //from Jesse McFayden, Nitobi Inc 2 | //https://gist.github.com/raw/476358/dae649dc8d7b20041780bc6a2bcfcb9f31dbcdfe/pgDebug.js 3 | var safariDebug = (navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0); 4 | 5 | if (safariDebug) 6 | { 7 | 8 | PhoneGap.run_command = function() 9 | { 10 | if (!PhoneGap.available || !PhoneGap.queue.ready) 11 | { 12 | return; 13 | } 14 | 15 | PhoneGap.queue.ready = false; 16 | 17 | var args = PhoneGap.queue.commands.shift(); 18 | if (PhoneGap.queue.commands.length == 0) { 19 | clearInterval(PhoneGap.queue.timer); 20 | PhoneGap.queue.timer = null; 21 | } 22 | 23 | var uri = []; 24 | var dict = null; 25 | for (var i = 1; i < args.length; i++) { 26 | var arg = args[i]; 27 | if (arg == undefined || arg == null) 28 | arg = ''; 29 | if (typeof(arg) == 'object') 30 | dict = arg; 31 | else 32 | uri.push(encodeURIComponent(arg)); 33 | } 34 | var url = "gap://" + args[0] + "/" + uri.join("/"); 35 | if (dict != null) { 36 | var query_args = []; 37 | for (var name in dict) { 38 | if (typeof(name) != 'string') 39 | continue; 40 | query_args.push(encodeURIComponent(name) + "=" + encodeURIComponent(dict[name])); 41 | } 42 | if (query_args.length > 0) 43 | url += "?" + query_args.join("&"); 44 | } 45 | alert(url); 46 | //console.log(url); 47 | setTimeout(function() { 48 | PhoneGap.queue.ready = true; 49 | }, 50 | 10); 51 | // so the next one can go 52 | }; 53 | 54 | setTimeout(function() { 55 | DeviceInfo.uuid = "testing"; 56 | }, 57 | 2000); 58 | 59 | alert("here2"); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /www/ChildBrowser.js: -------------------------------------------------------------------------------- 1 | /* MIT licensed */ 2 | // (c) 2010 Jesse MacFadyen, Nitobi 3 | 4 | function ChildBrowser() 5 | { 6 | 7 | } 8 | 9 | // Callback when the location of the page changes 10 | // called from native 11 | ChildBrowser._onLocationChange = function(newLoc) 12 | { 13 | window.plugins.childBrowser.onLocationChange(newLoc); 14 | } 15 | 16 | // Callback when the user chooses the 'Done' button 17 | // called from native 18 | ChildBrowser._onClose = function() 19 | { 20 | window.plugins.childBrowser.onClose(); 21 | } 22 | 23 | // Callback when the user chooses the 'open in Safari' button 24 | // called from native 25 | ChildBrowser._onOpenExternal = function() 26 | { 27 | window.plugins.childBrowser.onOpenExternal(); 28 | } 29 | 30 | // Pages loaded into the ChildBrowser can execute callback scripts, so be careful to 31 | // check location, and make sure it is a location you trust. 32 | // Warning ... don't exec arbitrary code, it's risky and could fuck up your app. 33 | // called from native 34 | ChildBrowser._onJSCallback = function(js,loc) 35 | { 36 | // Not Implemented 37 | //window.plugins.childBrowser.onJSCallback(js,loc); 38 | } 39 | 40 | /* The interface that you will use to access functionality */ 41 | 42 | // Show a webpage, will result in a callback to onLocationChange 43 | ChildBrowser.prototype.showWebPage = function(loc) 44 | { 45 | PhoneGap.exec("ChildBrowserCommand.showWebPage",loc); 46 | } 47 | 48 | // close the browser, will NOT result in close callback 49 | ChildBrowser.prototype.close = function() 50 | { 51 | PhoneGap.exec("ChildBrowserCommand.close"); 52 | } 53 | 54 | // Not Implemented 55 | ChildBrowser.prototype.jsExec = function(jsString) 56 | { 57 | // Not Implemented!! 58 | //PhoneGap.exec("ChildBrowserCommand.jsExec",jsString); 59 | } 60 | 61 | // Note: this plugin does NOT install itself, call this method some time after deviceready to install it 62 | // it will be returned, and also available globally from window.plugins.childBrowser 63 | ChildBrowser.install = function() 64 | { 65 | if(!window.plugins) 66 | { 67 | window.plugins = {}; 68 | } 69 | 70 | window.plugins.childBrowser = new ChildBrowser(); 71 | return window.plugins.childBrowser; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/ChildBrowser.js: -------------------------------------------------------------------------------- 1 | /* MIT licensed */ 2 | // (c) 2010 Jesse MacFadyen, Nitobi 3 | 4 | function ChildBrowser() 5 | { 6 | 7 | } 8 | 9 | // Callback when the location of the page changes 10 | // called from native 11 | ChildBrowser._onLocationChange = function(newLoc) 12 | { 13 | window.plugins.childBrowser.onLocationChange(newLoc); 14 | } 15 | 16 | // Callback when the user chooses the 'Done' button 17 | // called from native 18 | ChildBrowser._onClose = function() 19 | { 20 | window.plugins.childBrowser.onClose(); 21 | } 22 | 23 | // Callback when the user chooses the 'open in Safari' button 24 | // called from native 25 | ChildBrowser._onOpenExternal = function() 26 | { 27 | window.plugins.childBrowser.onOpenExternal(); 28 | } 29 | 30 | // Pages loaded into the ChildBrowser can execute callback scripts, so be careful to 31 | // check location, and make sure it is a location you trust. 32 | // Warning ... don't exec arbitrary code, it's risky and could fuck up your app. 33 | // called from native 34 | ChildBrowser._onJSCallback = function(js,loc) 35 | { 36 | // Not Implemented 37 | //window.plugins.childBrowser.onJSCallback(js,loc); 38 | } 39 | 40 | /* The interface that you will use to access functionality */ 41 | 42 | // Show a webpage, will result in a callback to onLocationChange 43 | ChildBrowser.prototype.showWebPage = function(loc) 44 | { 45 | PhoneGap.exec("ChildBrowserCommand.showWebPage",loc); 46 | } 47 | 48 | // close the browser, will NOT result in close callback 49 | ChildBrowser.prototype.close = function() 50 | { 51 | PhoneGap.exec("ChildBrowserCommand.close"); 52 | } 53 | 54 | // Not Implemented 55 | ChildBrowser.prototype.jsExec = function(jsString) 56 | { 57 | // Not Implemented!! 58 | //PhoneGap.exec("ChildBrowserCommand.jsExec",jsString); 59 | } 60 | 61 | // Note: this plugin does NOT install itself, call this method some time after deviceready to install it 62 | // it will be returned, and also available globally from window.plugins.childBrowser 63 | ChildBrowser.install = function() 64 | { 65 | if(!window.plugins) 66 | { 67 | window.plugins = {}; 68 | } 69 | 70 | window.plugins.childBrowser = new ChildBrowser(); 71 | return window.plugins.childBrowser; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /www/APIExample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 28 | 29 | 30 | 31 |
32 | 33 | 34 | 35 | 38 | 40 | 41 | 42 |
36 | API 37 | back 39 |
43 |
44 |
45 | 46 | 47 | 48 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 60 |
49 |
50 |
56 | 57 |
61 |
62 | 63 |
waiting for PhoneGap to initialize....
64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/README.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The child browser allows you to display external webpages within your PhoneGap application. 5 | 6 | A simple use case would be: 7 | 8 | - Users can post links, and you don't want your users to exit your app to view the link. 9 | 10 | This command creates a popup browser that is shown in front of your app, when the user presses the done button they are simply returned to your app ( actually they never left ) 11 | 12 | The ChildBrowser has buttons for refreshing, navigating back + forwards, as well as the option to open in Safari. 13 | 14 | Note, because this is open source, I could not include the graphics I usually use for the back/forward and safari buttons. I have changed the XIB file to use system buttons ( rewind / fast-forward + action ) Ideally you should modify the XIB to use your own look. 15 | 16 | Here is a sample command to open google in a childbrowser : 17 | 18 | PhoneGap.exec("ChildBrowserCommand.showWebPage", "http://www.google.com" ); 19 | 20 | ================================= 21 | 22 | June 1, 2010 23 | Added support for orientations, supportedOrientations are passed through to the child view controller. -jm 24 | 25 | 26 | ================================ 27 | 28 | Sept 13, 2010 29 | + added callbacks for location change, close, opening in safari, 30 | + added method to close the browser from js. 31 | ( This should allow easy additions for facebook connect as you can monitor the browser's address and respond accordingly. ) 32 | + added images to the XIB, these need to be attached as resources in your xcode project. 33 | 34 | Sample use: 35 | 36 | 37 | var root = this; 38 | 39 | /* When this function is called, PhoneGap has been initialized and is ready to roll */ 40 | function onDeviceReady() 41 | { 42 | var cb = ChildBrowser.install(); 43 | if(cb != null) 44 | { 45 | cb.onLocationChange = function(loc){ root.locChanged(loc); }; 46 | cb.onClose = function(){root.onCloseBrowser()}; 47 | cb.onOpenExternal = function(){root.onOpenExternal();}; 48 | 49 | window.plugins.childBrowser.showWebPage("http://google.com"); 50 | 51 | } 52 | } 53 | 54 | function onCloseBrowser() 55 | { 56 | alert("In index.html child browser closed"); 57 | } 58 | 59 | function locChanged(loc) 60 | { 61 | alert("In index.html new loc = " + loc); 62 | } 63 | 64 | function onOpenExternal() 65 | { 66 | alert("In index.html onOpenExternal"); 67 | } 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Classes/HelloPhoneGapAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // HelloPhoneGapAppDelegate.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 3/14/11. 6 | // Copyright Chariot Solutions, LLC 2011. All rights reserved. 7 | // 8 | 9 | #import "HelloPhoneGapAppDelegate.h" 10 | #import "PhoneGapViewController.h" 11 | 12 | @implementation HelloPhoneGapAppDelegate 13 | @synthesize selectedSong; 14 | 15 | - (id) init 16 | { 17 | /** If you need to do any extra app-specific initialization, you can do it here 18 | * -jm 19 | **/ 20 | return [super init]; 21 | } 22 | 23 | /** 24 | * This is main kick off after the app inits, the views and Settings are setup here. 25 | */ 26 | - (void)applicationDidFinishLaunching:(UIApplication *)application 27 | { 28 | [ super applicationDidFinishLaunching:application ]; 29 | } 30 | 31 | -(id) getCommandInstance:(NSString*)className 32 | { 33 | /** You can catch your own commands here, if you wanted to extend the gap: protocol, or add your 34 | * own app specific protocol to it. -jm 35 | **/ 36 | return [super getCommandInstance:className]; 37 | } 38 | 39 | /** 40 | Called when the webview finishes loading. This stops the activity view and closes the imageview 41 | */ 42 | - (void)webViewDidFinishLoad:(UIWebView *)theWebView 43 | { 44 | return [ super webViewDidFinishLoad:theWebView ]; 45 | } 46 | 47 | - (void)webViewDidStartLoad:(UIWebView *)theWebView 48 | { 49 | return [ super webViewDidStartLoad:theWebView ]; 50 | } 51 | 52 | /** 53 | * Fail Loading With Error 54 | * Error - If the webpage failed to load display an error with the reson. 55 | */ 56 | - (void)webView:(UIWebView *)theWebView didFailLoadWithError:(NSError *)error 57 | { 58 | return [ super webView:theWebView didFailLoadWithError:error ]; 59 | } 60 | 61 | /** 62 | * Start Loading Request 63 | * This is where most of the magic happens... We take the request(s) and process the response. 64 | * From here we can re direct links and other protocalls to different internal methods. 65 | */ 66 | - (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 67 | { 68 | return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ]; 69 | } 70 | 71 | 72 | - (BOOL) execute:(InvokedUrlCommand*)command 73 | { 74 | return [ super execute:command]; 75 | } 76 | 77 | - (void)dealloc 78 | { 79 | [selectedSong release]; 80 | [ super dealloc ]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /HelloPhoneGap.xcodeproj/xcuserdata/hiedi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 19 | 20 | 33 | 34 | 47 | 48 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/ChildBrowserCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | 3 | // 4 | // 5 | // Created by Jesse MacFadyen on 10-05-29. 6 | // Copyright 2010 Nitobi. All rights reserved. 7 | // 8 | 9 | #import "ChildBrowserCommand.h" 10 | #import "PhoneGapViewController.h" 11 | #import "PhoneGapDelegate.h" 12 | 13 | @implementation ChildBrowserCommand 14 | 15 | @synthesize childBrowser; 16 | 17 | - (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url 18 | { 19 | if(childBrowser == NULL) 20 | { 21 | childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ]; 22 | childBrowser.delegate = self; 23 | } 24 | 25 | /* // TODO: Work in progress 26 | NSString* strOrientations = [ options objectForKey:@"supportedOrientations"]; 27 | NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","]; 28 | */ 29 | 30 | PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ]; 31 | childBrowser.supportedOrientations = cont.supportedOrientations; 32 | [ cont presentModalViewController:childBrowser animated:YES ]; 33 | 34 | NSString *url = (NSString*) [arguments objectAtIndex:0]; 35 | 36 | if (![url hasPrefix:@"http"]) 37 | { 38 | 39 | NSURL *appURL = [NSURL URLWithString:url]; 40 | if(![appURL scheme]) 41 | { 42 | appURL = [NSURL fileURLWithPath:[[[self appDelegate] class] pathForResource:url]]; 43 | url = [appURL absoluteString]; 44 | } 45 | 46 | } 47 | [childBrowser loadURL:url ]; 48 | 49 | } 50 | 51 | -(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url 52 | { 53 | [ childBrowser closeBrowser]; 54 | 55 | } 56 | 57 | -(void) onClose 58 | { 59 | NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""]; 60 | [ webView stringByEvaluatingJavaScriptFromString:jsCallback]; 61 | } 62 | 63 | -(void) onOpenInSafari 64 | { 65 | NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""]; 66 | [ webView stringByEvaluatingJavaScriptFromString:jsCallback]; 67 | } 68 | 69 | 70 | -(void) onChildLocationChange:(NSString*)newLoc 71 | { 72 | 73 | NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc]; 74 | NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 75 | 76 | NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl]; 77 | [ webView stringByEvaluatingJavaScriptFromString:jsCallback]; 78 | 79 | } 80 | 81 | 82 | 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /www/file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 | File API 41 | back 43 |
47 |
48 |
49 | 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 |
53 |
54 |
60 | 61 |
65 |
66 | 67 |
waiting for PhoneGap to initialize....
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /www/events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 | Events API 41 | back 43 |
47 |
48 |
49 | 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 |
53 |
54 |
60 | 61 |
65 |
66 | 67 |
waiting for PhoneGap to initialize....
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /www/media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 | Media API 41 | back 43 |
47 |
48 |
49 | 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 |
53 |
54 |
60 | 61 |
65 |
66 | 67 |
waiting for PhoneGap to initialize....
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /www/storage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 42 | 44 | 45 | 46 |
40 | Storage API 41 | back 43 |
47 |
48 |
49 | 50 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 |
53 |
54 |
60 | 61 |
65 |
66 | 67 |
waiting for PhoneGap to initialize....
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /HelloPhoneGap.xcodeproj/xcuserdata/hiedi.xcuserdatad/xcschemes/HelloPhoneGap.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 40 | 41 | 47 | 48 | 49 | 50 | 51 | 52 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /www/device.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 52 | 54 | 55 | 56 |
50 | Device API 51 | back 53 |
57 |
58 |
59 | 60 | 61 | 62 | 65 | 66 | 67 | 68 | 69 | 72 | 73 | 74 |
63 |
64 |
70 | 71 |
75 |
76 | 77 |
waiting for PhoneGap to initialize....
78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /www/childBrowser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | 48 | 50 | 51 | 52 | 53 |
46 | ChildBrowser Plugin 47 | back 49 |
54 |
55 |
56 | 57 | 58 | 59 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 73 | 74 | 75 |
60 |
61 |
65 |
66 |
71 | 72 |
76 |
77 | 78 |
waiting for PhoneGap to initialize....
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /www/network.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 49 | 50 | 51 | 52 |
53 | 54 | 55 | 56 | 59 | 61 | 62 | 63 |
57 | Network API 58 | back 60 |
64 |
65 |
66 | 67 | 68 | 69 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 |
70 |
71 |
77 | 78 |
82 |
83 | 84 |
waiting for PhoneGap to initialize....
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /www/debug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 14 | 44 | 45 | 46 | 47 |
48 | 49 | 50 | 51 | 54 | 56 | 57 | 58 |
52 | Device API 53 | back 55 |
59 |
60 |
61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 |
65 |
66 |
72 | 73 |
77 |
78 |
79 | 80 | 81 | 82 | 85 | 87 | 88 | 89 |
83 | Accelerometer API 84 | back 86 |
90 |
91 |
92 | 93 | 94 | 95 | 98 | 99 | 100 | 103 | 104 | 105 | 106 | 111 | 112 | 113 | 116 | 117 | 118 |
96 | 97 |
101 | 102 |
107 | 108 | 109 | 110 |
114 | 115 |
119 |
120 | 121 |
waiting for PhoneGap to initialize....
122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /Plugins/iPod/iPodCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // iPodCommand.m 3 | // HelloPhoneGap 4 | // 5 | // Created by Hiedi Utley on 4/1/11. 6 | // Copyright 2011 Chariot Solutions, LLC. All rights reserved. 7 | // 8 | 9 | #import "iPodCommand.h" 10 | #import 11 | 12 | #import "HelloPhoneGapAppDelegate.h" 13 | 14 | @implementation iPodCommand 15 | @synthesize successCallback, failureCallback; 16 | 17 | - (void) selectSong:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 18 | { 19 | 20 | NSUInteger argc = [arguments count]; 21 | 22 | if (argc > 0) 23 | { 24 | [self setSuccessCallback:[arguments objectAtIndex:0]]; 25 | } 26 | 27 | if (argc > 1) 28 | { 29 | 30 | [self setFailureCallback:[arguments objectAtIndex:1]]; 31 | } 32 | 33 | if (argc < 1) { 34 | NSLog(@"iPodCommand.selectSong: Missing 1st parameter: successCallback"); 35 | return; 36 | } 37 | 38 | 39 | 40 | [self showMediaPicker]; 41 | 42 | } 43 | - (void) playSong:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options 44 | { 45 | 46 | MPMusicPlayerController * musicPlayer = [MPMusicPlayerController iPodMusicPlayer]; 47 | 48 | MPMediaItemCollection * items = [(HelloPhoneGapAppDelegate*)[self appDelegate] selectedSong]; 49 | if (items) 50 | { 51 | [musicPlayer setQueueWithItemCollection: items]; 52 | 53 | MPMusicPlaybackState playbackState = [musicPlayer playbackState]; 54 | 55 | if (playbackState == MPMusicPlaybackStateStopped || playbackState == MPMusicPlaybackStatePaused) { 56 | [musicPlayer play]; 57 | } else if (playbackState == MPMusicPlaybackStatePlaying) { 58 | [musicPlayer pause]; 59 | } 60 | } 61 | 62 | } 63 | 64 | 65 | // Configures and displays the media item picker. 66 | - (void) showMediaPicker { 67 | 68 | MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic]; 69 | 70 | if (picker) 71 | { 72 | picker.delegate = self; 73 | picker.allowsPickingMultipleItems = NO; 74 | picker.prompt = @"Select a song."; 75 | 76 | [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated:YES]; 77 | 78 | [[self appViewController] presentModalViewController: picker animated: YES]; 79 | [picker release]; 80 | } 81 | else 82 | { 83 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"You must be running on a device for this to work!" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 84 | 85 | [alert show]; 86 | [alert release]; 87 | } 88 | } 89 | 90 | 91 | // Responds to the user tapping Done after choosing music. 92 | - (void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection { 93 | 94 | [[self appViewController] dismissModalViewControllerAnimated: YES]; 95 | 96 | if (mediaItemCollection) 97 | { 98 | if ([mediaItemCollection count] == 1) 99 | { 100 | MPMediaItem * song = [[mediaItemCollection items] objectAtIndex:0]; 101 | 102 | [(HelloPhoneGapAppDelegate*)[self appDelegate] setSelectedSong:mediaItemCollection]; 103 | NSMutableDictionary * songInfo = [NSMutableDictionary dictionary]; 104 | [songInfo setValue:[song valueForProperty:MPMediaItemPropertyTitle] forKey:@"title"]; 105 | [songInfo setValue:[song valueForProperty:MPMediaItemPropertyAlbumTitle] forKey:@"albumTitle"]; 106 | [songInfo setValue:[song valueForProperty:MPMediaItemPropertyArtist] forKey:@"artist"]; 107 | [songInfo setValue:[song valueForProperty:MPMediaItemPropertyGenre] forKey:@"genre"]; 108 | 109 | NSString * json = [songInfo JSONFragment]; 110 | [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"songInfo = %@;%@(songInfo);", json, successCallback]]; 111 | } 112 | 113 | } 114 | 115 | else 116 | { 117 | [(HelloPhoneGapAppDelegate*)[self appDelegate] setSelectedSong:nil]; 118 | } 119 | 120 | [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque animated:YES]; 121 | } 122 | 123 | 124 | // Responds to the user tapping done having chosen no music. 125 | - (void) mediaPickerDidCancel: (MPMediaPickerController *) mediaPicker { 126 | 127 | [[self appViewController] dismissModalViewControllerAnimated: YES]; 128 | 129 | [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque animated:YES]; 130 | } 131 | 132 | -(void) dealloc 133 | { 134 | [successCallback release]; 135 | [failureCallback release]; 136 | [super dealloc]; 137 | } 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /www/notification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 75 | 76 | 77 | 78 |
79 | 80 | 81 | 82 | 85 | 87 | 88 | 89 |
83 | Notification API 84 | back 86 |
90 |
91 |
92 | 93 | 94 | 95 | 98 | 99 | 100 | 103 | 104 | 105 | 108 | 109 | 110 | 113 | 114 | 115 | 116 | 119 | 120 | 121 |
96 |
97 |
101 |
102 |
106 |
107 |
111 |
112 |
117 | 118 |
122 |
123 | 124 |
waiting for PhoneGap to initialize....
125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Plugins/ChildBrowser/ChildBrowserViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ChildBrowserViewController.m 3 | // 4 | // Created by Jesse MacFadyen on 21/07/09. 5 | // Copyright 2009 Nitobi. All rights reserved. 6 | // 7 | 8 | #import "ChildBrowserViewController.h" 9 | 10 | 11 | @implementation ChildBrowserViewController 12 | 13 | @synthesize imageURL; 14 | @synthesize supportedOrientations; 15 | @synthesize isImage; 16 | @synthesize delegate; 17 | 18 | /* 19 | // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. 20 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 21 | if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | */ 27 | 28 | 29 | - (ChildBrowserViewController*)initWithScale:(BOOL)enabled 30 | { 31 | self = [super init]; 32 | 33 | 34 | scaleEnabled = enabled; 35 | 36 | return self; 37 | } 38 | 39 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 40 | - (void)viewDidLoad { 41 | [super viewDidLoad]; 42 | 43 | webView.delegate = self; 44 | webView.scalesPageToFit = TRUE; 45 | webView.backgroundColor = [UIColor whiteColor]; 46 | NSLog(@"View did load",@""); 47 | } 48 | 49 | 50 | 51 | 52 | 53 | - (void)didReceiveMemoryWarning { 54 | // Releases the view if it doesn't have a superview. 55 | [super didReceiveMemoryWarning]; 56 | 57 | // Release any cached data, images, etc that aren't in use. 58 | } 59 | 60 | - (void)viewDidUnload { 61 | // Release any retained subviews of the main view. 62 | // e.g. self.myOutlet = nil; 63 | NSLog(@"View did UN-load",@""); 64 | } 65 | 66 | 67 | - (void)dealloc { 68 | 69 | webView.delegate = nil; 70 | 71 | [webView release]; 72 | [closeBtn release]; 73 | [refreshBtn release]; 74 | [addressLabel release]; 75 | [backBtn release]; 76 | [fwdBtn release]; 77 | [safariBtn release]; 78 | [spinner release]; 79 | [ supportedOrientations release]; 80 | [super dealloc]; 81 | } 82 | 83 | -(void)closeBrowser 84 | { 85 | 86 | if(delegate != NULL) 87 | { 88 | [delegate onClose]; 89 | } 90 | 91 | [ [super parentViewController] dismissModalViewControllerAnimated:YES]; 92 | } 93 | 94 | -(IBAction) onDoneButtonPress:(id)sender 95 | { 96 | [ self closeBrowser]; 97 | } 98 | 99 | 100 | -(IBAction) onSafariButtonPress:(id)sender 101 | { 102 | 103 | if(delegate != NULL) 104 | { 105 | [delegate onOpenInSafari]; 106 | } 107 | 108 | if(isImage) 109 | { 110 | NSURL* pURL = [ [NSURL alloc] initWithString:imageURL ]; 111 | [ [ UIApplication sharedApplication ] openURL:pURL ]; 112 | } 113 | else 114 | { 115 | NSURLRequest *request = webView.request; 116 | [[UIApplication sharedApplication] openURL:request.URL]; 117 | } 118 | 119 | 120 | } 121 | 122 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation 123 | { 124 | BOOL autoRotate = [self.supportedOrientations count] > 1; // autorotate if only more than 1 orientation supported 125 | if (autoRotate) 126 | { 127 | if ([self.supportedOrientations containsObject: 128 | [NSNumber numberWithInt:interfaceOrientation]]) { 129 | return YES; 130 | } 131 | } 132 | 133 | return NO; 134 | } 135 | 136 | 137 | 138 | 139 | - (void)loadURL:(NSString*)url 140 | { 141 | NSLog(@"Opening Url : %@",url); 142 | 143 | if( [url hasSuffix:@".png" ] || 144 | [url hasSuffix:@".jpg" ] || 145 | [url hasSuffix:@".jpeg" ] || 146 | [url hasSuffix:@".bmp" ] || 147 | [url hasSuffix:@".gif" ] ) 148 | { 149 | [ imageURL release ]; 150 | imageURL = [url copy]; 151 | isImage = YES; 152 | NSString* htmlText = @""; 153 | htmlText = [ htmlText stringByReplacingOccurrencesOfString:@"IMGSRC" withString:url ]; 154 | 155 | [webView loadHTMLString:htmlText baseURL:[NSURL URLWithString:@""]]; 156 | 157 | } 158 | else 159 | { 160 | imageURL = @""; 161 | isImage = NO; 162 | 163 | 164 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 165 | [webView loadRequest:request]; 166 | 167 | 168 | } 169 | webView.hidden = NO; 170 | } 171 | 172 | 173 | - (void)webViewDidStartLoad:(UIWebView *)sender { 174 | addressLabel.text = @"Loading..."; 175 | backBtn.enabled = webView.canGoBack; 176 | fwdBtn.enabled = webView.canGoForward; 177 | 178 | [ spinner startAnimating ]; 179 | 180 | } 181 | 182 | - (void)webViewDidFinishLoad:(UIWebView *)sender 183 | { 184 | NSURLRequest *request = webView.request; 185 | NSLog(@"New Address is : %@",request.URL.absoluteString); 186 | addressLabel.text = request.URL.absoluteString; 187 | backBtn.enabled = webView.canGoBack; 188 | fwdBtn.enabled = webView.canGoForward; 189 | [ spinner stopAnimating ]; 190 | 191 | if(delegate != NULL) 192 | { 193 | [delegate onChildLocationChange:request.URL.absoluteString]; 194 | } 195 | 196 | } 197 | 198 | 199 | @end 200 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | 39 | 40 | 41 |
37 | PhoneGap API Examples 38 |
42 |
43 | 44 | 45 |
46 | 47 | 48 | 51 | 52 | 53 | 56 | 57 | 58 | 61 | 62 | 63 | 66 | 67 | 68 | 71 | 72 | 73 | 76 | 77 | 78 | 81 | 82 | 83 | 86 | 87 | 88 | 91 | 92 | 93 | 96 | 97 | 98 | 101 | 102 | 103 | 104 | 107 | 108 | 109 | 112 | 113 |
49 | 50 |
54 | 55 |
59 | 60 |
64 | 65 |
69 | 70 |
74 | 75 |
79 | 80 |
84 | 85 |
89 | 90 |
94 | 95 |
99 | 100 |
105 | 106 |
110 | 111 |
114 | 115 |
116 | 117 |
waiting for PhoneGap to initialize....
118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /www/accelerometer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 83 | 84 | 85 | 86 |
87 | 88 | 89 | 90 | 93 | 95 | 96 | 97 |
91 | Accelerometer API 92 | back 94 |
98 |
99 |
100 | 101 | 102 | 103 | 106 | 107 | 108 | 111 | 112 | 113 | 114 | 119 | 120 | 121 | 124 | 125 | 126 |
104 | 105 |
109 | 110 |
115 | 116 | 117 | 118 |
122 | 123 |
127 |
128 | 129 |
waiting for PhoneGap to initialize....
130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /www/Compass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 90 | 91 | 92 | 93 |
94 | 95 | 96 | 97 | 100 | 102 | 103 | 104 |
98 | Compass API 99 | back 101 |
105 |
106 |
107 | 108 | 109 | 110 | 113 | 114 | 115 | 116 | 117 | 120 | 121 | 122 | 127 | 128 | 129 | 132 | 133 | 134 |
111 |
112 |
118 | 119 |
123 | 124 | 125 | 126 |
130 | 131 |
135 |
136 | 137 |
waiting for PhoneGap to initialize....
138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /www/custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 14 | 15 | 97 | 98 | 99 | 100 |
101 | 102 | 103 | 104 | 107 | 109 | 110 | 111 |
105 | iPod Plugin 106 | back 108 |
112 |
113 |
114 | 115 | 116 | 117 | 121 | 122 | 123 | 124 | 127 | 128 | 129 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 |
118 |
119 | 120 |
125 | 126 |
130 |
131 |
136 |
137 |
142 |
143 | 144 |
waiting for PhoneGap to initialize....
145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /www/nativeControls.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 106 | 107 | 108 | 109 |
110 | 111 | 112 | 113 | 116 | 118 | 119 | 120 |
114 | Native Controls Plugin 115 | back 117 |
121 |
122 |
123 | 124 | 125 | 126 | 129 | 130 | 131 | 135 | 136 | 137 | 140 | 141 |
127 |
128 |
132 | 133 | 134 |
138 |
139 |
142 |
143 | 144 |
waiting for PhoneGap to initialize....
145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /www/geolocation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 91 | 92 | 93 | 94 |
95 | 96 | 97 | 98 | 101 | 103 | 104 | 105 |
99 | GeoLocation API 100 | back 102 |
106 |
107 |
108 | 109 | 110 | 111 | 114 | 115 | 116 | 117 | 118 | 121 | 122 | 123 | 128 | 129 | 130 | 133 | 134 |
112 |
113 |
119 | 120 |
124 | 125 | 126 | 127 |
131 | 132 |
135 |
136 | 137 |
waiting for PhoneGap to initialize....
138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /Plugins/ActivityIndicator/DSActivityView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DSActivityView.h 3 | // Dejal Open Source 4 | // 5 | // Created by David Sinclair on 2009-07-26. 6 | // Copyright 2009-2010 Dejal Systems, LLC. All rights reserved. 7 | // 8 | // Redistribution and use in binary and source forms, with or without modification, 9 | // are permitted for any project, commercial or otherwise, provided that the 10 | // following conditions are met: 11 | // 12 | // Redistributions in binary form must display the copyright notice in the About 13 | // view, website, and/or documentation. 14 | // 15 | // Redistributions of source code must retain the copyright notice, this list of 16 | // conditions, and the following disclaimer. 17 | // 18 | // THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 | // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | // PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | 29 | @interface DSActivityView : UIView 30 | { 31 | UIView *_originalView; 32 | UIView *_borderView; 33 | UIActivityIndicatorView *_activityIndicator; 34 | UILabel *_activityLabel; 35 | NSUInteger _labelWidth; 36 | BOOL _showNetworkActivityIndicator; 37 | } 38 | 39 | // The view to contain the activity indicator and label. The bezel style has a semi-transparent rounded rectangle, others are fully transparent: 40 | @property (nonatomic, readonly) UIView *borderView; 41 | 42 | // The activity indicator view; automatically created on first access: 43 | @property (nonatomic, readonly) UIActivityIndicatorView *activityIndicator; 44 | 45 | // The activity label; automatically created on first access: 46 | @property (nonatomic, readonly) UILabel *activityLabel; 47 | 48 | // A fixed width for the label text, or zero to automatically calculate the text size (normally set on creation of the view object): 49 | @property (nonatomic) NSUInteger labelWidth; 50 | 51 | // Whether to show the network activity indicator in the status bar. Set to YES if the activity is network-related. This can be toggled on and off as desired while the activity view is visible (e.g. have it on while fetching data, then disable it while parsing it). By default it is not shown: 52 | @property (nonatomic) BOOL showNetworkActivityIndicator; 53 | 54 | // Returns the currently displayed activity view, or nil if there isn't one: 55 | + (DSActivityView *)currentActivityView; 56 | 57 | // Creates and adds an activity view centered within the specified view, using the label "Loading...". Returns the activity view, already added as a subview of the specified view: 58 | + (DSActivityView *)newActivityViewForView:(UIView *)addToView; 59 | 60 | // Creates and adds an activity view centered within the specified view, using the specified label. Returns the activity view, already added as a subview of the specified view: 61 | + (DSActivityView *)newActivityViewForView:(UIView *)addToView withLabel:(NSString *)labelText; 62 | 63 | // Creates and adds an activity view centered within the specified view, using the specified label and a fixed label width. The fixed width is useful if you want to change the label text while the view is visible. Returns the activity view, already added as a subview of the specified view: 64 | + (DSActivityView *)newActivityViewForView:(UIView *)addToView withLabel:(NSString *)labelText width:(NSUInteger)labelWidth; 65 | 66 | // Designated initializer. Configures the activity view using the specified label text and width, and adds as a subview of the specified view: 67 | - (DSActivityView *)initForView:(UIView *)addToView withLabel:(NSString *)labelText width:(NSUInteger)labelWidth; 68 | 69 | // Immediately removes and releases the view without any animation: 70 | + (void)removeView; 71 | 72 | 73 | +(void) updateMessage:(NSString *) message; 74 | 75 | @end 76 | 77 | 78 | // ---------------------------------------------------------------------------------------- 79 | #pragma mark - 80 | // ---------------------------------------------------------------------------------------- 81 | 82 | 83 | // These methods are exposed for subclasses to override to customize the appearance and behavior; see the implementation for details: 84 | 85 | @interface DSActivityView () 86 | 87 | @property (nonatomic, retain) UIView *originalView; 88 | 89 | - (UIView *)viewForView:(UIView *)view; 90 | - (CGRect)enclosingFrame; 91 | - (void)setupBackground; 92 | - (void)animateShow; 93 | - (void)animateRemove; 94 | 95 | @end 96 | 97 | 98 | // ---------------------------------------------------------------------------------------- 99 | #pragma mark - 100 | // ---------------------------------------------------------------------------------------- 101 | 102 | 103 | @interface DSWhiteActivityView : DSActivityView 104 | { 105 | } 106 | 107 | @end 108 | 109 | 110 | // ---------------------------------------------------------------------------------------- 111 | #pragma mark - 112 | // ---------------------------------------------------------------------------------------- 113 | 114 | 115 | @interface DSBezelActivityView : DSActivityView 116 | { 117 | } 118 | 119 | // Animates the view out from the superview and releases it, or simply removes and releases it immediately if not animating: 120 | + (void)removeViewAnimated:(BOOL)animated; 121 | 122 | @end 123 | 124 | 125 | // ---------------------------------------------------------------------------------------- 126 | #pragma mark - 127 | // ---------------------------------------------------------------------------------------- 128 | 129 | 130 | @interface DSKeyboardActivityView : DSBezelActivityView 131 | { 132 | } 133 | 134 | // Creates and adds a keyboard-style activity view, using the label "Loading...". Returns the activity view, already covering the keyboard, or nil if the keyboard isn't currently displayed: 135 | + (DSKeyboardActivityView *)newActivityView; 136 | 137 | // Creates and adds a keyboard-style activity view, using the specified label. Returns the activity view, already covering the keyboard, or nil if the keyboard isn't currently displayed: 138 | + (DSKeyboardActivityView *)newActivityViewWithLabel:(NSString *)labelText; 139 | 140 | @end 141 | 142 | 143 | // ---------------------------------------------------------------------------------------- 144 | #pragma mark - 145 | // ---------------------------------------------------------------------------------------- 146 | 147 | 148 | @interface UIApplication (KeyboardView) 149 | 150 | - (UIView *)keyboardView; 151 | 152 | @end; 153 | 154 | -------------------------------------------------------------------------------- /www/contacts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 120 | 121 | 122 | 123 |
124 | 125 | 126 | 127 | 130 | 132 | 133 | 134 |
128 | Contacts API 129 | back 131 |
135 |
136 |
137 | 138 | 139 | 140 | 145 | 146 | 147 | 148 | 149 | 152 | 153 | 154 | 157 | 158 | 159 | 160 | 161 | 164 | 165 |
141 | 142 |
143 | 144 |
150 | hi2! 151 |
155 |
156 |
162 | 163 |
166 |
167 | 168 |
waiting for PhoneGap to initialize....
169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /www/camera.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | HelloPhoneGap 10 | 11 | 12 | 13 | 122 | 123 | 124 | 125 |
126 | 127 | 128 | 129 | 132 | 134 | 135 | 136 |
130 | Camera API 131 | back 133 |
137 |
138 |
139 | 140 | 141 | 142 | 145 | 146 | 147 | 148 | 151 | 152 | 153 | 156 | 157 | 158 | 161 | 162 | 163 | 164 | 165 | 169 | 170 | 171 |
143 |
144 |
149 |
150 |
154 |
155 |
159 |
160 |
166 | 167 | 168 |
172 |
173 | 174 |
waiting for PhoneGap to initialize....
175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /www/NativeControls.js: -------------------------------------------------------------------------------- 1 | /* 2 | // This code is adapted from the work of: 3 | // Created by Michael Nachbaur on 13/04/09. 4 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 5 | // MIT licensed 6 | */ 7 | 8 | /** 9 | * This class exposes mobile phone interface controls to JavaScript, such as 10 | * native tab and tool bars, etc. 11 | * @constructor 12 | */ 13 | function NativeControls() { 14 | this.tabBarTag = 0; 15 | this.tabBarCallbacks = {}; 16 | } 17 | 18 | /** 19 | * Create a native tab bar that can have tab buttons added to it which can respond to events. 20 | */ 21 | NativeControls.prototype.createTabBar = function() { 22 | PhoneGap.exec("NativeControls.createTabBar"); 23 | }; 24 | 25 | /** 26 | * Show a tab bar. The tab bar has to be created first. 27 | * @param {Object} [options] Options indicating how the tab bar should be shown: 28 | * - \c height integer indicating the height of the tab bar (default: \c 49) 29 | * - \c position specifies whether the tab bar will be placed at the \c top or \c bottom of the screen (default: \c bottom) 30 | */ 31 | NativeControls.prototype.showTabBar = function(options) { 32 | if (!options) options = {}; 33 | PhoneGap.exec("NativeControls.showTabBar", options); 34 | }; 35 | 36 | /** 37 | * Hide a tab bar. The tab bar has to be created first. 38 | */ 39 | NativeControls.prototype.hideTabBar = function(animate) { 40 | if (animate == undefined || animate == null) 41 | animate = true; 42 | PhoneGap.exec("NativeControls.hideTabBar", { animate: animate }); 43 | }; 44 | 45 | /** 46 | * Create a new tab bar item for use on a previously created tab bar. Use ::showTabBarItems to show the new item on the tab bar. 47 | * 48 | * If the supplied image name is one of the labels listed below, then this method will construct a tab button 49 | * using the standard system buttons. Note that if you use one of the system images, that the \c title you supply will be ignored. 50 | * 51 | * Tab Buttons 52 | * - tabButton:More 53 | * - tabButton:Favorites 54 | * - tabButton:Featured 55 | * - tabButton:TopRated 56 | * - tabButton:Recents 57 | * - tabButton:Contacts 58 | * - tabButton:History 59 | * - tabButton:Bookmarks 60 | * - tabButton:Search 61 | * - tabButton:Downloads 62 | * - tabButton:MostRecent 63 | * - tabButton:MostViewed 64 | * @param {String} name internal name to refer to this tab by 65 | * @param {String} [title] title text to show on the tab, or null if no text should be shown 66 | * @param {String} [image] image filename or internal identifier to show, or null if now image should be shown 67 | * @param {Object} [options] Options for customizing the individual tab item 68 | * - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden 69 | */ 70 | NativeControls.prototype.createTabBarItem = function(name, label, image, options) { 71 | 72 | var tag = this.tabBarTag++; 73 | if (options && 'onSelect' in options && typeof(options['onSelect']) == 'function') { 74 | this.tabBarCallbacks[tag] = {'onSelect':options.onSelect,'name':name}; 75 | //delete options.onSelect; 76 | } 77 | 78 | PhoneGap.exec("NativeControls.createTabBarItem", name, label, image, tag, options); 79 | }; 80 | 81 | /** 82 | * Update an existing tab bar item to change its badge value. 83 | * @param {String} name internal name used to represent this item when it was created 84 | * @param {Object} options Options for customizing the individual tab item 85 | * - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden 86 | */ 87 | NativeControls.prototype.updateTabBarItem = function(name, options) { 88 | if (!options) options = {}; 89 | PhoneGap.exec("NativeControls.updateTabBarItem", name, options); 90 | }; 91 | 92 | /** 93 | * Show previously created items on the tab bar 94 | * @param {String} arguments... the item names to be shown 95 | * @param {Object} [options] dictionary of options, notable options including: 96 | * - \c animate indicates that the items should animate onto the tab bar 97 | * @see createTabBarItem 98 | * @see createTabBar 99 | */ 100 | NativeControls.prototype.showTabBarItems = function() { 101 | var parameters = [ "NativeControls.showTabBarItems" ]; 102 | for (var i = 0; i < arguments.length; i++) { 103 | parameters.push(arguments[i]); 104 | //alert(arguments[i]); 105 | } 106 | PhoneGap.exec.apply(this, parameters); 107 | }; 108 | 109 | /** 110 | * Manually select an individual tab bar item, or nil for deselecting a currently selected tab bar item. 111 | * @param {String} tabName the name of the tab to select, or null if all tabs should be deselected 112 | * @see createTabBarItem 113 | * @see showTabBarItems 114 | */ 115 | NativeControls.prototype.selectTabBarItem = function(tab) { 116 | PhoneGap.exec("NativeControls.selectTabBarItem", tab); 117 | }; 118 | 119 | /** 120 | * Function called when a tab bar item has been selected. 121 | * @param {Number} tag the tag number for the item that has been selected 122 | */ 123 | NativeControls.prototype.tabBarItemSelected = function(tag) 124 | { 125 | if (typeof(this.tabBarCallbacks[tag].onSelect) == 'function') 126 | this.tabBarCallbacks[tag].onSelect(this.tabBarCallbacks[tag].name); 127 | }; 128 | 129 | /** 130 | * Create a toolbar. 131 | */ 132 | NativeControls.prototype.createToolBar = function() 133 | { 134 | PhoneGap.exec("NativeControls.createToolBar"); 135 | }; 136 | 137 | /** 138 | * Function called when a tab bar item has been selected. 139 | * @param {String} title the title to set within the toolbar 140 | */ 141 | NativeControls.prototype.setToolBarTitle = function(title) 142 | { 143 | PhoneGap.exec("NativeControls.setToolBarTitle", title); 144 | }; 145 | 146 | 147 | 148 | NativeControls.prototype.createActionSheet = function(buttonTitles,actionSheetTitle,cancelButtonIndex,destructiveButtonIndex) 149 | { 150 | var options = {}; 151 | 152 | if(actionSheetTitle != null) 153 | { 154 | options.title = actionSheetTitle; 155 | } 156 | if(cancelButtonIndex != null) 157 | { 158 | options.cancelButtonIndex = cancelButtonIndex; 159 | } 160 | if(destructiveButtonIndex != null) 161 | { 162 | options.destructiveButtonIndex = destructiveButtonIndex; 163 | } 164 | 165 | var params = [ "NativeControls.createActionSheet",options ]; 166 | for (var i = 0; i < buttonTitles.length; i++) 167 | { 168 | params.push(buttonTitles[i]); 169 | } 170 | PhoneGap.exec.apply(this, params); 171 | 172 | this.actionSheetDelegate = {}; 173 | return this.actionSheetDelegate; 174 | } 175 | 176 | NativeControls.prototype._onActionSheetDismissed = function(index) 177 | { 178 | this.actionSheetDelegate.onActionSheetDismissed(index); 179 | } 180 | 181 | PhoneGap.addConstructor(function() 182 | { 183 | if(!window.plugins) 184 | { 185 | window.plugins = {}; 186 | } 187 | window.plugins.nativeControls = new NativeControls(); 188 | }); 189 | 190 | function StatusBar() 191 | { 192 | 193 | } 194 | 195 | StatusBar.prototype.setHidden = function(bHide) 196 | { 197 | PhoneGap.exec("StatusBar.setHidden",bHide); 198 | } 199 | 200 | PhoneGap.addConstructor( 201 | 202 | function() 203 | { 204 | if (typeof window.plugins == "undefined") 205 | window.plugins = {}; 206 | 207 | if (typeof window.plugins.statusBar == "undefined") 208 | window.plugins.statusBar = new StatusBar(); 209 | 210 | } 211 | ); 212 | -------------------------------------------------------------------------------- /Plugins/NativeControls/NativeControls.js: -------------------------------------------------------------------------------- 1 | /* 2 | // This code is adapted from the work of: 3 | // Created by Michael Nachbaur on 13/04/09. 4 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 5 | // MIT licensed 6 | */ 7 | 8 | /** 9 | * This class exposes mobile phone interface controls to JavaScript, such as 10 | * native tab and tool bars, etc. 11 | * @constructor 12 | */ 13 | function NativeControls() { 14 | this.tabBarTag = 0; 15 | this.tabBarCallbacks = {}; 16 | } 17 | 18 | /** 19 | * Create a native tab bar that can have tab buttons added to it which can respond to events. 20 | */ 21 | NativeControls.prototype.createTabBar = function() { 22 | PhoneGap.exec("NativeControls.createTabBar"); 23 | }; 24 | 25 | /** 26 | * Show a tab bar. The tab bar has to be created first. 27 | * @param {Object} [options] Options indicating how the tab bar should be shown: 28 | * - \c height integer indicating the height of the tab bar (default: \c 49) 29 | * - \c position specifies whether the tab bar will be placed at the \c top or \c bottom of the screen (default: \c bottom) 30 | */ 31 | NativeControls.prototype.showTabBar = function(options) { 32 | if (!options) options = {}; 33 | PhoneGap.exec("NativeControls.showTabBar", options); 34 | }; 35 | 36 | /** 37 | * Hide a tab bar. The tab bar has to be created first. 38 | */ 39 | NativeControls.prototype.hideTabBar = function(animate) { 40 | if (animate == undefined || animate == null) 41 | animate = true; 42 | PhoneGap.exec("NativeControls.hideTabBar", { animate: animate }); 43 | }; 44 | 45 | /** 46 | * Create a new tab bar item for use on a previously created tab bar. Use ::showTabBarItems to show the new item on the tab bar. 47 | * 48 | * If the supplied image name is one of the labels listed below, then this method will construct a tab button 49 | * using the standard system buttons. Note that if you use one of the system images, that the \c title you supply will be ignored. 50 | * 51 | * Tab Buttons 52 | * - tabButton:More 53 | * - tabButton:Favorites 54 | * - tabButton:Featured 55 | * - tabButton:TopRated 56 | * - tabButton:Recents 57 | * - tabButton:Contacts 58 | * - tabButton:History 59 | * - tabButton:Bookmarks 60 | * - tabButton:Search 61 | * - tabButton:Downloads 62 | * - tabButton:MostRecent 63 | * - tabButton:MostViewed 64 | * @param {String} name internal name to refer to this tab by 65 | * @param {String} [title] title text to show on the tab, or null if no text should be shown 66 | * @param {String} [image] image filename or internal identifier to show, or null if now image should be shown 67 | * @param {Object} [options] Options for customizing the individual tab item 68 | * - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden 69 | */ 70 | NativeControls.prototype.createTabBarItem = function(name, label, image, options) { 71 | 72 | var tag = this.tabBarTag++; 73 | if (options && 'onSelect' in options && typeof(options['onSelect']) == 'function') { 74 | this.tabBarCallbacks[tag] = {'onSelect':options.onSelect,'name':name}; 75 | //delete options.onSelect; 76 | } 77 | 78 | PhoneGap.exec("NativeControls.createTabBarItem", name, label, image, tag, options); 79 | }; 80 | 81 | /** 82 | * Update an existing tab bar item to change its badge value. 83 | * @param {String} name internal name used to represent this item when it was created 84 | * @param {Object} options Options for customizing the individual tab item 85 | * - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden 86 | */ 87 | NativeControls.prototype.updateTabBarItem = function(name, options) { 88 | if (!options) options = {}; 89 | PhoneGap.exec("NativeControls.updateTabBarItem", name, options); 90 | }; 91 | 92 | /** 93 | * Show previously created items on the tab bar 94 | * @param {String} arguments... the item names to be shown 95 | * @param {Object} [options] dictionary of options, notable options including: 96 | * - \c animate indicates that the items should animate onto the tab bar 97 | * @see createTabBarItem 98 | * @see createTabBar 99 | */ 100 | NativeControls.prototype.showTabBarItems = function() { 101 | var parameters = [ "NativeControls.showTabBarItems" ]; 102 | for (var i = 0; i < arguments.length; i++) { 103 | parameters.push(arguments[i]); 104 | //alert(arguments[i]); 105 | } 106 | PhoneGap.exec.apply(this, parameters); 107 | }; 108 | 109 | /** 110 | * Manually select an individual tab bar item, or nil for deselecting a currently selected tab bar item. 111 | * @param {String} tabName the name of the tab to select, or null if all tabs should be deselected 112 | * @see createTabBarItem 113 | * @see showTabBarItems 114 | */ 115 | NativeControls.prototype.selectTabBarItem = function(tab) { 116 | PhoneGap.exec("NativeControls.selectTabBarItem", tab); 117 | }; 118 | 119 | /** 120 | * Function called when a tab bar item has been selected. 121 | * @param {Number} tag the tag number for the item that has been selected 122 | */ 123 | NativeControls.prototype.tabBarItemSelected = function(tag) 124 | { 125 | if (typeof(this.tabBarCallbacks[tag].onSelect) == 'function') 126 | this.tabBarCallbacks[tag].onSelect(this.tabBarCallbacks[tag].name); 127 | }; 128 | 129 | /** 130 | * Create a toolbar. 131 | */ 132 | NativeControls.prototype.createToolBar = function() 133 | { 134 | PhoneGap.exec("NativeControls.createToolBar"); 135 | }; 136 | 137 | /** 138 | * Function called when a tab bar item has been selected. 139 | * @param {String} title the title to set within the toolbar 140 | */ 141 | NativeControls.prototype.setToolBarTitle = function(title) 142 | { 143 | PhoneGap.exec("NativeControls.setToolBarTitle", title); 144 | }; 145 | 146 | 147 | 148 | NativeControls.prototype.createActionSheet = function(buttonTitles,actionSheetTitle,cancelButtonIndex,destructiveButtonIndex) 149 | { 150 | var options = {}; 151 | 152 | if(actionSheetTitle != null) 153 | { 154 | options.title = actionSheetTitle; 155 | } 156 | if(cancelButtonIndex != null) 157 | { 158 | options.cancelButtonIndex = cancelButtonIndex; 159 | } 160 | if(destructiveButtonIndex != null) 161 | { 162 | options.destructiveButtonIndex = destructiveButtonIndex; 163 | } 164 | 165 | var params = [ "NativeControls.createActionSheet",options ]; 166 | for (var i = 0; i < buttonTitles.length; i++) 167 | { 168 | params.push(buttonTitles[i]); 169 | } 170 | PhoneGap.exec.apply(this, params); 171 | 172 | this.actionSheetDelegate = {}; 173 | return this.actionSheetDelegate; 174 | } 175 | 176 | NativeControls.prototype._onActionSheetDismissed = function(index) 177 | { 178 | this.actionSheetDelegate.onActionSheetDismissed(index); 179 | } 180 | 181 | PhoneGap.addConstructor(function() 182 | { 183 | if(!window.plugins) 184 | { 185 | window.plugins = {}; 186 | } 187 | window.plugins.nativeControls = new NativeControls(); 188 | }); 189 | 190 | function StatusBar() 191 | { 192 | 193 | } 194 | 195 | StatusBar.prototype.setHidden = function(bHide) 196 | { 197 | PhoneGap.exec("StatusBar.setHidden",bHide); 198 | } 199 | 200 | PhoneGap.addConstructor( 201 | 202 | function() 203 | { 204 | if (typeof window.plugins == "undefined") 205 | window.plugins = {}; 206 | 207 | if (typeof window.plugins.statusBar == "undefined") 208 | window.plugins.statusBar = new StatusBar(); 209 | 210 | } 211 | ); 212 | -------------------------------------------------------------------------------- /Plugins/NativeControls/NativeControls.m: -------------------------------------------------------------------------------- 1 | // 2 | // NativeControls.h 3 | // 4 | // 5 | // Created by Jesse MacFadyen on 10-02-03. 6 | // MIT Licensed 7 | 8 | // Originally this code was developed my Michael Nachbaur 9 | // Formerly -> PhoneGap :: UIControls.h 10 | // Created by Michael Nachbaur on 13/04/09. 11 | // Copyright 2009 Decaf Ninja Software. All rights reserved. 12 | 13 | #import "NativeControls.h" 14 | 15 | #import 16 | 17 | @implementation NativeControls 18 | #ifndef __IPHONE_3_0 19 | @synthesize webView; 20 | #endif 21 | 22 | -(PhoneGapCommand*) initWithWebView:(UIWebView*)theWebView 23 | { 24 | self = (NativeControls*)[super initWithWebView:theWebView]; 25 | if (self) 26 | { 27 | tabBarItems = [[NSMutableDictionary alloc] initWithCapacity:5]; 28 | originalWebViewBounds = theWebView.bounds; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)dealloc 34 | { 35 | if (tabBar) 36 | [tabBar release]; 37 | [super dealloc]; 38 | } 39 | 40 | #pragma mark - 41 | #pragma mark TabBar 42 | 43 | /** 44 | * Create a native tab bar at either the top or the bottom of the display. 45 | * @brief creates a tab bar 46 | * @param arguments unused 47 | * @param options unused 48 | */ 49 | - (void)createTabBar:(NSArray*)arguments withDict:(NSDictionary*)options 50 | { 51 | tabBar = [UITabBar new]; 52 | [tabBar sizeToFit]; 53 | tabBar.delegate = self; 54 | tabBar.multipleTouchEnabled = NO; 55 | tabBar.autoresizesSubviews = YES; 56 | tabBar.hidden = YES; 57 | tabBar.userInteractionEnabled = YES; 58 | tabBar.opaque = YES; 59 | 60 | webView.superview.autoresizesSubviews = YES; 61 | 62 | [ webView.superview addSubview:tabBar]; 63 | } 64 | 65 | /** 66 | * Show the tab bar after its been created. 67 | * @brief show the tab bar 68 | * @param arguments unused 69 | * @param options used to indicate options for where and how the tab bar should be placed 70 | * - \c height integer indicating the height of the tab bar (default: \c 49) 71 | * - \c position specifies whether the tab bar will be placed at the \c top or \c bottom of the screen (default: \c bottom) 72 | */ 73 | - (void)showTabBar:(NSArray*)arguments withDict:(NSDictionary*)options 74 | { 75 | if (!tabBar) 76 | [self createTabBar:nil withDict:nil]; 77 | 78 | // if we are calling this again when its shown, reset 79 | if (!tabBar.hidden) { 80 | return; 81 | } 82 | 83 | CGFloat height = 0.0f; 84 | BOOL atBottom = YES; 85 | 86 | CGRect offsetRect = [ [UIApplication sharedApplication] statusBarFrame]; 87 | 88 | if (options) 89 | { 90 | height = [[options objectForKey:@"height"] floatValue]; 91 | atBottom = [[options objectForKey:@"position"] isEqualToString:@"bottom"]; 92 | } 93 | if(height == 0) 94 | { 95 | height = 49.0f; 96 | } 97 | 98 | tabBar.hidden = NO; 99 | CGRect webViewBounds = originalWebViewBounds; 100 | CGRect tabBarBounds; 101 | 102 | NSNotification* notif = [NSNotification notificationWithName:@"PGLayoutSubviewAdded" object:tabBar]; 103 | [[NSNotificationQueue defaultQueue] enqueueNotification:notif postingStyle: NSPostASAP]; 104 | 105 | if (atBottom) 106 | { 107 | tabBarBounds = CGRectMake( 108 | webViewBounds.origin.x, 109 | webViewBounds.origin.y + webViewBounds.size.height - height - offsetRect.size.height, 110 | webViewBounds.size.width, 111 | height 112 | ); 113 | webViewBounds = CGRectMake( 114 | webViewBounds.origin.x, 115 | webViewBounds.origin.y, 116 | webViewBounds.size.width, 117 | webViewBounds.size.height - height - offsetRect.size.height 118 | ); 119 | } 120 | else 121 | { 122 | tabBarBounds = CGRectMake( 123 | webViewBounds.origin.x, 124 | webViewBounds.origin.y, 125 | webViewBounds.size.width, 126 | height 127 | ); 128 | webViewBounds = CGRectMake( 129 | webViewBounds.origin.x, 130 | webViewBounds.origin.y + height, 131 | webViewBounds.size.width, 132 | webViewBounds.size.height - height 133 | ); 134 | } 135 | 136 | [tabBar setFrame:tabBarBounds]; 137 | 138 | 139 | [webView setFrame:webViewBounds]; 140 | } 141 | 142 | /** 143 | * Hide the tab bar 144 | * @brief hide the tab bar 145 | * @param arguments unused 146 | * @param options unused 147 | */ 148 | - (void)hideTabBar:(NSArray*)arguments withDict:(NSDictionary*)options 149 | { 150 | if (!tabBar) 151 | [self createTabBar:nil withDict:nil]; 152 | tabBar.hidden = YES; 153 | 154 | NSNotification* notif = [NSNotification notificationWithName:@"PGLayoutSubviewRemoved" object:tabBar]; 155 | [[NSNotificationQueue defaultQueue] enqueueNotification:notif postingStyle: NSPostASAP]; 156 | 157 | 158 | [webView setFrame:originalWebViewBounds]; 159 | } 160 | 161 | /** 162 | * Create a new tab bar item for use on a previously created tab bar. Use ::showTabBarItems to show the new item on the tab bar. 163 | * 164 | * If the supplied image name is one of the labels listed below, then this method will construct a tab button 165 | * using the standard system buttons. Note that if you use one of the system images, that the \c title you supply will be ignored. 166 | * - Tab Buttons 167 | * - tabButton:More 168 | * - tabButton:Favorites 169 | * - tabButton:Featured 170 | * - tabButton:TopRated 171 | * - tabButton:Recents 172 | * - tabButton:Contacts 173 | * - tabButton:History 174 | * - tabButton:Bookmarks 175 | * - tabButton:Search 176 | * - tabButton:Downloads 177 | * - tabButton:MostRecent 178 | * - tabButton:MostViewed 179 | * @brief create a tab bar item 180 | * @param arguments Parameters used to create the tab bar 181 | * -# \c name internal name to refer to this tab by 182 | * -# \c title title text to show on the tab, or null if no text should be shown 183 | * -# \c image image filename or internal identifier to show, or null if now image should be shown 184 | * -# \c tag unique number to be used as an internal reference to this button 185 | * @param options Options for customizing the individual tab item 186 | * - \c badge value to display in the optional circular badge on the item; if nil or unspecified, the badge will be hidden 187 | */ 188 | - (void)createTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options 189 | { 190 | if (!tabBar) 191 | [self createTabBar:nil withDict:nil]; 192 | 193 | NSString *name = [arguments objectAtIndex:0]; 194 | NSString *title = [arguments objectAtIndex:1]; 195 | NSString *imageName = [arguments objectAtIndex:2]; 196 | int tag = [[arguments objectAtIndex:3] intValue]; 197 | 198 | UITabBarItem *item = nil; 199 | if ([imageName length] > 0) { 200 | UIBarButtonSystemItem systemItem = -1; 201 | if ([imageName isEqualToString:@"tabButton:More"]) systemItem = UITabBarSystemItemMore; 202 | if ([imageName isEqualToString:@"tabButton:Favorites"]) systemItem = UITabBarSystemItemFavorites; 203 | if ([imageName isEqualToString:@"tabButton:Featured"]) systemItem = UITabBarSystemItemFeatured; 204 | if ([imageName isEqualToString:@"tabButton:TopRated"]) systemItem = UITabBarSystemItemTopRated; 205 | if ([imageName isEqualToString:@"tabButton:Recents"]) systemItem = UITabBarSystemItemRecents; 206 | if ([imageName isEqualToString:@"tabButton:Contacts"]) systemItem = UITabBarSystemItemContacts; 207 | if ([imageName isEqualToString:@"tabButton:History"]) systemItem = UITabBarSystemItemHistory; 208 | if ([imageName isEqualToString:@"tabButton:Bookmarks"]) systemItem = UITabBarSystemItemBookmarks; 209 | if ([imageName isEqualToString:@"tabButton:Search"]) systemItem = UITabBarSystemItemSearch; 210 | if ([imageName isEqualToString:@"tabButton:Downloads"]) systemItem = UITabBarSystemItemDownloads; 211 | if ([imageName isEqualToString:@"tabButton:MostRecent"]) systemItem = UITabBarSystemItemMostRecent; 212 | if ([imageName isEqualToString:@"tabButton:MostViewed"]) systemItem = UITabBarSystemItemMostViewed; 213 | if (systemItem != -1) 214 | item = [[UITabBarItem alloc] initWithTabBarSystemItem:systemItem tag:tag]; 215 | } 216 | 217 | if (item == nil) { 218 | NSLog(@"Creating with custom image and title"); 219 | item = [[UITabBarItem alloc] initWithTitle:title image:[UIImage imageNamed:imageName] tag:tag]; 220 | } 221 | 222 | if ([options objectForKey:@"badge"]) 223 | item.badgeValue = [options objectForKey:@"badge"]; 224 | 225 | [tabBarItems setObject:item forKey:name]; 226 | [item release]; 227 | } 228 | 229 | 230 | /** 231 | * Update an existing tab bar item to change its badge value. 232 | * @brief update the badge value on an existing tab bar item 233 | * @param arguments Parameters used to identify the tab bar item to update 234 | * -# \c name internal name used to represent this item when it was created 235 | * @param options Options for customizing the individual tab item 236 | * - \c badge value to display in the optional circular badge on the item; if nil or unspecified, the badge will be hidden 237 | */ 238 | - (void)updateTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options 239 | { 240 | if (!tabBar) 241 | [self createTabBar:nil withDict:nil]; 242 | 243 | NSString *name = [arguments objectAtIndex:0]; 244 | UITabBarItem *item = [tabBarItems objectForKey:name]; 245 | if (item) 246 | item.badgeValue = [options objectForKey:@"badge"]; 247 | } 248 | 249 | 250 | /** 251 | * Show previously created items on the tab bar 252 | * @brief show a list of tab bar items 253 | * @param arguments the item names to be shown 254 | * @param options dictionary of options, notable options including: 255 | * - \c animate indicates that the items should animate onto the tab bar 256 | * @see createTabBarItem 257 | * @see createTabBar 258 | */ 259 | - (void)showTabBarItems:(NSArray*)arguments withDict:(NSDictionary*)options 260 | { 261 | if (!tabBar) 262 | [self createTabBar:nil withDict:nil]; 263 | 264 | int i, count = [arguments count]; 265 | NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:count]; 266 | for (i = 0; i < count; i++) { 267 | NSString *itemName = [arguments objectAtIndex:i]; 268 | UITabBarItem *item = [tabBarItems objectForKey:itemName]; 269 | if (item) 270 | [items addObject:item]; 271 | } 272 | 273 | BOOL animateItems = YES; 274 | if ([options objectForKey:@"animate"]) 275 | animateItems = [(NSString*)[options objectForKey:@"animate"] boolValue]; 276 | [tabBar setItems:items animated:animateItems]; 277 | [items release]; 278 | } 279 | 280 | /** 281 | * Manually select an individual tab bar item, or nil for deselecting a currently selected tab bar item. 282 | * @brief manually select a tab bar item 283 | * @param arguments the name of the tab bar item to select 284 | * @see createTabBarItem 285 | * @see showTabBarItems 286 | */ 287 | - (void)selectTabBarItem:(NSArray*)arguments withDict:(NSDictionary*)options 288 | { 289 | if (!tabBar) 290 | [self createTabBar:nil withDict:nil]; 291 | 292 | NSString *itemName = [arguments objectAtIndex:0]; 293 | UITabBarItem *item = [tabBarItems objectForKey:itemName]; 294 | if (item) 295 | tabBar.selectedItem = item; 296 | else 297 | tabBar.selectedItem = nil; 298 | } 299 | 300 | 301 | - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item 302 | { 303 | NSString * jsCallBack = [NSString stringWithFormat:@"window.plugins.nativeControls.tabBarItemSelected(%d);", item.tag]; 304 | [webView stringByEvaluatingJavaScriptFromString:jsCallBack]; 305 | } 306 | 307 | #pragma mark - 308 | #pragma mark ToolBar 309 | 310 | 311 | /*********************************************************************************/ 312 | - (void)createToolBar:(NSArray*)arguments withDict:(NSDictionary*)options 313 | { 314 | CGFloat height = 45.0f; 315 | BOOL atTop = YES; 316 | UIBarStyle style = UIBarStyleBlackOpaque; 317 | 318 | NSDictionary* toolBarSettings = options;//[settings objectForKey:@"ToolBarSettings"]; 319 | if (toolBarSettings) 320 | { 321 | if ([toolBarSettings objectForKey:@"height"]) 322 | height = [[toolBarSettings objectForKey:@"height"] floatValue]; 323 | 324 | if ([toolBarSettings objectForKey:@"position"]) 325 | atTop = [[toolBarSettings objectForKey:@"position"] isEqualToString:@"top"]; 326 | 327 | #pragma unused(atTop) 328 | 329 | NSString *styleStr = [toolBarSettings objectForKey:@"style"]; 330 | if ([styleStr isEqualToString:@"Default"]) 331 | style = UIBarStyleDefault; 332 | else if ([styleStr isEqualToString:@"BlackOpaque"]) 333 | style = UIBarStyleBlackOpaque; 334 | else if ([styleStr isEqualToString:@"BlackTranslucent"]) 335 | style = UIBarStyleBlackTranslucent; 336 | } 337 | 338 | CGRect webViewBounds = webView.bounds; 339 | CGRect toolBarBounds = CGRectMake( 340 | webViewBounds.origin.x, 341 | webViewBounds.origin.y, 342 | webViewBounds.size.width, 343 | height 344 | ); 345 | webViewBounds = CGRectMake( 346 | webViewBounds.origin.x, 347 | webViewBounds.origin.y + height, 348 | webViewBounds.size.width, 349 | webViewBounds.size.height - height 350 | ); 351 | toolBar = [[UIToolbar alloc] initWithFrame:toolBarBounds]; 352 | [toolBar sizeToFit]; 353 | toolBar.hidden = NO; 354 | toolBar.multipleTouchEnabled = NO; 355 | toolBar.autoresizesSubviews = YES; 356 | toolBar.userInteractionEnabled = YES; 357 | toolBar.barStyle = style; 358 | 359 | 360 | [toolBar setFrame:toolBarBounds]; 361 | [webView setFrame:webViewBounds]; 362 | 363 | [self.webView.superview addSubview:toolBar]; 364 | } 365 | 366 | 367 | 368 | 369 | - (void)setToolBarTitle:(NSArray*)arguments withDict:(NSDictionary*)options 370 | { 371 | if (!toolBar) 372 | [self createToolBar:nil withDict:nil]; 373 | 374 | NSString *title = [arguments objectAtIndex:0]; 375 | if (!toolBarTitle) { 376 | toolBarTitle = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStylePlain target:self action:@selector(toolBarTitleClicked)]; 377 | } else { 378 | //toolBarTitle.title = title; 379 | } 380 | 381 | 382 | //UINavigationBar 383 | 384 | //initWithImage 385 | UIImage* logoImage = [UIImage imageNamed:@"www/ui/tabHeader.png"]; 386 | 387 | 388 | 389 | /*UIImageView* logo = [[ UIImageView alloc ] initWithImage: logoImage ]; 390 | logo.userInteractionEnabled = YES;*/ 391 | 392 | 393 | UIButton* logoBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 394 | 395 | [ logoBtn setBackgroundImage:logoImage forState:UIControlStateNormal]; 396 | [ logoBtn addTarget:self action:@selector(toolBarTitleClicked) forControlEvents:UIControlEventTouchUpInside]; 397 | 398 | UIBarButtonItem *modalBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:logoBtn]; 399 | 400 | UIImageView* backImage = [[ UIImageView alloc ] initWithImage:[UIImage imageNamed:@"www/ui/but-back.png"]]; 401 | UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(toolBarTitleClicked)]; 402 | [ backButtonItem setCustomView:backImage]; 403 | // backButtonItem.target = self; 404 | // backButtonItem.action = @selector(toolBarTitleClicked); 405 | 406 | /*[ backButtonItem addTarget:self action:@selector(toolBarTitleClicked) forControlEvents:UIControlEventTouchUpInside];*/ 407 | 408 | 409 | 410 | 411 | //UIBarButtonItem* item = [[UIBarButtonItem alloc] initWithImage: style:UIBarButtonItemStylePlain target:self action:@selector(toolBarTitleClicked)]; 412 | 413 | UIBarButtonItem *space1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; 414 | UIBarButtonItem *space2 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; 415 | 416 | UIBarButtonItem *refresh = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:nil]; 417 | //refresh.target = self; 418 | //refresh.action = @selector(toolBarTitleClicked); 419 | 420 | //refresh.customView = backImage; 421 | 422 | 423 | NSArray *items = [[NSArray alloc] initWithObjects:backButtonItem,space1,modalBarButtonItem,space2, refresh, nil]; 424 | 425 | 426 | //UINavigationItem* navItem = [[UINavigationItem alloc] init]; 427 | //navItem.titleView = logo; 428 | 429 | [toolBar setItems:items animated:YES]; 430 | 431 | 432 | 433 | modalBarButtonItem.target = self; 434 | modalBarButtonItem.action = @selector(toolBarTitleClicked); 435 | [modalBarButtonItem release]; 436 | 437 | 438 | 439 | [backButtonItem release]; 440 | [space1 release]; 441 | [space2 release]; 442 | [ refresh release ]; 443 | [ backImage release ]; 444 | 445 | 446 | //[ toolBar pushNavigationItem:navItem animated:YES]; 447 | 448 | [items release]; 449 | } 450 | 451 | - (void)toolBarTitleClicked 452 | { 453 | NSLog(@"Toolbar clicked"); 454 | } 455 | 456 | #pragma mark - 457 | #pragma mark ActionSheet 458 | 459 | - (void)createActionSheet:(NSArray*)arguments withDict:(NSDictionary*)options 460 | { 461 | 462 | NSString* title = [options objectForKey:@"title"]; 463 | 464 | 465 | UIActionSheet* actionSheet = [ [UIActionSheet alloc ] 466 | initWithTitle:title 467 | delegate:self 468 | cancelButtonTitle:nil 469 | destructiveButtonTitle:nil 470 | otherButtonTitles:nil 471 | ]; 472 | 473 | int count = [arguments count]; 474 | for(int n = 0; n < count; n++) 475 | { 476 | [ actionSheet addButtonWithTitle:[arguments objectAtIndex:n]]; 477 | } 478 | 479 | if([options objectForKey:@"cancelButtonIndex"]) 480 | { 481 | actionSheet.cancelButtonIndex = [[options objectForKey:@"cancelButtonIndex"] intValue]; 482 | } 483 | if([options objectForKey:@"destructiveButtonIndex"]) 484 | { 485 | actionSheet.destructiveButtonIndex = [[options objectForKey:@"destructiveButtonIndex"] intValue]; 486 | } 487 | 488 | actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;//UIActionSheetStyleBlackOpaque; 489 | [actionSheet showInView:webView.superview]; 490 | [actionSheet release]; 491 | 492 | } 493 | 494 | 495 | 496 | - (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex 497 | { 498 | NSString * jsCallBack = [NSString stringWithFormat:@"window.plugins.nativeControls._onActionSheetDismissed(%d);", buttonIndex]; 499 | [webView stringByEvaluatingJavaScriptFromString:jsCallBack]; 500 | } 501 | 502 | 503 | @end 504 | -------------------------------------------------------------------------------- /HelloPhoneGap-iPad.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* HelloPhoneGapAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* HelloPhoneGapAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 15 | 301BF552109A68D80062928A /* libPhoneGapLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libPhoneGapLib.a */; }; 16 | 301BF570109A69640062928A /* www in Resources */ = {isa = PBXBuildFile; fileRef = 301BF56E109A69640062928A /* www */; }; 17 | 301BF5B5109A6A2B0062928A /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B4109A6A2B0062928A /* AddressBook.framework */; }; 18 | 301BF5B7109A6A2B0062928A /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */; }; 19 | 301BF5B9109A6A2B0062928A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */; }; 20 | 301BF5BB109A6A2B0062928A /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BA109A6A2B0062928A /* AVFoundation.framework */; }; 21 | 301BF5BD109A6A2B0062928A /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BC109A6A2B0062928A /* CFNetwork.framework */; }; 22 | 301BF5BF109A6A2B0062928A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5BE109A6A2B0062928A /* CoreLocation.framework */; }; 23 | 301BF5C1109A6A2B0062928A /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */; }; 24 | 301BF5C3109A6A2B0062928A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C2109A6A2B0062928A /* QuartzCore.framework */; }; 25 | 301BF5C5109A6A2B0062928A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */; }; 26 | 302CC88810CD8CCE00C49659 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 302CC88610CD8CCE00C49659 /* Default.png */; }; 27 | 302CC88910CD8CCE00C49659 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 302CC88710CD8CCE00C49659 /* icon.png */; }; 28 | 3053AC6F109B7857006FCFE7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 3053AC6E109B7857006FCFE7 /* VERSION */; }; 29 | 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; }; 30 | 306A54B8116BF75C00DDE61E /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 306A54B7116BF75B00DDE61E /* icon-72.png */; }; 31 | 306A5519116BF8E100DDE61E /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 306A5517116BF8E100DDE61E /* Default-Landscape.png */; }; 32 | 306A551A116BF8E100DDE61E /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 306A5518116BF8E100DDE61E /* Default-Portrait.png */; }; 33 | 307D2A43123047800040C0FA /* PhoneGapBuildSettings.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 307D2A42123047800040C0FA /* PhoneGapBuildSettings.xcconfig */; }; 34 | 30E1352710E2C1420031B30D /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 30E1352610E2C1420031B30D /* PhoneGap.plist */; }; 35 | /* End PBXBuildFile section */ 36 | 37 | /* Begin PBXContainerItemProxy section */ 38 | 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 301BF52D109A57CC0062928A /* PhoneGapLib.xcodeproj */; 41 | proxyType = 2; 42 | remoteGlobalIDString = D2AAC07E0554694100DB518D; 43 | remoteInfo = PhoneGapLib; 44 | }; 45 | 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 301BF52D109A57CC0062928A /* PhoneGapLib.xcodeproj */; 48 | proxyType = 1; 49 | remoteGlobalIDString = D2AAC07D0554694100DB518D; 50 | remoteInfo = PhoneGapLib; 51 | }; 52 | /* End PBXContainerItemProxy section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 56 | 1D3623240D0F684500981E51 /* HelloPhoneGapAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HelloPhoneGapAppDelegate.h"; sourceTree = ""; }; 57 | 1D3623250D0F684500981E51 /* HelloPhoneGapAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HelloPhoneGapAppDelegate.m"; sourceTree = ""; }; 58 | 1D6058910D05DD3D006BFB54 /* HelloPhoneGap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloPhoneGap.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 60 | 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 61 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 62 | 301BF52D109A57CC0062928A /* PhoneGapLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = PhoneGapLib.xcodeproj; sourceTree = PHONEGAPLIB; }; 63 | 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; 64 | 301BF5B4109A6A2B0062928A /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; 65 | 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; 66 | 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 67 | 301BF5BA109A6A2B0062928A /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 68 | 301BF5BC109A6A2B0062928A /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 69 | 301BF5BE109A6A2B0062928A /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 70 | 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 71 | 301BF5C2109A6A2B0062928A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 72 | 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 73 | 302CC88610CD8CCE00C49659 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 74 | 302CC88710CD8CCE00C49659 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; 75 | 3053AC6E109B7857006FCFE7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = PHONEGAPLIB; }; 76 | 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 77 | 306A54B7116BF75B00DDE61E /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72.png"; sourceTree = ""; }; 78 | 306A5517116BF8E100DDE61E /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape.png"; sourceTree = ""; }; 79 | 306A5518116BF8E100DDE61E /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait.png"; sourceTree = ""; }; 80 | 307D2A42123047800040C0FA /* PhoneGapBuildSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = PhoneGapBuildSettings.xcconfig; sourceTree = ""; }; 81 | 30E1352610E2C1420031B30D /* PhoneGap.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = ""; }; 82 | 32CA4F630368D1EE00C91783 /* HelloPhoneGap_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HelloPhoneGap_Prefix.pch"; sourceTree = ""; }; 83 | 8D1107310486CEB800E47090 /* HelloPhoneGap-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "HelloPhoneGap-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 84 | /* End PBXFileReference section */ 85 | 86 | /* Begin PBXFrameworksBuildPhase section */ 87 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | 301BF552109A68D80062928A /* libPhoneGapLib.a in Frameworks */, 92 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 93 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 94 | 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, 95 | 301BF5B5109A6A2B0062928A /* AddressBook.framework in Frameworks */, 96 | 301BF5B7109A6A2B0062928A /* AddressBookUI.framework in Frameworks */, 97 | 301BF5B9109A6A2B0062928A /* AudioToolbox.framework in Frameworks */, 98 | 301BF5BB109A6A2B0062928A /* AVFoundation.framework in Frameworks */, 99 | 301BF5BD109A6A2B0062928A /* CFNetwork.framework in Frameworks */, 100 | 301BF5BF109A6A2B0062928A /* CoreLocation.framework in Frameworks */, 101 | 301BF5C1109A6A2B0062928A /* MediaPlayer.framework in Frameworks */, 102 | 301BF5C3109A6A2B0062928A /* QuartzCore.framework in Frameworks */, 103 | 301BF5C5109A6A2B0062928A /* SystemConfiguration.framework in Frameworks */, 104 | 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */, 105 | ); 106 | runOnlyForDeploymentPostprocessing = 0; 107 | }; 108 | /* End PBXFrameworksBuildPhase section */ 109 | 110 | /* Begin PBXGroup section */ 111 | 080E96DDFE201D6D7F000001 /* Classes */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 1D3623240D0F684500981E51 /* HelloPhoneGapAppDelegate.h */, 115 | 1D3623250D0F684500981E51 /* HelloPhoneGapAppDelegate.m */, 116 | ); 117 | path = Classes; 118 | sourceTree = SOURCE_ROOT; 119 | }; 120 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 1D6058910D05DD3D006BFB54 /* HelloPhoneGap.app */, 124 | ); 125 | name = Products; 126 | sourceTree = ""; 127 | }; 128 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 301BF56E109A69640062928A /* www */, 132 | 301BF52D109A57CC0062928A /* PhoneGapLib.xcodeproj */, 133 | 080E96DDFE201D6D7F000001 /* Classes */, 134 | 307C750510C5A3420062BCA9 /* Plugins */, 135 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 136 | 29B97317FDCFA39411CA2CEA /* Resources */, 137 | 305C287C116BD0B200AA761E /* Resources-iPad */, 138 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 139 | 19C28FACFE9D520D11CA2CBB /* Products */, 140 | ); 141 | name = CustomTemplate; 142 | sourceTree = ""; 143 | }; 144 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 32CA4F630368D1EE00C91783 /* HelloPhoneGap_Prefix.pch */, 148 | 29B97316FDCFA39411CA2CEA /* main.m */, 149 | ); 150 | name = "Other Sources"; 151 | sourceTree = ""; 152 | }; 153 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 307D2A42123047800040C0FA /* PhoneGapBuildSettings.xcconfig */, 157 | 306A5517116BF8E100DDE61E /* Default-Landscape.png */, 158 | 306A5518116BF8E100DDE61E /* Default-Portrait.png */, 159 | 302CC88710CD8CCE00C49659 /* icon.png */, 160 | 306A54B7116BF75B00DDE61E /* icon-72.png */, 161 | 30E1352610E2C1420031B30D /* PhoneGap.plist */, 162 | 302CC88610CD8CCE00C49659 /* Default.png */, 163 | 3053AC6E109B7857006FCFE7 /* VERSION */, 164 | 8D1107310486CEB800E47090 /* HelloPhoneGap-Info.plist */, 165 | ); 166 | name = Resources; 167 | sourceTree = ""; 168 | }; 169 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 173 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 174 | 288765FC0DF74451002DB57D /* CoreGraphics.framework */, 175 | 301BF5B4109A6A2B0062928A /* AddressBook.framework */, 176 | 301BF5B6109A6A2B0062928A /* AddressBookUI.framework */, 177 | 301BF5B8109A6A2B0062928A /* AudioToolbox.framework */, 178 | 301BF5BA109A6A2B0062928A /* AVFoundation.framework */, 179 | 301BF5BC109A6A2B0062928A /* CFNetwork.framework */, 180 | 301BF5BE109A6A2B0062928A /* CoreLocation.framework */, 181 | 301BF5C0109A6A2B0062928A /* MediaPlayer.framework */, 182 | 301BF5C2109A6A2B0062928A /* QuartzCore.framework */, 183 | 301BF5C4109A6A2B0062928A /* SystemConfiguration.framework */, 184 | 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */, 185 | ); 186 | name = Frameworks; 187 | sourceTree = ""; 188 | }; 189 | 301BF52E109A57CC0062928A /* Products */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 301BF535109A57CC0062928A /* libPhoneGapLib.a */, 193 | ); 194 | name = Products; 195 | sourceTree = ""; 196 | }; 197 | 305C287C116BD0B200AA761E /* Resources-iPad */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | ); 201 | name = "Resources-iPad"; 202 | sourceTree = ""; 203 | }; 204 | 307C750510C5A3420062BCA9 /* Plugins */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | ); 208 | path = Plugins; 209 | sourceTree = SOURCE_ROOT; 210 | }; 211 | /* End PBXGroup section */ 212 | 213 | /* Begin PBXNativeTarget section */ 214 | 1D6058900D05DD3D006BFB54 /* HelloPhoneGap */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloPhoneGap" */; 217 | buildPhases = ( 218 | 30E9A9A110B758320022D3BA /* Copy PhoneGap Javascript */, 219 | 304B58A110DAC018002A0835 /* Touch www folder */, 220 | 1D60588D0D05DD3D006BFB54 /* Resources */, 221 | 1D60588E0D05DD3D006BFB54 /* Sources */, 222 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | 301BF551109A68C00062928A /* PBXTargetDependency */, 228 | ); 229 | name = "HelloPhoneGap"; 230 | productName = "HelloPhoneGap"; 231 | productReference = 1D6058910D05DD3D006BFB54 /* HelloPhoneGap.app */; 232 | productType = "com.apple.product-type.application"; 233 | }; 234 | /* End PBXNativeTarget section */ 235 | 236 | /* Begin PBXProject section */ 237 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 238 | isa = PBXProject; 239 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloPhoneGap-iPad" */; 240 | compatibilityVersion = "Xcode 3.1"; 241 | developmentRegion = English; 242 | hasScannedForEncodings = 1; 243 | knownRegions = ( 244 | English, 245 | Japanese, 246 | French, 247 | German, 248 | ); 249 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 250 | projectDirPath = ""; 251 | projectReferences = ( 252 | { 253 | ProductGroup = 301BF52E109A57CC0062928A /* Products */; 254 | ProjectRef = 301BF52D109A57CC0062928A /* PhoneGapLib.xcodeproj */; 255 | }, 256 | ); 257 | projectRoot = ""; 258 | targets = ( 259 | 1D6058900D05DD3D006BFB54 /* HelloPhoneGap */, 260 | ); 261 | }; 262 | /* End PBXProject section */ 263 | 264 | /* Begin PBXReferenceProxy section */ 265 | 301BF535109A57CC0062928A /* libPhoneGapLib.a */ = { 266 | isa = PBXReferenceProxy; 267 | fileType = archive.ar; 268 | path = libPhoneGapLib.a; 269 | remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; 270 | sourceTree = BUILT_PRODUCTS_DIR; 271 | }; 272 | /* End PBXReferenceProxy section */ 273 | 274 | /* Begin PBXResourcesBuildPhase section */ 275 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 276 | isa = PBXResourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | 301BF570109A69640062928A /* www in Resources */, 280 | 3053AC6F109B7857006FCFE7 /* VERSION in Resources */, 281 | 302CC88810CD8CCE00C49659 /* Default.png in Resources */, 282 | 302CC88910CD8CCE00C49659 /* icon.png in Resources */, 283 | 30E1352710E2C1420031B30D /* PhoneGap.plist in Resources */, 284 | 306A54B8116BF75C00DDE61E /* icon-72.png in Resources */, 285 | 306A5519116BF8E100DDE61E /* Default-Landscape.png in Resources */, 286 | 306A551A116BF8E100DDE61E /* Default-Portrait.png in Resources */, 287 | 307D2A43123047800040C0FA /* PhoneGapBuildSettings.xcconfig in Resources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | /* End PBXResourcesBuildPhase section */ 292 | 293 | /* Begin PBXShellScriptBuildPhase section */ 294 | 304B58A110DAC018002A0835 /* Touch www folder */ = { 295 | isa = PBXShellScriptBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | ); 299 | inputPaths = ( 300 | ); 301 | name = "Touch www folder"; 302 | outputPaths = ( 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | shellPath = /bin/sh; 306 | shellScript = "touch -cm ${PROJECT_DIR}/www"; 307 | }; 308 | 30E9A9A110B758320022D3BA /* Copy PhoneGap Javascript */ = { 309 | isa = PBXShellScriptBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | inputPaths = ( 314 | ); 315 | name = "Copy PhoneGap Javascript"; 316 | outputPaths = ( 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | shellPath = /bin/sh; 320 | shellScript = "# get the PhoneGapLib version\nexport pgver=`head -1 ${PHONEGAPLIB}/VERSION`\n\n# compile and copy PhoneGapLib\nmake -C \"${PHONEGAPLIB}\"\necho cp ${PHONEGAPLIB}/javascripts/phonegap.*.js ${PROJECT_DIR}/www\ncp ${PHONEGAPLIB}/javascripts/phonegap.*.js ${PROJECT_DIR}/www\n\n# replace [src=\"phonegap.js\"] in all files in www\nfind ${PROJECT_DIR}/www | xargs grep 'src[ \t]*=[ \t]*[\\\\'\\\"]phonegap.*.*.js[\\\\'\\\"]' -sl | xargs -L1 sed -i \"\" \"s/src[ \t]*=[ \t]*[\\\\'\\\"]phonegap.*.*.js[\\\\'\\\"]/src=\\\"phonegap.${pgver}.min.js\\\"/g\""; 321 | }; 322 | /* End PBXShellScriptBuildPhase section */ 323 | 324 | /* Begin PBXSourcesBuildPhase section */ 325 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 326 | isa = PBXSourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 330 | 1D3623260D0F684500981E51 /* HelloPhoneGapAppDelegate.m in Sources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | /* End PBXSourcesBuildPhase section */ 335 | 336 | /* Begin PBXTargetDependency section */ 337 | 301BF551109A68C00062928A /* PBXTargetDependency */ = { 338 | isa = PBXTargetDependency; 339 | name = PhoneGapLib; 340 | targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; 341 | }; 342 | /* End PBXTargetDependency section */ 343 | 344 | /* Begin XCBuildConfiguration section */ 345 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 350 | COPY_PHASE_STRIP = NO; 351 | GCC_DYNAMIC_NO_PIC = NO; 352 | GCC_OPTIMIZATION_LEVEL = 0; 353 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 354 | GCC_PREFIX_HEADER = "HelloPhoneGap_Prefix.pch"; 355 | INFOPLIST_FILE = "HelloPhoneGap-Info.plist"; 356 | IPHONEOS_DEPLOYMENT_TARGET = 3.2; 357 | PRODUCT_NAME = "HelloPhoneGap"; 358 | SDKROOT = iphoneos; 359 | TARGETED_DEVICE_FAMILY = "1,2"; 360 | }; 361 | name = Debug; 362 | }; 363 | 1D6058950D05DD3E006BFB54 /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 368 | COPY_PHASE_STRIP = YES; 369 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 370 | GCC_PREFIX_HEADER = "HelloPhoneGap_Prefix.pch"; 371 | INFOPLIST_FILE = "HelloPhoneGap-Info.plist"; 372 | IPHONEOS_DEPLOYMENT_TARGET = 3.2; 373 | PRODUCT_NAME = "HelloPhoneGap"; 374 | SDKROOT = iphoneos; 375 | TARGETED_DEVICE_FAMILY = "1,2"; 376 | }; 377 | name = Release; 378 | }; 379 | C01FCF4F08A954540054247B /* Debug */ = { 380 | isa = XCBuildConfiguration; 381 | baseConfigurationReference = 307D2A42123047800040C0FA /* PhoneGapBuildSettings.xcconfig */; 382 | buildSettings = { 383 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 384 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 385 | GCC_C_LANGUAGE_STANDARD = c99; 386 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 3.0; 389 | OTHER_LDFLAGS = ( 390 | "-all_load", 391 | "-Obj-C", 392 | ); 393 | PREBINDING = NO; 394 | SDKROOT = iphoneos; 395 | USER_HEADER_SEARCH_PATHS = "$(PHONEGAPLIB)/Classes/JSON $(PHONEGAPLIB)/Classes"; 396 | }; 397 | name = Debug; 398 | }; 399 | C01FCF5008A954540054247B /* Release */ = { 400 | isa = XCBuildConfiguration; 401 | baseConfigurationReference = 307D2A42123047800040C0FA /* PhoneGapBuildSettings.xcconfig */; 402 | buildSettings = { 403 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | GCC_C_LANGUAGE_STANDARD = c99; 406 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 407 | GCC_WARN_UNUSED_VARIABLE = YES; 408 | IPHONEOS_DEPLOYMENT_TARGET = 3.0; 409 | OTHER_LDFLAGS = ( 410 | "-all_load", 411 | "-Obj-C", 412 | ); 413 | PREBINDING = NO; 414 | SDKROOT = iphoneos; 415 | USER_HEADER_SEARCH_PATHS = "$(PHONEGAPLIB)/Classes/JSON $(PHONEGAPLIB)/Classes"; 416 | }; 417 | name = Release; 418 | }; 419 | /* End XCBuildConfiguration section */ 420 | 421 | /* Begin XCConfigurationList section */ 422 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloPhoneGap" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | 1D6058940D05DD3E006BFB54 /* Debug */, 426 | 1D6058950D05DD3E006BFB54 /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloPhoneGap-iPad" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | C01FCF4F08A954540054247B /* Debug */, 435 | C01FCF5008A954540054247B /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | /* End XCConfigurationList section */ 441 | }; 442 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 443 | } 444 | --------------------------------------------------------------------------------