Coder Social home page Coder Social logo

Comments (5)

djih avatar djih commented on August 20, 2024

@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.

from amplitude-ios.

djih avatar djih commented on August 20, 2024

@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?

from amplitude-ios.

ileitch avatar ileitch commented on August 20, 2024

Our app delegate contains this:

- (void)configureAmplitude {
    NSString *apiKey;

#ifdef RELEASE_SCHEME
    apiKey = @"...";
#elif defined(ADHOC_ALPHA_SCHEME) || defined(ADHOC_BETA_SCHEME)
    apiKey = @"...";
#else
    // Uncomment to test Amplitude with debug builds.
    // apiKey = @"...";
#endif

    if (apiKey) {
        [[Amplitude instance] initializeApiKey:apiKey];
    }
}

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.

from amplitude-ios.

djih avatar djih commented on August 20, 2024

You can disable error messages in v3.8.1: https://github.com/amplitude/Amplitude-iOS/releases/tag/v3.8.1

from amplitude-ios.

ileitch avatar ileitch commented on August 20, 2024

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.

from amplitude-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.