私のアプリでは、Web ブラウザーで複数の URL を開きたいと考えています。
私はこれを次のようにします:
int options = NSWorkspaceLaunchWithoutActivation | NSWorkspaceLaunchWithErrorPresentation;
[[NSWorkspace sharedWorkspace] openURLs: urls
withAppBundleIdentifier: @"com.apple.safari"
options: options
additionalEventParamDescriptor: nil
launchIdentifiers: nil];
Safari は一度に 6 つの URL しか開くことができず、 を使用しているときにNSWorkspaceLaunchWithErrorPresentation
次のエラー メッセージが表示されます。
アプリケーション「Safari」が応答しないため、開くことができません。
バンドル識別子を設定するcom.google.Chrome
とさらに悪化し、4 つのタブしか開かれません。Firefox ( org.mozilla.firefox
) も 6 つのタブを開きます。