Android and iOS are the two dominant platforms for building mobile apps. To provide uniform and smooth user experience, app companies typically employ two teams of programmers to develop UIs (and underlying functionalities) for these two platforms, respectively. However, this development practice is costly for both development and maintenance. To reduce the cost, we take the first step in this direction by proposing an automated cross-platform GUI code generation framework. It can transfer the GUI code implementation between the two mobile platforms. Specifically, our framework takes as input the UI pages and outputs the GUI code for the target platform (e.g., Android or iOS). It contains three phases, i.e., component identification, component type mapping, and GUI code generation. It leverages image processing and deep learning classification techniques. Apart from the UI pages of an app, this framework does not require any other inputs, which makes it possible for large-scale, platform -independent code generation.