Hi,
I need to develop an application that needs to call another application which is in the local host.I have already posted the same question in the stackoverflow and i got the anwer and implemented it according to it. But i did not get the ouput in the iPhone simulator.Guide me in the coding what is the mistake such that it appears while debugging as
Blockquote
Error from Debugger: Failed to lauch simulated application: iPhone Simulator failed to install the application.
#import "ModuleManagerAppDelegate.h"
@implementation ModuleManagerAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSURL *myURL = [NSURL URLWithString:@"backgroundcolor:backgroundcolor"];
[[UIApplication sharedApplication] openURL:myURL];
[window makeKeyAndVisible];
[myURL release];
}
- (void)dealloc
{
[window release];
[super dealloc];
}
@end
This is the calling application and i am calling the BackgroundColor as the called application.I have also registered BackgroundColor in the info.plist.This is my info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.xxx.backgroundcolor.xcodeproj</string>
<key>CFBundleURLSchemes</key>
<array>
<string>backgroundcolor.xcodeproj</string>
</array>
</dict>
</array>
</dict>
</plist>
This is my called application(BackgroundColor.m)
#import "BackgroundColorAppDelegate.h"
@implementation BackgroundColorAppDelegate
@synthesize window;
@synthesize Orange,Green,Yellow,Blue,Red;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after application launch
[window makeKeyAndVisible];
}
-(BOOL)application:(UIApplication *) application handleOpenURL:(NSURL *)url
{
if([[url scheme] isEqualToString:@"backgroundcolor"])
{
-(IBAction)doOrange
{
window.backgroundColor=[UIColor orangeColor];
}
-(IBAction)doBlue
{
window.backgroundColor=[UIColor blueColor];
}
-(IBAction)doGreen
{
window.backgroundColor=[UIColor greenColor];
}
-(IBAction)doRed
{
window.backgroundColor=[UIColor redColor];
}
-(IBAction)doYellow
{
window.backgroundColor=[UIColor yellowColor];
}
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end