简体   繁体   English

如何从扩展程序中打开iOS应用程序?

[英]How to open iOS app from within extension?

My app is registered for URL Schemes: 我的应用程序已注册URL方案:

在此输入图像描述

But I have no idea how to open that app, since I cannot use UIApplication.sharedApplication() in extension. 但我不知道如何打开该应用程序,因为我不能在扩展中使用UIApplication.sharedApplication() Is it possible at all? 有可能吗?

Apple's documentation says: Apple的文档说:

A Today widget (and no other app extension type) can ask the system to open its containing app by calling the openURL:completionHandler: method of the NSExtensionContext class. “今日”窗口小部件(并且没有其他应用程序扩展类型)可以通过调用NSExtensionContext类的openURL:completionHandler:方法来要求系统打开其包含的应用程序。

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

相关问题 如何在iOS App中打开Excel文件 - How to open an excel file from within an iOS App 如何在iOS 6+的邮件应用程序中注册我的iOS应用程序以打开zip文件? - How do I register my iOS app to open zip files from within the mail app in iOS 6+? iOS:从同一应用程序中打开注册的打开URL - iOS: Open a registered open URL from within the same app 如何使用Swift在我的应用程序的“今日扩展”中的Safari中打开url - How to open a url in Safari from my Today Extension within my app using Swift 如何打开我的 SwiftUI 应用程序并使用 Siri Intent Extension 中的 NSUseractivity 执行功能? - How can I open my SwiftUI app and perform a function using NSUseractivity from within Siri Intent Extension? 有什么方法可以从容器应用程序中打开iMessage扩展? - Is there are way to open an iMessage extension from within the container app? 从我的应用程序中的“今日扩展”(窗口小部件)打开Safari - Open Safari from my Today Extension (widget) within my app 在我的iOS应用程序中从Safari打开具有特定扩展名的文件 - Open file with specific extension from Safari in my iOS app 从iOS Safari共享扩展打开主应用 - Open the main app from a iOS Safari Share Extension 如何从iMessage扩展程序打开托管应用程序? - How to open the hosting app from an iMessage extension?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM