Make the core feature of your app a library, then write different interfaces according to the targeted platforms.