Now that my first plugin is working, I’d like to expand on it. All of my macOS and iOS Xcode projects use an Objective-C framework, TinrocketCommonLibrary, that I’ve developed over a decade. It contains code that I need to keep in framework format (mainly Metal shaders compiled by Xcode).
If I link my .framework from my plugin code, should I embed it, or does the framework need to be copied over in a build step in XOJO? Any advice on direction would be appreciated.
The framework code also refers to its bundle (e.g., [NSBundle bundleForClass:…]) when loading shaders and nibs. I’m keeping my fingers crossed that it will be able to find the runtime resources it needs.
There’s no bundle id or profile on the plugin, and the launch crash happens on both the simulator and device.
I’m not sure if XOJO is trying to load the framework as a plugin; this is all the console shows (same as my last console screenshot) — a crash at RuntimeLoadPlugin
You might want to quote William here to ask if its possible at all to copy whole Framework there or if it is only for dylib. Since the documentation is not clear on it. So you don’t waste your time on something that might not be possible.
Hi, @William_Yu—is it possible to link an iOS or macOS .framework with a plugin, and include the .framework folder/bundle in the app? This thread is documenting a crash at launch when I try to do this.
Well, that depends on how things are setup. It’s quite likely we have not setup the correct library search path for this to work if you put the framework bundle in the Frameworks directory. Have you tried copying your framework bundle, that your plugin depends on, directly inside (top-level of) your app bundle?