Application homepage: www.kaleidescape.com
iTunes link: http://itunes.apple.com/us/app/kaleidescape/id381807669
HTML Link example: kscape://
Native application URL string example: kscape://
Extended example: To open the Kaleidescape app, simply open the URL kscape://. For example, use this coding method. [UIApplication sharedApplication] openURL:[NSURL URLWithString:@"kscape://"]]; To open the Kaleidescape app and enable the user to easily return to your controller app from the Kaleidescape app, use the URL address with launchApp and a query. For example, if your app is called “Acme Controller App” and its URL scheme is “acme”, use this URL. kscape://launchApp?callerName=Acme%20Controller%20App&returnURL=acme%3A%2F%2F You could launch the Kaleidescape app with this coding method. NSString* launchUrlStr = @"kscape://launchApp?callerName=Acme%20Controller%20App&returnURL=acme%3A%2F%2F"; ; You can supply any URL for returnURL, so you can pass state information back to your app (in case iOS shuts it down while suspended), for example, “acme://?view=MainScreen”. Listed below is a sample iOS method to launch the Kaleidescape app. You pass it ordinary strings containing the caller name and the return URL, and it takes care of properly escaping them and embedding them into the URL used for launching the Kaleidescape app. Sample Method - (void)launchKaleidescapeAppWithCallerName:(NSString*)callerName returnURL:(NSString*)returnURL { NSString* rfc3986EscapeChars = @":/?#[]@!$&'()*+,;="; NSString* escapedName = (NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, (CFStringRef)callerName, NULL, (CFStringRef)rfc3986EscapeChars, kCFStringEncodingUTF8); NSString* escapedURL = (NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, (CFStringRef)returnURL, NULL, (CFStringRef)rfc3986EscapeChars, kCFStringEncodingUTF8); NSString* urlString = [NSString stringWithFormat: @"kscape://launchApp?callerName=%@&returnURL=%@", escapedName, escapedURL]; [escapedName release]; [escapedURL release]; // Open URL to launch the app NSURL* kscapeURL = [NSURL URLWithString:urlString]; [[UIApplication sharedApplication] openURL:kscapeURL]; } This code illustrates a few points about the URL format. • URL format uses URL specification as defined in RFC 3986, (http://tools.ietf.org/html/rfc3986). • Characters should be UTF-8 encoded. For the Acme Controller App example, you could launch the Kaleidescape app and provide your return information with this method. [self launchKaleidescapeAppWithCallerName:@"Acme Controller App" returnURL:@"acme://?view=MainScreen"];
Tags: kscape