iosxcodelibffi

How do I compile libffi for iOS & macOS?


I'm trying to use libffi in one of my projects, but I can't seem to compile for iOS (or macOS, for that matter). Here is one of the various errors I've encountered while building for the iOS Simulator:

bash: src/arm/gentramp.sh: No such file or directory

Update 1: Since the question remains unanswered, I've decided to open an issue at the official repository as well.

Update 2: Question has been answered and the issue has been closed!


Solution

  • generate-darwin-source-and-headers.py and the libffi.xcodeproj need to be updated to include all currently relevant source files.

    The gentramp.sh script is not needed anymore and the current upstream xcodeproj is not up to date either with compilation settings and to be included source files for 64-bit on iOS. A patched fork can be found at https://github.com/ksjogo/libffi