從另一個內部啟動應用程序(IPhone)是否有可能從另一個應用程序中啟動任意的iPhone應用程序?例如 在我的應用程序中,如果我希望用戶按下一個按鈕并直接進入手機應用程序(關閉當前的應用程序,打開手機應用程序).這有可能嗎?我知道這可以用來打電話與電話的網址鏈接,但我想讓手機應用程序的啟動,而不撥任何具體的號碼。
3 回答

波斯汪
TA貢獻1811條經驗 獲得超4個贊
FirstApp
SecondApp
在第二應用程序中 轉到第二個應用程序的plist文件,您需要添加一個 URL方案用繩子 iOSDevTips(當然,你可以寫另一個字符串,這取決于你自己)。
- (void)buttonPressed:(UIButton *)button{ NSString *customURL = @"iOSDevTips://"; if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:customURL]]) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]]; } else { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"URL error" message:[NSString stringWithFormat:@"No custom URL defined for %@", customURL] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; }}
- 3 回答
- 0 關注
- 577 瀏覽
添加回答
舉報
0/150
提交
取消