此工具是苹果私有的Debug 调试工具,idea 来自链接
警告 此工具仅限于 Debug 阶段使用,在上线时最好移除,因为可能调用私有API而导致审核无法通过.
- 添加 AppleDebugTool 到项目中
- 在 Appdelegate的didFinishLaunchingWithOptions中添加
AppleDebugTool.shared.show()
AppleDebugTool.shared.debugToolsPos = .topLeft
- 在 Appdelegate 中添加方法:
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
let location = ((event?.allTouches! as NSSet!).anyObject() as? UITouch)?.location(in: self.window)
if UIApplication.shared.statusBarFrame.contains(location!) {
AppleDebugTool.shared.debugBtnTapped()
}
}
- 17.05.28 -- first commit
- Cocoapods 支持
- 移除 touchBegan方法,让使用更加简单
AppleDebugTool is available under the MIT license. See the LICENSE file for more info.
