如何在iOS AdHoc版本上调试Firebase [英] How to debug Firebase on iOS AdHoc build

查看:282
本文介绍了如何在iOS AdHoc版本上调试Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调试Firebase的唯一方法是在启动时传递的参数上传递 -FIRAnalyticsDebugEnabled

The only way to debug Firebase is to pass -FIRAnalyticsDebugEnabled on arguments passed on launch.

它可以在调试模式下连接我的iOS设备,但我想部署一个AdHoc版本,以便质量检查人员可以在不使用Xcode的情况下对其进行测试。

It's working in debug mode with my iOS device connected but I would like to deploy an AdHoc build so QA can test it without Xcode.

但是,似乎Xcode归档构建时启动时并没有传递参数。

But it seems arguments aren't passed at launch when Xcode archives a build.

任何解决方案?谢谢。

Any solution? Thanks.

推荐答案

我找到了此解决方案,请在您的应用程序中尝试:didFinishLaunchingWithOptions:或覆盖AppDelegate的init:

I found hack solution for this, try it in your application:didFinishLaunchingWithOptions: or override AppDelegate’s init:

Objective-C:

Objective-C:

NSMutableArray *newArguments = [NSMutableArray arrayWithArray:[[NSProcessInfo processInfo] arguments]];
[newArguments addObject:@"-FIRDebugEnabled"];
[[NSProcessInfo processInfo] setValue:[newArguments copy] forKey:@"arguments"];

Swift:

var newArguments = ProcessInfo.processInfo.arguments
newArguments.append("-FIRDebugEnabled")
ProcessInfo.processInfo.setValue(newArguments, forKey: "arguments")

这篇关于如何在iOS AdHoc版本上调试Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆