I am using the below lines to transfer and open the ios app from other ios application.
NSURL *url = [[NSURL alloc]initWithString:@"test2://"];
NSMutableDictionary *tempDict = [[NSMutableDictionary alloc]init];
[tempDict setObject:@"companyURL" forKey:@"company"];
[tempDict setObject:@"https://companyURL" forKey:@"cburl"];
[tempDict setObject:@"AccessToken" forKey:@"AccessToken"];
NSDictionary *options = @{UIApplicationOpenURLOptionsAnnotationKey : tempDict};
[[UIApplication sharedApplication] openURL:url options:options completionHandler:^(BOOL success) {
if (success) {
NSLog(@"Opened url");
}}
];
The "Test2" application has opened successfully but cannot retrieve the dictionary(options) value. Please guide me.
I have referred some other blogs, They are passing the data in URL itself. But How to pass the data in options?
In the Test2 application, I am using below code to retrieve the data,
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
NSLog(@"URL %@",url);
NSLog(@"Option %@",options);
return YES;
}
It shows the only these two values in the option
Option {
UIApplicationOpenURLOptionsOpenInPlaceKey = 0;
UIApplicationOpenURLOptionsSourceApplicationKey = "com.test.testApplicaton";
}