Background task in iOS action extension

后端 未结 4 1451
梦毁少年i
梦毁少年i 2021-02-13 02:13

I\'m working on an action extension for an app which prepares some data for the user and then uses MailCore2 to send this information to a SMTP server. Preparing data is done ve

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 02:23

    It seems like you can't schedule long running running tasks in background from an extension.Refer here(Some APIs Are Unavailable to App Extensions)

    Among the solutions you suggested,my suggestion would be to try using silent push notifications ,you can call an api at the preparing data stage,then sent a silent push from server and perform the background task when the silent push arrives.

提交回复
热议问题