美文网首页iOS干货
iOS 应用后台保活

iOS 应用后台保活

作者: 刃之剑 | 来源:发表于2021-08-04 10:19 被阅读0次

    参考别人的思路:

    进入后台模式调用start方法,返回前台调用stop方法
    通过不断 播放一次无声音乐+申请BackgroundTask达到后台保活的效果(相对省电)

    代码:

    https://github.com/frankKiwi/FNKKeepAlive.git

    使用

     [FNKKeepAliveManager addObserver:[UIApplication sharedApplication].delegate];
    
    

    相关文章

      网友评论

        本文标题:iOS 应用后台保活

        本文链接:https://www.haomeiwen.com/subject/mbtuvltx.html