For a cross-platform project on iOS, Android and Windows I originally wrote some underlying classes in C++. From what I understand however, I will have to write an objective-C wrapper to allow the swift iPhone project to work in xcode. Would it make more sense then that I simply rewrite all of the original framework in C or would simply wrapping it in C be a better solution. No problem either way just attempting to determine the best way to keep the code valid.
Also telling me to use a cross-platform mobile development SDK is not helpful.
Different languages for different apps For native mobile app development, use a language that works with iOS and Android operating systems. Some popular languages for this type of development include Objective-C, Swift, and Java.
C/C++ is considered a cross-platform language, but great care must be taken to ensure that the source code is indeed cross-platform, using only C/C++ supported by all target compilers and containing little or no conditionally-included platform or compiler-specific code.
I would recommend writing in C++ 11. It's more modern, has more support online, and you can even compile everything with Cmake. There are many tools out there to help you with this. My company is using this to develop a framework that compiles on the following platforms:
iOS, Mac OS X, Android (ARM, x86, x64), Windows (x86, x64), Linux (x86, x64)
You can also find a tool here to help you with cross platform toolchains, so that code you compile is easily ready for multiple platforms: https://github.com/ruslo/polly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With