开发者

iPhone app switching

开发者 https://www.devze.com 2022-12-08 05:47 出处:网络
Is it possible to run an iPhone app from your 开发者_StackOverflow社区own app? For example when you press a button in your app, the iPhone switches to another app.

Is it possible to run an iPhone app from your 开发者_StackOverflow社区own app? For example when you press a button in your app, the iPhone switches to another app. If so, how would you do this?


Yes, but the developer of the app being switched to will have to have specified a URL protocol handler. For more information on those, look here. If it has specified a protocol handler, you can use the openURL: method to open the URL. Example (opens the Phone app and dials a number:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456789"]];

The easiest way to make sure this works is if you're the developer of the app being launched.


"You can register URL types for your application that include custom URL schemes. A custom URL scheme is a mechanism through which third-party applications can interact with each other and with the system. Through a custom URL scheme, an application can make its services available to other applications."

Implementing Custom URL Schemes

Take a look at "Registering Custom URL Schemes" and "Handling URL Requests"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号