Juce wrapper for SwiftUI project

I’m attempting to create a SwiftUI project which can access an embedded Juce static library. I have no experience using Juce but am quite familiar with SwiftUI and iOS development. I’ve exported the library successfully using Projucer but haven’t been able to get the ObjC bridging layer working.

Are there any guides available on how to achieve this or am I attempting to solve this problem from the wrong angle. I have found an old example which mixes native UI elements with Juce components GitHub - adamski/juce-native-navigation: JUCE iOS and Android project to show integration of native API's and JUCE components but have not been able to find anything specific to SwiftUI.

Thanks

@jbhydric I have fairly extensive experience with this kind of setup. If you check this repo there is an example of using a JUCE library project in an iOS Xcode project

1 Like

@adamwilson the embedded juce library appears to compile ok, but the client app is returning this error on compilation:

Undefined symbols for architecture arm64:
OBJC_CLASS$_DemoAudioEngineBindings”, referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any suggestions as to what the cause of this may be? Have tried both default and legacy build systems.

I’m seeing the same thing as you in Xcode 12. It’s been a while since I looked at this project. Looks like it’s not linking the library, but I’ve not worked out what setting is required to make that happen again. I’ll report back if I find the issue!

1 Like