Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugView not working in TestFlight Builds #14182

Open
LoadingIndicator opened this issue Nov 27, 2024 · 4 comments
Open

DebugView not working in TestFlight Builds #14182

LoadingIndicator opened this issue Nov 27, 2024 · 4 comments
Assignees

Comments

@LoadingIndicator
Copy link

LoadingIndicator commented Nov 27, 2024

Description

We are experiencing the problem, that the Firebase DebugView seems to no longer be working from TestFlight builds.

The documentation states to put the -FIRDebugEnabled param into the scheme launch arguments. This works, but only when starting the app from Xcode. However, for our analytics department and QA, they work with TestFlight builds provided by the devs.

Up until now we were using the following code as a workaround to mutate the launch arguments:

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

As of this thread, this is discouraged and does no longer work: https://forums.developer.apple.com/forums/thread/767584

Therefore we were looking for other solutions and fount two similar issues:

The workaround in these issues is supposed to be this:

UserDefaults.standard.set(true, forKey: "/google/firebase/debug_mode")
UserDefaults.standard.set(true, forKey: "/google/measurement/debug_mode")

Turns out, it still did not work for us.

We tested different devices in our company and iOS 16 and 18 did not work under any circumstances. However for two colleagues with iOS 17 devices, the DebugView is still working.

Can you please help on this issue, since this effectively blocks our analytics team from approving tracking in new features.

Reproducing the issue

No response

Firebase SDK Version

11.5

Xcode Version

16.1

Installation Method

Swift Package Manager

Firebase Product(s)

Analytics, Crashlytics, Messaging

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@rizafran
Copy link
Contributor

rizafran commented Dec 2, 2024

Hi @LoadingIndicator, your issue seems intended and related to #13260. DebugView needs to run the app in a development environment with the -FIRDebugEnabled flag enabled in Xcode.

@cavaalex
Copy link

cavaalex commented Dec 3, 2024

It used to work with this workaround. It was possible to set those arguments in the AppDelegate.mm (react-native with Objective C).

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

Now it is not working anymore. Not sure it is the workaround or iOS 18 or something else that stopped working.

@LoadingIndicator
Copy link
Author

We tried this UserDefaults workaround again:

UserDefaults.standard.set(true, forKey: "/google/firebase/debug_mode")
UserDefaults.standard.set(true, forKey: "/google/measurement/debug_mode")

This workaround is actually working, but only on the second launch of the app, so apparently the first launch does not recognize the UserDefaults value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants