So I was able to sort it out, there was a run script phase on the xcode project that was causing the problem, after removing it I was able to compile the iOS project and to use AFNetworking from Swift classes.
However when I import AFNetworking in a kotlin class
import cocoapods.AFNetworking
the compiler marks AFNetworking as an unresolved reference, what am I missing?