How to use ofAppNoWindow on iOS?

#1

I would like to create a window in the ofApp::setup() for some reason.
And this works well on macOS. But it doesn’t work on iOS.

Here’s my main.mm

#include "ofMain.h"
#include "ofApp.h"
#include "ofAppNoWindow.h"

//========================================================================
int main()
{
    ofAppNoWindow window;
    ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
    return ofRunApp(new ofApp);
}

And here’s a screenshot of error messages:

Is it not possible to use ofAppNoWindow on iOS?

#2

This is probably cause ofAppNoWindow.cpp is not included in the ios project file for the OF library

1 Like
#3

The file exists in OF/libs/openFrameworks/app/ofAppNoWindow.cpp.

How can I include this to iOS project file for the OF library?
I tried adding the file by dragging it into the Xcode project but lots of errors occurred.

#4

I decided to not use ofAppNoWindow on iOS.