Is it still possible? If so, what developer has to do to get this permission from Apple?
I see some apps use features that does not work when sandbox is enabled, to be specific, accessibility related. Some of those apps are quite new, so it is not about legacy apps.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Is there a public API that lets you query information on currently playing media and issue commands like skip forward for 15 seconds?
There is a MediaPlayer framework but it seems to only have an API for players, which are on the other end of communication.
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);
}
}];
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?
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?