Can you run iOS applications right out of the project generator or do you have to sign up for a apple developer account

Can you run ios apps in the simulator or do you have to buy the license before you can even run the project, because I get a Mach-O linker error and I don’t know where to go from here. Is there anything I have to change because I am using XCode 6? Are there any broken frameworks or something? I would love some help.

We are running into the very same issues. Searching around for any kind of recent guides to developing for iOS with openFrameworks. Memo’s example iPhone app is from 2009, so no clue how applicable it is in 2015. Let me know if you end up figuring anything out.

I have the freshest open frameworks running in Xcode 6
It does often take a bit of a wiggle, what linker errors are you getting?
are you trying the example projects?
you don’t need to have an apple developer account to develop for a tethered device or for the simulator.
have you tried running examples with a tethered device or just through the simulator? there can be architecture issues

you will probably have to do this:
Until oF 0.9 release use this function in your (place above the main function).

extern "C"{
size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d )
return fwrite(a, b, c, d);
char* strerror$UNIX2003( int errnum )
return strerror(errnum);
time_t mktime$UNIX2003(struct tm * a)
return mktime(a);
double strtod$UNIX2003(const char * a, char ** b) {
return strtod(a, b);

nb 64bit devices are another kettle of fish all together at the moment with oF

1 Like

Got the same problem, can’t build any example or the emptyExample, always got the following error:

ld: -pie can only be used when targeting iOS 4.2 or later
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also tried to add the previous function in the file, got the same error.

Any suggestion? would love to run OF on IOS

thanks in advance,

Heya, you need to change your deployment target.
So if you click on your project in xcode, then click on your target on the left hand sidebar, then you need to change the deployment target to above 4.2
There may be other places you need to do this too, so keep me posted

Hi @Miles,

thanks for the quick reply, changed the deployment target to 5.1, tried to build again but got a bunch of “Apple Match-O Linker Error” as you can see in the printscreen:

any thoughts?

Ok, tried the function you posted before in the and now it works, thanks

Yes I get this same exact error and I have looked everywhere for an answer. I have tried changing the deployment target and the I just get more errors.

Thank you all for all this fast help because now it works. One thing I was wondering was now that the target is 4.2, will it still work with all newer versions of iOS?

yeah, so the deployment target is a bottom up thing, so it’ll only work on devices with iOSs newer than the deployment target.
The base sdk (within build settings) is the SDK you’re building against, its what your code is trickling down to

glad i could help here, this is i think the first time I’ve been useful on this forum :smile:

the fix on worked!!! Thank you so much, I can finally compile