0

I want to send action from my iOS app to other app

UIApplication *ourApplication = [UIApplication sharedApplication];
NSString *URLEncodedText = @"...";
NSString *ourPath = [@"...://" stringByAppendingString:URLEncodedText];
NSURL *ourURL = [NSURL URLWithString:ourPath];
if ([ourApplication canOpenURL:ourURL]) {
    [ourApplication openURL:ourURL];   
}
else {
    //Display error
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"..." message:@"..." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alertView show];
}

Now, open second app from my app, but I want send action to second app.

Braiam
  • 1
  • 11
  • 47
  • 78
Ali Rezaei
  • 713
  • 1
  • 5
  • 7

1 Answers1

0

Apple added Actions to iOS8 to manage this kind of problems. You can check the docs here. This way you can offer "services" as Actions to another apps or, if it's your case, consume that actions offered by third party apps.

Arturo
  • 548
  • 6
  • 15