Ok, here are the codes:
ApplicationDelegate class
the property is declared as follows:
Code:
AppInvocationData *appInvocationData;
@property (nonatomic, retain) AppInvocationData *appInvocationData;
Code:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
if ([[url scheme] isEqualToString:@"myUrlScheme"]) {
NSString *urlString = [url scheme];
AppInvocationData *invData = [[AppInvocationData alloc] initWithParameters:urlString];
self.appInvocationData = invData;
[invData release];
return YES;
}
return NO;
}
In the view I handle the data as follows in the viewDidLoad method:
Code:
IPhoneClientAppDelegate *appDelegate = (IPhoneClientAppDelegate *) [[UIApplication sharedApplication] delegate];
AppInvocationData *appInvData = appDelegate.appInvocationData;
if (appInvData) {
//TODO -site
self.txtMeetingUserName.text = appInvData.userName;
self.txtMeetingId.text = appInvData.meetingId;
self.txtMeetingPass.text = appInvData.meetingPassword;
}
When I do something like this:
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
//test
NSString *testString = @"myUrlScheme://url_here_...";
NSURL *url = [NSURL URLWithString:testString];
[self application:application handleOpenURL:url];
//test
eventOperationQueue = [[NSOperationQueue alloc] init];
[window addSubview:mainNavigationController.view];
[window setAutoresizesSubviews:YES];
[window makeKeyAndVisible];
}
everything is beeing processed correctly.
I'm sure that the url link i processed in the application: handleOpenURL method because when i place [application terminateWithSuccess] code there the app quits.