Skip to content

[IOS] [FirebaseAnalytics][I-ACS013000] Screen parameter value must be of type NSString: (nil) #175

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

Open
edshkliaruk opened this issue Jan 25, 2024 · 2 comments

Comments

@edshkliaruk
Copy link

edshkliaruk commented Jan 25, 2024

Describe the bug
I faced with an issue related to

FirebaseAnalytics.setScreenName({
  screenName: 'The screen name',
});

What I see in logs

10.15.0 - [FirebaseAnalytics][I-ACS013000] Screen parameter value must be of type NSString: (nil)
10.15.0 - [FirebaseAnalytics][I-ACS031028] Received invalid class for screen: (nil)

To Reproduce
Steps to reproduce the behavior:

  1. Run setScreenName method with some string value
  2. You won't see an error in your app but you will see this error in Xcode logs. And, eventually you won't receive screen_view event.

Expected behavior
The library shouldn't have this error.

Screenshots
Screenshot 2024-01-25 at 16 18 47

Smartphone (please complete the following information):

  • Device: iPhone 12 Pro
  • OS: 17.2.1

Additional context
Android handles this without any errors.

Also, I had a chance to debug this a little bit and maybe it will be useful:
I removed nameOverride to check if it can resolve the issue.
Screenshot 2024-01-25 at 16 35 43

@Sulorb
Copy link

Sulorb commented Mar 16, 2024

Same problem here. Tried to downgrade to this plugin in 4.0 and pod install and got the same result.

If someone can help us 🙏

@thoechtl
Copy link

@Sulorb You can simply provide a nameOverride param to fix the issue. This overrides the screen class name, which is not really useful in a Capacitor app anyway ...

FirebaseAnalytics.setScreenName({ // Sets screen name and logs screen view event.
  screenName: 'My screen',
  nameOverride: 'App' // Provide dummy screen class name to fix `nil` error on iOS.
});

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

No branches or pull requests

3 participants