我能否以某种方式在 iOS 上发送带有推送通知的整个文件,或向设备发送通知以从服务器下载文件。
设备需要在没有用户交互的情况下自行完成此操作,我需要它在不更新商店中的应用程序的情况下工作。
那有可能吗?如果没有,欢迎提出任何建议/替代方案。
最佳答案
Can I somehow send a whole file with a push notification on iOS
虽然您可以序列化您的文件并发送它,但推送通知是 limited to 2kB .
or send a notification to a device to download a file from a server.
您可以使用 "Remote notifications" background mode 来完成.
The device NEEDS to do that on it's OWN, without user interaction
除非您的用户手动终止您的应用,否则之前的选项将起作用。
I need it to work without updating the app in the store.
您将需要更新您的应用。至少要打开“远程通知”后台模式并处理传入的数据。
编辑:
不要忘记推送通知不可靠!
推送通知可能会延迟甚至永远不会分发。这就是为什么您应该永远依靠它来完成任何关键工作。
关于ios - iOS通知可以推送文件吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32971727/