Contents

applicationWithURL:

Returns the shared instance representing a target application specified by the given URL.

Declaration

+ (SBApplication *) applicationWithURL:(NSURL *) url;

Parameters

  • url:

    The Universal Resource Locator (URL) locating an OSA-compliant application.

Return Value

An SBApplication subclass from which to generate a shared instance of the target application whose URL is url. Returns nil if no such application can be found or if the application does not have a scripting interface.

Discussion

For applications that declare themselves to have a dynamic scripting interface, this method will launch the application if it is not already running. This approach to initializing SBApplication objects should be used only if you know for certain the URL of the target application. In most cases, it is better to use applicationWithBundleIdentifier: which dynamically locates the target application at runtime.

This method currently supports file URLs (file:) and remote application URLs (eppc:). It checks whether a file exists at the specified path, but it does not check whether an application identified via eppc: exists.

See Also

Related Documentation

Getting a Scriptable Application Instance