Sandbox Security: Disable library validation

Apparently, this was preventing some signed plugins from being loaded
into the process, preventing their use as MIDI plugins. And this may be
needed for future AudioUnit DSP filter support, for third party plugins
there, as well.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-28 01:45:00 -07:00
parent 25cd57a3cb
commit f4a382c67f
2 changed files with 2 additions and 54 deletions

View file

@ -4,6 +4,8 @@
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>

View file

@ -1,54 +0,0 @@
//
// MIDIPane.m
// General
//
// Created by Christopher Snowhill on 10/15/13.
//
//
#import "MIDIPane.h"
#import "SandboxBroker.h"
#import "AppController.h"
@implementation MIDIPane
- (NSString *)title {
return NSLocalizedPrefString(@"Synthesis");
}
- (NSImage *)icon {
if(@available(macOS 11.0, *))
return [NSImage imageWithSystemSymbolName:@"pianokeys" accessibilityDescription:nil];
return [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForImageResource:@"midi"]];
}
- (IBAction)setSoundFont:(id)sender {
NSArray *fileTypes = @[@"sf2", @"sf2pack", @"sflist", @"sf3"];
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:NO];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles:YES];
[panel setFloatingPanel:YES];
[panel setAllowedFileTypes:fileTypes];
NSString *oldPath = [[NSUserDefaults standardUserDefaults] stringForKey:@"soundFontPath"];
if(oldPath != nil)
[panel setDirectoryURL:[NSURL fileURLWithPath:oldPath]];
NSInteger result = [panel runModal];
if(result == NSModalResponseOK) {
[[NSUserDefaults standardUserDefaults] setValue:[[panel URL] path] forKey:@"soundFontPath"];
id sandboxBrokerClass = NSClassFromString(@"SandboxBroker");
NSURL *pathUrl = [panel URL];
if(![[sandboxBrokerClass sharedSandboxBroker] areAllPathsSafe:@[pathUrl]]) {
id appControllerClass = NSClassFromString(@"AppController");
[appControllerClass globalShowPathSuggester];
}
}
}
- (IBAction)setMidiPlugin:(id)sender {
}
@end