# Share code across multiple platforms

DevFeed: [Share code across multiple platforms](<https://devfeed.tech/articles/share-code-across-multiple-platforms-21778.md>)

Original publisher: [Read original article](<https://enoent.fr/posts/share-code-across-multiple-platforms/>)

Author: Marc Plano-Lesay

Published: 2015-06-11T13:33:00Z

Content type: tutorial

Language: en

Sources: [Marc Plano-Lesay](<https://devfeed.tech/sources/marc-plano-lesay.md>)

Topics: [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>), [Objective-C](<https://devfeed.tech/topics/objective-c.md>), [Cordova](<https://devfeed.tech/topics/cordova.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [ios](<https://devfeed.tech/tags/ios.md>), [java](<https://devfeed.tech/tags/java.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

A tutorial on sharing application logic across multiple platforms by writing reusable C++ code and connecting it to platform-specific interfaces. It explains the trade-offs of cross-platform tools, introduces Java Native Interface (JNI), and shows how SWIG can generate wrapper code for Java integration.

## Source excerpt

When writing an application, you probably want it to run on most platforms possible. Having a game on Android is great, but what about this weird friend with his iPhone? It would be nice to be able to play with him. Of course there are cross-platforms technologies like Cordova or Titanium. But sadly, you can't achieve both a perfect user experience and great performances with this kind of tools. And even if you could: what about reusing code on the back-end? We need to share some code.