Description
With the new changes in e1577df and 59407f3, header references have been changed from quotes to angle brackets. While this may work in an Obj-C project, it causes several compilation errors for swift projects.
Previously to 0.40
, you could create a new swift project and perform the following steps to compile successfully:
- add the
-all_load
and-lc++
linker flags - add react native dir (recursively) to
Header Search Paths
- setup your bridging header
Full steps for swift setup details can be seen here.
Now according to the summary in update 59407f3:
$(BUILT_PRODUCTS_DIR)/include, which is added to the include path by Xcode by default
The above statement implies that customizing Header Search Paths
is no longer necessary, but is this true for Swift? In fact it seems there's no longer any straightforward way for Swift projects to find these angle bracket headers when libraries are included directly in the project (not using cocoapods), similar to what has been detailed on stack overflow. In addition to Header Search Paths
, I've tried User Header Search Paths
and setting Always Search User Paths
to Yes
. No combination thus far yields successful compilation, instead throwing these errors:
Why is this change being made? I've been using swift with RN successfully since the very beginning, and now there is risk of not being able to upgrade without jumping through hoops (i.e. npm post install scripts to rewrite headers). Please don't introduce such a breaking change unless there's a verified way of supporting swift!