The best way is to use the preprocessor.
iPhone related codes
Android code here
if (Application.platform == RuntimePlatform.Android
print ("Android related functions");
else if(Application.platform == RuntimePlatform.IPhonePlayer)
print("iPhone related functions only");
What are the differences between Cocoa and Cocoa Touch?
some key concepts for an iPhone developer to learn as a fresher
What are best practices that you use when developing projects in Objective-C ?