Compatabilty testing iOS & Android

Hi friends,

I need to automate login page using appium. So same code should run both iOS & Android.
So how to do? Please help on Compatibility…

Thank’Q