【问题标题】:How to debug Flutter notifications opening on iOS > 14如何调试在 iOS > 14 上打开的 Flutter 通知
【发布时间】:2021-01-15 10:48:20
【问题描述】:

自 iOS 14.0 起,Flutter 应用不能为 relaunched in debug mode

那么在实现firebase_messaging 方法时如何获取一些日志?

运行flutter run --release 隐藏终端的日志。那你怎么办?

【问题讨论】:

    标签: ios flutter logging ios14


    【解决方案1】:

    所以我找到了一种缓慢的方法:

    1. 使用flutter run --release 运行应用程序
    2. 检查某些日志是否显示在 macOS console 应用程序中(使用“Flutter”、“Runner”或您想要的任何字符串过滤日志)
    3. 然后关闭应用,接收通知
    4. 出现日志

    使用此解决方案,您无法热重新加载应用程序,您必须重新构建它。我的测试需要 300 万。不是最佳的,但至少我有一些日志。

    【讨论】:

      【解决方案2】:

      你可以试试

      flutter run -d 'device_id' --profile
      

      这将以类似于发布模式的配置文件模式运行您的应用,并在控制台中提供日志。

      【讨论】:

        猜你喜欢
        • 2021-04-17
        • 2021-11-28
        • 2022-06-17
        • 1970-01-01
        • 1970-01-01
        • 2022-08-03
        • 2018-07-27
        • 1970-01-01
        • 2020-05-26
        相关资源
        最近更新 更多