Skip to content

Instantly share code, notes, and snippets.

  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

How to codesign openFrameworks app without Apple developer license?

When I send openFrameworks app to my frined, app does not find data folder. This is because of "translocation", known issue on openFrameworks forum. There are couple of solution to avoid translocation but here I tried different way by codesigning. But quesion is, is it possible to codesign wihout Apple Developer license? Looks like possible...?

Create Certificate

  1. Open Keychain Access.

  2. Choose Keychain Access > Certificate Assistant > Create Certificate ... cert1

  3. Enter a name

  4. Set 'Certificate Type' to 'Code Signing' cert2

compile oF app

  1. just use xcode and compile


cd to/oF/apps/myApp
sudo codesign -fs "my-new-cert"
sudo codesign -fs "my-new-cert"
sudo codesign -dv


  1. zip app with data folder
  2. send or upload app via internet
  3. open

Data folder Packaging

Do you want to put /data folder inside of the

  1. Call ofSetDataPathRoot("../Resources/data/"); function from main.cpp or ofApp.cpp
  2. Compile app with AppStore scheme
  3. Make sure you have all data in
  4. Codesign like explained above
  5. Done! Now you have codesigned, no security alarm, single package app ready to send to your friend.

Notice about timing of ofSetDataPathRoot()

I recommend to call ofSetDataPathRoot() in the very begining of main.cpp like example below.

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

int main(){
  ofRunApp(new ofApp());

If we call ofSetDataPathRoot() in ofApp::setup(), app could crash or missing data. For example you have custom class which load data in its constructor, it can not find data. This is because your constructor can be called before ofApp::setup(), hence it try to find default data path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment