How Can I open another App from my app?

我只是一个虾纸丫 提交于 2020-01-04 08:25:09

问题


I have rediATM app installed on my iphone. rediATM app is free on itunes. I want to open that app from my iphone app. I am not able to find out the way to open it.

i am using the following code to open it but it takes me to the website.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/au/app/rediatm-finder/id358936470?mt=8"]];

Please help.


回答1:


It does not work because you are opening the download link for itunes.

If you want to open another app on your iPhone with your own app, you must find out if this app provides a custom URL scheme. If they do, you could open the app using that custom URL, but otherwise not.

Here is an example how to create a custom URL scheme for your own app Launching Your iPhone App Via Custom URL Scheme and Apple's documentation: Communicating with Other Apps



来源:https://stackoverflow.com/questions/3051271/how-can-i-open-another-app-from-my-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!