You are here:
Package an External Client App
Determine whether to package your app or keep it local. External client apps are an excellent solution when created and used locally. However, they were designed with 2GP managed packaging in mind. Unlike connected apps, which are available by default, only packaged apps can be deployed to other orgs. Packaged apps with an OAuth plugin can be deployed with their own unique OAuth settings or they can reference the settings of the org where the app was developed.
The only difference in configuration between a local and a packaged external client app is
the Distribution State setting. If you change the value in this field from Local to Packaged, the app
can be added to a 2GP managed package. We recommend that you use a Dev Hub org to create
packageable apps. The process for packaging an external client app is no different than
creating any other 2GP managed package.
When packaging an external client app, it’s important to know that each app contains multiple files. Like the policies and settings tabs in the External Client App Manager, the configurations that define the app are divided between policies files and settings files. For added security, sensitive information isn’t packaged but remains secure on the org where it was developed. This org is known as the source org. In situations where the org that downloads the app (called the subscriber org) can’t be associated with the source org, a new global settings file can be generated when the app is deployed.
To create a 2GP managed package containing your external client app, you must use a Salesforce DX project. See Configure a Salesforce DX Project for External Client Apps.
- Configure Default Settings for a Packaged External Client App
External client apps include default values when packaged for distribution. These values show up in the policies tab on a distributed external client app and are edited by admins. If a developer configures custom values in the Settings tab of an external client app before packaging, those configurations don't affect the packaged policies. To change the policies values that are packaged with the app, configure the settings in the Package Default tab. - Considerations for Packaged External Client Apps with the Mobile, Notification, or Push Notification Plugin (Beta)
Learn the considerations for an external client app configured with the mobile, push notification, or notification plugin. - Package an External Client App That Isn't on a Dev Hub Org
To package an external client app that wasn't created on a Dev Hub org, use a namespace to connect the org to a Dev Hub org.

