Creating adapters for Safari

The add-in adapter for Safari is a NPAPI plug-in. The NPAPI plug-in registers one or several MIME media types in the browser. During the add-in creation, the developer must select the MIME media type that will serve as a unique add-in identifier. We recommend that you start the MIME media type name from application/ and include the add-in version number in it (for example, application/myaddin-1). Ensure that the MIME media type that you use does not conflict with any of the registered MIME media types. When you release a new add-in version, increment the MIME media type version, otherwise the web client will use the old version of the add-in.

For example, an add-in with MIME media type application/my-addin-3 is used in a configuration. When you release a new add-in version, to include it in the configuration, rebuild the Safari adapter with MIME media type changed to application/my-addin-4. Then rebuild the installer packages and include them in the archive that will be loaded to the configuration. Also, in the archive manifest file, change the MIME media type to application/my-addin-4. Then load the archive to the configuration. When the web client is started with the new configuration on the computer where the previous add-in version is installed, the web client retrieves MIME media type application/my-component-4 from the configuration. Since this MIME media type is not registered in the browser, the previous add-in version will not be used. To start using the new add-in version, the user must install it. The previous add-in version remains installed and can be used with earlier configuration versions.

Use the AddInNPAPI project from the example directory as a basis for the extension development. In the AddInNPAPI.cpp file, change the values of the following variables: nameFilePrj, nameFileComponent, and mimeType. The nameFilePrj variable contains the adapter name (for example, AddInNPAPI.dyn). The nameFileComponent variable contains the add-in file name (for example, AddInNative.dyn). The mimeType variable contains the MIME media type of the add-in.

Safari adapter for MacOS X does not require building, it is already built and delivered in the lib directory (1CEAdnWebNPAPISafOSX.bundle). You have to build the add-in for Mas OS as a bundle. We recommend that you build a 32/64-bit Universal module at least for i386 and x86_64 architectures. The example/NativeAPI/MacBuild directory contains the Xcode project for building add-ins for Mac OS.

Add comment