Welcome to OpenFin Docs

Explore our guides, resources and references for building with OpenFin

Get Started

Starting a Platform and Launching Content

🚧

Requirements

  • OpenFin CLI installed
  • OpenFin Runtime 15.80.49.30+
  • Windows Operating System | Mac not fully supported and may result in unexpected behavior

Introduction

Platforms and Platform content can be launched both programmatically and via a Platform manifest. The following sections explain the mechanisms that allow Application Providers to start a Platform and launch content into that Platform are explained in the following sections. As a best practice, any windows necessary for the platform to run correctly should be opened in a custom Platform Provider rather than in a snapshot on the Platform manifest.

📘

Note

This topic is written for runtime version 16.83.51.x or later.

Starting a Platform

Manifest configuration

Let's take a closer look at the Platform manifest configuration that we covered in Launching a Platform.

To launch the Platform, use a manifest that has a top-level platform object instead of a startup_app object. This configuration object lets you define any OpenFin application options as well as additional platform-level options such as defaultWindowOptions and defaultViewOptions. For examples and more details, see the Manifest JSON structure section.

Once a manifest has been created and hosted, that manifest can be targeted by a shortcut on the user’s desktop, by using one of the following methods:

For more details on deploying OpenFin applications, see the Deploying Applications section.

A snapshot can optionally be added as a top-level property of the Platform manifest. This snapshot automatically launches along with the Platform subject to exceptions explained in the sections below. If a Platform manifest is launched without a snapshot property, it launches only the Platform Provider.

fin.Platform.start()

A Platform can also be launched without a manifest by using fin.Platform.start(). Any options that you might include in a Platform manifest in the top-level platform object can be included as an argument to start() in the PlatformOptions.

A snapshot could be included as a top-level property in this call, or you could await the start call. When the promise resolves, content can then be launched into the Platform either via manifest or programmatically via various Platform methods such as applySnapshot().

Launching Content

The following sections explain the various ways content can be launched.

Launching content via the manifest

Content can be launched via manifest by calling the launchContentManifest() method on a wrapped Platform instance. If the manifest to be launched contains a snapshot object, that snapshot is launched.

If you are launching a legacy manifest without a snapshot, the startup_app is launched as a single View in the Layout of a new OpenFin Window.

❗️

Warning

Warning: the runtime version, any runtime arguments, and some application level options in the legacy manifest are ignored or are not applicable. Please see the Migrating Existing Apps to Platforms topic for more information about migrating legacy applications to Platforms.

API calls

Content can be launched into a running Platform without a manifest using a wrapped Platform instance using the following methods:

Appropriate methods are referenced in the Getting Started section.

Deep Linking (fin: or fins: link)

The RVM permits deep linking to an OpenFin application from anywhere that can invoke a “link” like a browser, email client, or another OpenFin application. The RVM uses a custom protocol handler to invoke an application, if not already running, and pass context to a specific location within an OpenFin application via a uniform resource identifier (URI).

You can use a fins: link to both start a platform and to launch content into a platform. A link that targets a single Platform manifest starts the Platform, if the Platform is not already running, and launches a snapshot into the Platform, if present in the manifest.

You can also designate a separate content manifest to be launched into the Platform by targeting the Platform manifest and adding an $$appManifestUrl parameter. This starts the Platform, if not already running, but launches the content in the second manifest at the $$appManifestUrl location. If an $$appManifestUrl parameter is included, any snapshot that exists on the platform manifest is ignored and only the content designated at the appManifestUrl is launched.

Like the launchContentManifest() method, if the manifest at the $$appManifestUrl location contains a snapshot object, that snapshot is launched. If instead it is a legacy manifest without a snapshot, the startup_app is launched as a single View in the Layout of a new OpenFin Window.

📘

Important

If both snapshot and startup_app are present in the $$appManifestUrl location, the following hierarchy of which of these is used applies:

  1. startup_app is always used if you are launching the manifest in a traditional way through the RVM.
  2. snapshot is used only if the the manifest is being passed via the $$appManifestUrl.

Example deep link launching content

fins://mydomain.com/path-to-platform-manifest/app.json?$$appManifestUrl=https://mydomain.com/path-to-content-manifest/

Updated 4 months ago


Starting a Platform and Launching Content


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.