简体   繁体   English

今天的扩展程序与Main App通信

[英]Today's Extension communicate with Main App

so I am able to share data using App Groups but I was wondering if it is possible to update the data from Today's extension. 因此我可以使用App Groups共享数据,但我想知道是否可以从“今日扩展”中更新数据。

So in my iOS app I have a set of data that gets data from Firebase and updates the App group 因此,在我的iOS应用中,我有一组数据,这些数据是从Firebase获取数据并更新App group

Now my Today's extension can retrieve the App group data only if the iOS app has been opened. 现在,我的今日扩展App group只能在打开iOS应用程序的情况下才能检索App group数据。

I am trying to figure out a way to call the iOS app from Today's extension to update the data because the iOS has a method that calls Firebase which updates the App Group . 我正在尝试从Today的扩展名中找到一种方法来调用iOS应用程序以更新数据,因为iOS有一种方法可以调用Firebase来更新App Group

Is this even possible? 这有可能吗?

You can't communicate directly with your main app as you want. 您不能根据需要直接与主应用程序通信。 You can basically do two things: 您基本上可以做两件事:

  • Open your main app from your extension 从扩展程序中打开主应用程序
  • Pass data through your shared container 通过共享容器传递数据

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

相关问题 通过今天的扩展打开主应用程序 - Open main app via today extension 在Swift中的主应用程序和Today小部件/扩展之间共享UI元素 - Sharing UI elements between main App and Today widget/extension in Swift iOS - 通知今天扩展主应用程序中的核心数据更改 - iOS - Notify today extension for Core Data changes in the main app 当主应用程序未打开时,Swift 如何从今天的扩展中打开特定的视图控制器 - Swift how to open specific viewcontroller from today extension when main app is not open 应用程序组 - 今日扩展标识符 - App Group - Today Extension Identifier 在Swift中,如何将永久变量从主iOS应用传递到扩展程序(例如,今天的扩展程序,自定义键盘) - In Swift, how would I pass a permanent variable from the main iOS app to an extension (e.g. today extension, custom keyboard) Safari App Extension与包含的应用程序进行通信的方式 - Ways of Safari App Extension to communicate with containing app iOS Today Extension可以从应用程序的Info.plist中读取URL Schemes - Can iOS Today Extension read URL Schemes from app's Info.plist 在主应用程序包与其包含的框架之间进行通信 - communicate between the main app bundle and the framework it contains 将今天的扩展程序添加到flutter应用程序的问题 - Issues with adding today extension to flutter app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM