-
Notifications
You must be signed in to change notification settings - Fork 193
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
ERROR: apiKey cannot be nil or empty, set apiKey with initializeApiKey: before calling logEvent #93
Comments
@ileitch sorry unfortunately no way to silence it at the moment. I will add a debug flag to guard against these warning messages in the next release. |
@ileitch can I ask you what your use case is? The error is printed when you try to call an Amplitude function before you initialize. If you only enable it for certain builds, then shouldn't you only call the function if it is enabled? |
Our app delegate contains this:
To avoid the warning we would need to put a similar condition around every point that we trigger an event, which would not be ideal. |
You can disable error messages in v3.8.1: https://github.com/amplitude/Amplitude-iOS/releases/tag/v3.8.1 |
Thanks, but I think I'd rather just live with this minor annoyance than disabling all error messages, I may silence something that's actually important. |
This error pollutes our logs for development builds because we only enable Amplitude for builds that we distribute to other people.
Is there anything we can do to silence it?
The text was updated successfully, but these errors were encountered: