Find Element for Android/iOS Best Practice

Hi,

I’m new to Appium, and I’m an Android/iOS developer. We contract some QA Testers to develop all the UI Tests using Robot framework + Appium. But they duplicate all the code for Android and iOS and they told to me that it’s impossible to use the same code. I can’t believe that.

I know that in Java we can use annotations to find elements in both Android/iOS.
With Robot I have this line:

Wait Until Element Is Visible ${LoginScreen.btnYes} 30

And I have this resource:

&{LoginScreen}
… btnYes=br.com.mypackage:id/btnYes

But my QA testers are duplicating all the code for iOS. I can’t believe that… How can we create some testing using the same code for Android and iOS? How can I change just the id of the elements? Can anybody just show me some documentation, article, tutorial with some Best Practices?

Thank very much