使用标识符启动iPhone应用程序 [英] Launch iPhone Application with Identifier
问题描述
我正在尝试在我的应用程序中启动应用程序。
例如:如果我在testApp1中按下一个按钮,它应该打开testApp2。
有没有用App Identifier做到这一点的方法??
I'm trying to Launch an application within my App.
For example: If I press a Button in my testApp1, it should Open up testApp2.
Is there any Way to do this with the App Identifier??
我听说过一个名为 launchApplicationWithIdentifier:suspend:
的无证方法,但这对我不起作用,或者我错了。
我试过这个:
[UIApplication launchApplicationWithIdentifier:@com.test.testApp2暂停:否]
但它不起作用。
I heard something about a undocumented method called launchApplicationWithIdentifier: suspend:
but that doesn't work for me, or i'm using it wrong.
I tried this:
[UIApplication launchApplicationWithIdentifier:@"com.test.testApp2" suspend:NO]
But it didn't work.
推荐答案
更好地使用 [[UIApplication sharedApplication] openUrl:]
。您需要在第二个应用程序中为此设置自定义URL方案。查看本教程或简单使用iphone自定义URL方案进行搜索。有很多很好的教程。
Better use [[UIApplication sharedApplication] openUrl:]
. You'll need set a custom URL scheme in your second app for that. Check this tutorial or simply do a search with "iphone custom URL schemes". There's a lot of good tutorials.
这篇关于使用标识符启动iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!