如何从我的应用程序打开另一个应用程序? [英] How Can I open another App from my app?

查看:104
本文介绍了如何从我的应用程序打开另一个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的iPhone上安装了rediATM应用程序.rediATM应用程序在iTunes上免费.我想从我的iPhone应用程序中打开该应用程序.我无法找到打开它的方法.

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

请帮助.

推荐答案

它不起作用,因为您正在打开iTunes的下载链接.

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

如果要使用自己的应用程序在iPhone上打开另一个应用程序,则必须确定该应用程序是否提供自定义URL方案.如果这样做,则可以使用该自定义URL打开应用程序,否则不能打开.

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.

这里是一个示例,说明如何为您自己的应用程序创建自定义URL方案

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

这篇关于如何从我的应用程序打开另一个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆