Más contenido relacionado Similar a PhoneGap_Javakuche0612 (20) PhoneGap_Javakuche06127. 1. main.m →PhoneGapDelegate
• int main(int argc, char *arv[])
2. PhoneGapDelegate.m →
• - (void)applicationDidFinishLaunching:(UIApplication
*)application
• - (void)webViewDidStartLoad:(UIWebView *)theWebView
• - (void)webViewDidFinishLoad:(UIWebView *)theWebView
• - (BOOL)webView:(UIWebView *)theWebView
shouldStartLoadWithRequest:(NSURLRequest *)request
8. PhoneGapDelegate.m
//
- (void)applicationDidFinishLaunching:(UIApplication
*)application
{
PhoneGap.plist
plist delegate
GPS (GPS )
webView
webView window
index.html webView
webView
( )
}
12. PhoneGapDelegate.m
/
- (BOOL) execute:(InvokedUrlCommand*)command
{{
//
// Fetch an instance of this class
PhoneGapCommand* obj = [self getCommandInstance:command.className];
NSString* fullMethodName = [[NSString alloc]
initWithFormat:@"%@:withDict:", command.methodName];
if ([obj respondsToSelector:NSSelectorFromString(fullMethodName)]) {
[obj performSelector:NSSelectorFromString(fullMethodName)
withObject:command.arguments
withObject:command.options];
}
}
13. PhoneGapDelegate.m
@interface InvokedUrlCommand : NSObject
{
NSString* command;
NSString* className;
NSString* methodName;
NSMutableArray* arguments;
NSMutableDictionary* options;
}
javaScript
command = DebugConsole.log
className = DebugConsole
methodName = log
arguments, options =
17. URL
• PhoneGap Wiki( )
• http://wik
i.phonegap
.com/Front
Page
• ( )
• http://agi
lmente.com
/2008/12/2
9/phonegap
%E3%81%A7j
avascripta
pi%E8%BF%B
D%E5%8A%A0
%E6%96%B9%
E6%B3%95%E
6%A6%82%E8
%A6%81%E7%
B7%A8/
• sample( )
• http://exa
mples.orei
lly.com/97
80596805791/
18. Android ...
• Android !!
•
2010/06/19 15:00 ~ 17:30 30
14
17 IT
http://atnd.org/events/5093