text: Q:
  
  Can I use C++ Code in iOS or mac application?
  
  I have a code written in Ruby and I want to convert it to a library that both of my Android and iOS apps can consume. I am planning on rewriting it in C++ so that all platforms can use this library (including embedded sensors and small devices and phones)
  I know Android can consume C++ based code via NDK but can iOS devices consume a C++ library code? or do I have to convert it to Objective-C?
  
  A:
  
  Yes, C++ (and even most recent versions, like c++17) is fully supported on all popular platforms (Android, iOS/watchOS/tvOS, macOS and UWP/Windows 10). The only major thing you will have to face is so-called "glue layer" code, which has to be written separately for each platform to let your code interface with OS-native language. For Android that would be C-based Java Native Interface (JNI), for Apple OSes that would be Objective-C++ classes and MIDL/cppwinrt for UWP.
  Source: ~10 years of developing/updating/mantaining C++-based cross-platform apps.
  Please feel free to ask for specifics and I will update my answer.
  
  