A look at current tools available to build mobile apps that run on multiple platforms using a common code base with emphasis on Titanium, PhoneGap and HTML5.
95. gap://CommandHandler.method?arg1Name=arg1Value &arg2Name=arg2Value gap:// - This tells PhoneGAP that this is a command CommandHandler. - The command handler defines the functionality – I.e Location method- The method is a member of the commandhandlerabove ?arg1Name=ar... - These are the arguments, encoded much like a URL utilising GET
98. Extending PhoneGap - 2 .m file @implementation Argcounter -(void) numOfArgs:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options{ NSUIntegerargc = [arguments count]; /* No arguments to work with */ if( argc <2 ) return; /* Loop through all the arguments in the NSMutableArray */ for(inti=0; i < argc; i++){ NSLog(@"%i - %s", i, [arguments objectAtIndex:i]); }/* Simply inject a javascript alert() back into the UIWebView */ [super writeJavascript:[NSStringinitWithFormat:@"alert('%i');", argc]]; } @end