How to debug Firebase on iOS AdHoc build

adhoc, debugging, firebase, firebase-analytics, xcode

Solution

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

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")

Problem

The only way to debug Firebase is to pass `-FIRAnalyticsDebugEnabled` on arguments passed on launch. 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. But it seems arguments aren't passed at launch when Xcode archives a build. Any solution? Thanks.

Original source