Recepe (How To): Metal-backed control (SceneKit/SpriteKit) for iOS/MacOS

Yes! Create your bridging header named e.g. YourApp-Bridging-Header.h.

Then add these flags to “Custom XCode flags” for the Debug scheme in the XCode exporter of Projucer project (I keep my source code files in a folder called Source in the project root of the JUCE project).

SWIFT_OBJC_BRIDGING_HEADER=../../Source/YourApp-Bridging-Header.h, SWIFT_VERSION=5.0, SWIFT_OPTIMIZATION_LEVEL="-Onone"

and in Release you omit the “SWIFT_OPTIMIZATION_LEVEL” flag.

EDIT: LOL, this answer was apparently your very own fix @akuz8. Source: Request - Xcode and Swift files - #10 by akuz8

1 Like