进入后台时加载另一个应用程序

发布于 2024-11-14 17:13:52 字数 458 浏览 3 评论 0原文

当第一个应用程序进入后台时是否可以加载另一个应用程序?

假设我安装了应用程序 1 和应用程序 2。 当应用程序1进入后台时,调用该方法来调用应用程序2的加载,但应用程序2从未被加载。

苹果可能不允许这种事情发生吗?

我 100% 确信我正在使用的自定义 URL 方案能够被调用,因为我已经在 MobileSafari 中完成了测试以确保它们有效。

应该指出的是,这是针对 iPad 应用程序而不是 iPhone 应用程序。尽管如此,我认为在这个问题上两者之间应该没有太大区别......

编辑

让我解释一下。应用程序本身是为了特定目的。我们想要做的是允许我们的客户设置一个设置,允许应用程序通过另一个已安装的应用程序“反弹”回来。 我们希望限制应用程序的用户只能使用相关应用程序。这是因为使用此应用程序的 iPad 只会使用此应用程序。这就是为什么我们要尽可能地锁定它。

Is it possible to load up another application when the first application enters the background?

Say I have application 1 and application 2 installed.
When application 1 enters the background, the method is called to invoke the loading of application 2, but application 2 is never loaded.

Is it possible that Apple have disallowed this sort of thing?

I am 100% sure that the custom URL schemes I'm using are able to be called as I have done testing within MobileSafari to make sure they work.

Should mention this is for an iPad application and not iPhone application. Albeit, I don't think there should be much difference between the two when it comes to this issue...

EDIT

Let me explain. The application itself is for a specific purpose. What we want to do is allow our clients to set a setting that will allow the application to "bounce" back via another installed application.
We want to limit the users of the application to only be able to use the application in question. This is due to the fact that the iPad's using this application will ONLY be using this application. Hence why we want to lock it down as best we can.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

各自安好 2024-11-21 17:13:52

这是行不通的,因为应用程序只能让系统在前台打开 URL 方案。可以这样想,如果您的应用程序不在前台,它是否可以呈现一个模态视图,例如 UIAlertView 或简单的模态视图控制器?

此外,您将严重违反人机界面指南,并且很可能会被拒绝。 URL 方案,尤其是自定义方案,仅应在用户提示时调用。

This will not work, simply because the application can only have the system open URL schemes while in the foreground. Think of it like this, if your application is not in the foreground can it, say, present a modal view such as a UIAlertView or a simple Modal View Controller?

Also, you would be horribly breaking Human Interface Guidelines and would most likely be rejected. URL schemes, especially custom ones, should only be called when the user prompts.

悲喜皆因你 2024-11-21 17:13:52

在我看来,你想要一个锁定/信息亭 iOS 系统。根本没有办法做到这一点,并使其按照他们想要的方式工作,而不突破苹果的沙箱。越狱。或者,将一个应用程序写成两半。前半部分带有身份验证或其他内容,然后是安全的一半。也许我们需要更多上下文,但正如您所描述的,URL 方案非常容易被规避或完全失败。当他们删除 goto 应用程序时会发生什么?

Sounds to me like you want a lockdown/kiosk iOS system. There's simply no way to do this and make it work like they want without breaking out of apple's sandbox. Jail breaking. Or, write one application with two halves. The initial half with authentication or whatever, then the secured half. Maybe we need more context, but as you describe it, URL schemes are incredibly easy to circumvent or fail altogether. What happens when they just delete the goto app?

一身软味 2024-11-21 17:13:52

现在你为什么要这么做? 假设用户接到电话并且他继续接听。他绝对不想在这之间去使用另一个应用程序。考虑到其他情况, 他实际上会离开您的应用程序,转到他想要关注的另一个应用程序,而不会在中间被带到另一个应用程序。

Now why would you do that? Say the user is getting a call and he proceeds to take it. He definitely wouldn't want to go to another app in between. Other case considered, he would actually leave your app to go to another app he wants to attend to without being taken to another app in between.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文