Run application without GUI on iOS?

Viewed 223

I have a C++ library that I want to include into my iOS application. It has unit tests. If I put it simply, it's something like:

#include <cstdio>
int main()
{
   printf("Test result\n");
}

Is it possible to run such an application that uses only stdin/stdout on an arm64 based iOS device to make sure that all compiles and works correctly?

I can do it on a real android device with adb push/adb shell, so I wonder, is it possible to do the same on iOS based devices?

1 Answers

It's not completely clear what are you trying to archive. But let me guess:

  1. There is a third-party library you don't have control over.
  2. There're tests in this library. The tests are a separate console app.
  3. And you're looking for a way to run this app in some kind of shell on iOS that can run an arbitrary executables. And you can't because of all the security.

But if you have the source code of unit tests, then with some small changes you can compile them as a library, not as an executable. And call them from a "shell" you can write yourself - a small host app the sole purpose of which is to call these tests (and probably send their results via any kind of connection that suits you).

More on this you can read here

Yes, this host app will have a GUI, but I don't really understand why do you against it... if you really are.

Also these may be helpfull:
debug bridge for iPhone / shell command prompt
ADB equivalent for iOS device

Related