Skip to content

Commit

Permalink
Make sure to include <TargetConditionals.h> in combined Swift bridgin…
Browse files Browse the repository at this point in the history
…g headers, otherwise it may fail in C++
  • Loading branch information
megastep committed Apr 11, 2019
1 parent c0dab26 commit 93c9529
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Frameworks/build_frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ create_universal_framework()
# Swift 5 / Xcode 10.2 bug (!?) - must combine the generated AudioKit-Swift.h headers
for fw in ${PROJECT_NAME} ${PROJECT_UI_NAME};
do
echo '#if TARGET_OS_SIMULATOR' > "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
echo '#include <TargetConditionals.h>' > "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
echo '#if TARGET_OS_SIMULATOR' >> "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
cat "${BUILD_DIR}/${CONFIGURATION}-$2/${fw}.framework/Headers/${fw}-Swift.h" >> "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
echo '#else' >> "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
cat "${BUILD_DIR}/${CONFIGURATION}-$3/${fw}.framework/Headers/${fw}-Swift.h" >> "${DIR}/${fw}.framework/Headers/${fw}-Swift.h"
Expand Down

0 comments on commit 93c9529

Please sign in to comment.