简体   繁体   English

关于实用程序应用程序的问题-iPhone SDK

[英]Question on Utility Application - iPhone SDK

I have this application I made on a utility based app. 我有我在基于实用程序的应用程序上制作的此应用程序。 How would I incorporate this app into a view based application so I can run the code from there.. Like 2 seperate projects in one. 我如何将这个应用程序合并到基于视图的应用程序中,以便可以从那里运行代码。像一个单独的2个独立项目。 I basically want to open/show the utility app in my view based application when I press a button.. Is this possible?? 我基本上想在按按钮时在基于视图的应用程序中打开/显示实用程序应用程序。这可能吗?

You want to implement a URL scheme for the app you want to launch. 您要为要启动的应用程序实施URL方案。 Then from the calling app have something like this: 然后从调用应用程序中获得以下内容:

NSURL *appUrl = [NSURL URLWithString:@"myapp://foo/bar"];
UIApplication *app = [UIApplication sharedApplication];
if ([app canOpenURL:appUrl]) {
    [app openURL:appUrl];
} else {
    // tell user they need to have this other app installed.
}

More info about how to do this here: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html 有关如何执行此操作的更多信息,请参见http : //iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM