gpt4 book ai didi

ios 17 interactive widget api call in background(IOS 17后台交互小部件API调用)

转载 作者:bug小助手 更新时间:2023-10-24 19:39:46 25 4
gpt4 key购买 nike



An API request is being made through the Interactive Widget in iOS 17.0. The desired situation is to request an API through the widget's Intent and receive a response from the server. (Because it is opened from Intent, the app does not open.) But a problem occurred here.

正在通过iOS 17.0中的交互小部件发出API请求。理想的情况是通过小部件的意图请求API并从服务器接收响应。(因为它是出于意图打开的,所以应用程序不会打开。)但这里出现了一个问题。


When both the main app and the widget are built, the above request works well. However, even if the build is stopped, the request is made normally if the app is in the foreground state.

当主应用程序和小部件都构建好后,上述请求就可以很好地工作。然而,即使构建停止,如果应用程序处于前台状态,请求也会正常发出。


However, when the app is in the background, API calls are not made through Intent. How can I solve this?

然而,当应用程序在后台时,API调用不是通过Intent进行的。我怎么才能解决这个问题?


Desired situation:

所需情况:


API call request through App Intent under any network condition when the app is turned off (may not be reflected separately in the widget)

APP关闭时,在任何网络条件下,通过App Intent发出的API调用请求(可能不会在微件中单独反映)


Problem Situation:

问题情况:


1. An API call through Celluar Data fails when the app is turned off

1.关闭应用程序后,通过Celluar数据进行API调用失败


What's currently working properly:

目前正在正常运行的内容:


1. Successful API call through Wi-Fi when the app is turned off

1.关闭应用时通过Wi-Fi调用接口成功


2. An API call is successful under any network conditions when the app is turned on!

2.打开APP后,任何网络条件下的API调用都成功!


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com