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

# init(bundleIdentifier:)

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

```
init?(bundleIdentifier ident: String)
```

## Parameters

`ident`

A bundle identifier specifying an application that is
OSA-compliant.

## Return Value

An initialized shared instance of an `SBApplication` subclass
that represents a target application with the bundle identifier of `ident`.
Returns `nil` if no such application can be found or if the application does
not have a scripting interface.

## Discussion

If you must initialize an `SBApplication` object explictly, you should use
this initializer if possible; unlike
[`init(processIdentifier:)`](/documentation/ScriptingBridge/SBApplication/init(processIdentifier:)) and
[`init(url:)`](/documentation/ScriptingBridge/SBApplication/init(url:)-6xbe5), this method is not dependent on changeable
factors such as the target application’s path or process ID. Even so, you
should rarely have to initialize an `SBApplication` object yourself;
instead, you should initialize an application-specific subclass such as
`iTunesApplication`.

Note that this method does not check whether an application with the given
bundle identifier actually exists.

## See Also

[`applicationWithBundleIdentifier:`](/documentation/ScriptingBridge/SBApplication/applicationWithBundleIdentifier:)

Returns the shared instance representing the target application specified by
its bundle identifier.



---

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)