Several heterogeneous IoT platforms have been proposed and regularly used by enterprises and academies to support and facilitate IoT software applications development. However, IoT applications strongly depend on the functionalities supported by the specific platform used. This affects the development and portability of the developed applications that may require significant changes, or a complete re-design, for being migrated between platforms. This paper presents X-IoT, an MDE approach for developing cross-platform IoT applications. The approach implements a Domain-Specific Modelling Language (DSML) based on emerging IoT application requirements. A meta-model that incorporates the main IoT platform characteristics has been developed within the ADOxx platform, together with a graphical notation. Through the DSML, it is possible to model a platform-independent model of IoT applications that are refined and deployed on specific IoT platforms.