Search code examples
iosobjective-cafnetworking

AFNetworking 3.0 view log


I used to use AFNetworkActivityLogger to print the network log, but I update AFNetworking to 3.0 recently, and AFNetworkActivityLogger not support 3.0. So how could I print log like before when I am using AFNetworking 3.0?


Solution

  • If you're using cocoapods add this line to your Podfile and run pod install

    pod 'AFNetworkActivityLogger', git: 'https://github.com/AFNetworking/AFNetworkActivityLogger.git', branch: '3_0_0'
    

    This will checkout the code from branch 3_0_0 of AFNetworkActivityLogger.

    I'd suggest you read through the migration guide because some of the methods in 2.x has been moved to other places.

    Reference: AFNetworking/AFNetworkActivityLogger#34