This repository has been archived by the owner on Dec 19, 2017. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When including libffi as a Cocoapod in a mixed platform project (like https://github.com/jasperblues/Typhoon), several header files are overwritten with ones for the other platform. The headers are
ffi.h
,fficonfig.h
, andffitarget.h
(and technicallyffi_common.h
)Since the files are only including other suffixed files I tested the approach in this pull request in my local copy and seems to work. Basically the common files are shared between the two platforms, and they include the preprocessor conditionals to include or not the suffixed headers (I haven't done it, but the same conditionals could be removed from the the rest of the headers).
For both the iOS project and the OS X project, when removing the other platform headers, the current platform header is used just fine, and no warning about missing includes is generated.
I haven't changed the scripts that seems to generate the headers, just in case you don't like the idea of having the common headers, or you want other approach.
PD: I have seen the work in ios-redo branch, but that branch doesn't have the podspec nor the pre-generated headers, that's why I did the change here. Besides, if you are going to include ARM64 (like it seems from the commits in that branch), a new set of includes will be needed.