2015-04-23 127 views
0

我想從我的iOS應用程序從我的應用程序發送動作到其他應用如何從我的應用程序發送操作到其他應用程序?

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]; 
} 

現在,打開第二個應用程序,但我想送行動,第二個應用程序。

+0

我不明白。請詳細解釋。 – user3182143

+0

我想運行你的第二個應用程序的方法是可能的? –

+0

傳遞iTunes網址的第一個應用程序。它會工作。 – user3182143

回答

0

Apple向iOS8添加了操作來管理這類問題。您可以查看文檔here。 通過這種方式,您可以將「服務」作爲Actions提供給其他應用程序,或者,如果是您的情況,則可以使用由第三方應用程序提供的操作。

+0

謝謝你的回答 –

+0

我想運行你的第二個應用程序的方法 是可能的嗎? –

相關問題