FR: Dynamic Framework option for Dynamic Library projects (mac/iOS)

It would be very useful to be able to generate the equivalent of a “Cocoa Touch Framework” project from Projucer for iOS and macOS. In fact on iOS, there is little point in generating a dylib as it will not be accepted by Apple; it has to be wrapped and signed as a Dynamic Framework.

I’m not sure whether this should be the default for Dynamic Library projects targeting macOS and iOS, or if it should be separate project type, or somehow made optional, but its something I’m going to need soon and I’ve started making some notes for a potential PR on Projucer for this.

Yes, please add a check box for dynamic library projects that will generate a framework target (instead of dylib) with the Xcode exporter. The dylib format is just not compliant with macOS requirements.

It should not be too difficult. I’m currently adding the framework target in Xcode by hand and copy/paste all build settings, but the hassle of checking all files to make them belong to the new target is extremely cumbersome.

1 Like

+1
It would be of great benefit to have a “macOS/iOS framework”-target in Projucer for using JUCE as the AudioEngine for a SwiftUI project.
The process of “translating” a dylib project to a framework is quite time-consuming and complicated - you don’t want to do this several times…
@adamwilson and @ans: Did you maybe find a quicker way to do this?

Yes. With CMake ! You can create a “Cocoa Touch Framework” from a CMake project.

1 Like

Ah, that sounds great! Thanks. Is there any documentation available or did you figure this out yourself?

I found this: https://cmake.org/cmake/help/latest/prop_tgt/FRAMEWORK.html
Very helpful hint, thank you again @adamwilson

1 Like