<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScriptingBridge",
  "identifier" : "/documentation/ScriptingBridge/SBApplication/applicationWithURL:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Scripting Bridge"
    ],
    "preciseIdentifier" : "c:objc(cs)SBApplication(cm)applicationWithURL:"
  },
  "title" : "applicationWithURL:"
}
-->

# applicationWithURL:

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

```
+ (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:`](/documentation/ScriptingBridge/SBApplication/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

[`init?(url: URL)`](/documentation/ScriptingBridge/SBApplication/init(url:)-6xbe5)

Returns an instance of an `SBApplication` subclass that represents the
target application identified by the given URL.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)