I have built my own Static C++ Library, which is built with the settings:
When you're building a library you must compile it both for the simulator and the device and then merge the two outputs (.a files) into 1 library and then link it to your iOS project.