项目作者: ruanjx

项目描述 :
A category to avoid background task leak
高级语言: Objective-C
项目地址: git://github.com/ruanjx/MPIBackgroundTaskProtection.git
创建时间: 2020-05-14T02:26:12Z
项目社区:https://github.com/ruanjx/MPIBackgroundTaskProtection

开源协议:

下载


MPIBackgroundTaskProtection

How to use

Drag the UIApplication + MPIBackgroundTaskProtection category files into the your project.

Documentation

In my application, some SDKs don’t use the background task correctly, which caused a leak and was killed by the watchdog.

This category hooks three methods beginBackgroundTaskWithName:expirationHandler:, beginBackgroundTaskWithExpirationHandler:, and endBackgroundTask: to ensure that the endBackgroundTask: method is called.