Top

iOS | supress logs

Commentaires

1 commentaire

  • Patrik Spisak

    I disabled logs my way because not sure if there is API or not for this.

    In path:

    Pods/Target Support Files/RainbowSDK

    I have created file:

    RainbowSDK-prefix.pch

    Inside file I have add

    #ifdef __OBJC__

    #import <UIKit/UIKit.h>

    #else

    #ifndef FOUNDATION_EXPORT

    #if defined(__cplusplus)

    #define FOUNDATION_EXPORT extern "C"

    #else

    #define FOUNDATION_EXPORT extern

    #endif

    #endif

    #endif

    #ifndef DEBUG

        #define NSLog(...)

    #endif

    Inside Xcode, I have selected Pods, Targets: RainbowSDK -> Prefix Header Set To:

    Target Support Files/RainbowSDK/RainbowSDK-prefix.pch

    So if I run app as Release all NSLog are disabled. NSLogs should be disabled in production because they are causing performance issues.

    0
    Actions pour les commentaires Permalien

Vous devez vous connecter pour laisser un commentaire.

Vous n'avez pas trouvé ce que vous cherchez?

  • Contactez-nous

    Vous avez des questions? Laissez-nous un message pour obtenir plus d'informations.

    Contactez-nous
  • Demandez à la Communauté

    Vous avez besoin d'aide? Posez vos questions à la Communauté et obtenez des réponses d'autres utilisateurs Rainbow.

    Poster un message