gpt4 book ai didi

ios - 如何使用 xcode 在 ios 上测试后台到前台?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:35:58 24 4
gpt4 key购买 nike

在阅读了您在其他帖子中关于后台/前台任务的一些评论后,我需要在我的应用程序从后台返回到前台时查看返回值。问题是当我将应用程序发送到后台(单击 iphone 上的主页按钮,或单击 XCODE 上的模拟后台获取 -> 调试)时,xcode 停止运行(包括日志)。所以,我无法继续显示 NSLog 消息。

我不知道我是否解释得很好。

最佳答案

Mine does not stop to debug, it still continues when it goes to background(clicking home button) and comes to foreground when clicked in app icon. I think this should be default setting but if its not happening in yours then try this

步骤

  1. 选择项目的目标

  2. 选择信息标签

  3. 在自定义 iOS 目标属性下,如果您可以看到名为“Application does not run in background”的键,则将其值设置为 NO,否则执行第 4 步。

  4. ADD a key= "Application does not run in background", type= "bolean", value= "NO"

  5. 运行你的项目

enter image description here

关于ios - 如何使用 xcode 在 ios 上测试后台到前台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31135686/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com