Background task in iOS action extension

后端 未结 4 1030
不思量自难忘°
不思量自难忘° 2021-02-13 01:55

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条回答
  •  孤独总比滥情好
    2021-02-13 02:22

    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.

提交回复
热议问题