Post

Replies

Boosts

Views

Activity

Audio Unit Resizable UI
Is there a standard UI resizing protocol for Audio Unit? I want my plugin's UI to be resizable by the user but can't figure out how to do this natively. All searches lead to the resizing by audio unit's intent not user's. I know I can emulate resizing by capturing mouse events and resizing the view as a reaction to them, but what about native support? I noticed that if I move cursor to AudioUnit's UI window edges in Logic and GarageBand, cursor changes to the one of resizable window, so it seems that there should be a way. Thanks in advance.
2
0
877
Jun ’20
Xcode validates Info.plist properties before substitution of user-defined variables?
Hi. If I add this property to Info.plist in my project <key>version</key> <integer>$(AU_VERSION)</integer> this Info.plist is not editable anymore, also the project cannot be built. AU_VERSION is a user-defined setting which is an integer. If I replace it with string type, Info.plist becomes loadable and project compiles fine. <key>version</key> <string>$(AU_VERSION)</string> But I need this property to be integer. This is an AudioUnit and it does not work if this property is a string. Is this a known problem? How do I solve this? And why in the world validation happen before substitution? This behaviour does not look logical to me.
0
0
578
Jun ’20
How to get the number of high-performance cores on Apple Silicon?
I have the legacy app that maintain its own thread pool to do cpu intensive work. It uses NSProcessInfo.processInfo.activeProcessorCount to get number cores and max thread pool size. It worked quite fine for Intel-based Macs but for Apple Silicon Macs it does not make much sense to create more threads than there are high-performance cores. How do I get the number of high-performance cores on Apple Silicon Macs?
2
0
1.2k
Oct ’20
NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated
How to get rid of this warning? NSToolbarItem.minSize and NSToolbarItem.maxSize methods are deprecated. I do not set minSize or maxSize, it is Interface Builder that seems to do this. Even if I create completely new interface from scratch, this warning still appears. What is the point of introducing this warning if Apple tools unable to produce correct behaviour?
8
0
4.1k
Nov ’20
-[NSWorkspace openApplicationAtURL:configuration:completionHandler:] does not work
There is a LoginItem in my app that launches the application. It works fine with approximately the following code snippet:     NSBundle* bundle = NSBundle.mainBundle;     NSWorkspace* workspace = NSWorkspace.sharedWorkspace;     NSString* path = bundle.bundlePath;     for (int i = 0; i < 4; ++i) {       path = [path stringByDeletingLastPathComponent];     }     NSDictionary* configuration = @{ NSWorkspaceLaunchConfigurationEnvironment: env };     NSError* error = nil;     [workspace launchApplicationAtURL: [NSURL fileURLWithPath: path] options: NSWorkspaceLaunchDefault configuration: configuration error: &error];     if (error) {       NSLog(@"Failed to run the app: %@", error.localizedDescription);     } Since 11.0, launchApplicationAtURL: is deprecated in favour of openApplicationAtURL:. When I try to use it instead, the application does not start at all and no error is reported. What am I doing wrong? The new code looks like this:     NSWorkspaceOpenConfiguration* configuration = [NSWorkspaceOpenConfiguration configuration];     [configuration setEnvironment: env];     [configuration setPromptsUserIfNeeded: YES];     [workspace openApplicationAtURL: [NSURL fileURLWithPath: path] configuration: configuration completionHandler:^(NSRunningApplication* app, NSError* error) {       if (error) {         NSLog(@"Failed to run the app: %@", error.localizedDescription);       }     }];
1
0
1.4k
Nov ’20