Best practice for different code on different platforms

What is considered best practice for Cocos2D to handle code that needs to be different for each platform?

For example, let’s say I want to handle input differently on PC versus mobile platforms. How do I do it? Simply compile time decision via #ifdefs? By the way, what are the compile time macros that are activated for each platform?

Not sure about best practice, I went into the way of having wrappers : the .h is the same for all platforms, but the implementation differs, because I don’t like having too much ifdef (though they are necessary from time to time).

You can see all the define in CCPlatformConfig.h