Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any NDK equivalent on iOS?

Tags:

ios

I came from Android and have no idea if this can be done on iOS.

A portion of my app is written in C and C++. I have access to them so building them to another format that iOS can use will not be an issue, but I'm not allowed to expose those code. Android has NDK that allows you to build all your native code into a .so lib. Does iOS have something similar?

like image 991
user1865027 Avatar asked Feb 13 '18 18:02

user1865027


People also ask

What compiler does Android NDK use?

Code written in C/C++ can be compiled to ARM, or x86 native code (or their 64-bit variants) using the Android Native Development Kit (NDK). The NDK uses the Clang compiler to compile C/C++. GCC was included until NDK r17, but removed in r18 in 2018.

What is an NDK app?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.

What platforms are native apps available on?

Official native apps are available on popular platforms such as Android, iPhone, iPad, Kindle, OS X, Windows and Linux. Open-source clients extend this support even more widely to various other platforms, such as webOS and the BlackBerry PlayBook.

Is there a client app for iOS?

While many other operating systems have a client, iOS does not have one yet (though it is planned). The app is licensed under GPLv3 making it open source. This means that anyone can use the code and contribute.

What happens to the app when it is no longer being developed?

If/when the app is no longer developed (or if the user simply decides to no longer use the application or view/edit it on a non-supported platform), this can still be done with any plain-text editor. This is a desktop app and there are no mobile versions available.


1 Answers

Objective-C can interface to your C and C++ code directly - simply compile it along the rest of your app's code.

If you're using Swift, you can only access the C parts of your existing code directly. To use the C++ parts, you will need a (probably very thin) layer of Objective-C++ code as the glue between the two languages.

like image 173
Gereon Avatar answered Oct 23 '22 03:10

Gereon