kony.shareExtensions Namespace

The kony.shareExtensions Namespace implements the iOS Share extension, which is a type of app extension.

The Share app extension is one of the types of app extensions provided by Apple for iOS apps. The Share app extension allows the app users to share information from the current context with other entities, such as social media, apps, and services. For example, a Share app extension can be used to share photos directly from the Image Gallery with the social media.

The share extension app can be accessed by tapping an action button provided in an app to display the activity view. The activity view contains extensions relevant to the current context.

Quantum Visualizerprovides integrated support for developing Share app extensions for iOS apps. You develop Share extensions and package them into your app in the same way you do for other types of app extensions. For more information, refer App Extension API for iOS.

For more information about what the Share app extension is and what you can do with it, refer the Apple developer documentation.

A Share extension can use the default UI provided by Apple or a custom UI that you create. When you create a share extension using the Default GUI, a standard compose view UI is used as shown in the figure below.

The implementation of the kony.shareExtensions Namespace provides you with what you need to add your own business logic using the Native Function API in callback handlers.

If you create your own custom UI, you must use the Native Function API and then add your business logic according to your needs. The Info.plist file generated when you create a Share app extension from Xcode is configured to use the Default UI by default. To make use of the custom UI for your app extension, you need to perform the following steps.

  1. Open the Info.plist file of the Share app extension for which you want to develop a custom UI.
  2. Find and replace the NSExtensionMainStoryboard key with NSExtensionPrincipalClass, and also replace its value, MainInterface with ShareViewController. The figure below shows difference in the Info.plist file before and after modification.

  3. Save and close the file.

When you develop a Share extension, you put your business logic into a specific set of callback functions. Your app must set these callback function by invoking the kony.shareExtensions.setExtensionsCallbacks function.

Properties

The kony.shareExtensions Namespace provides the following properties.

Functions

The kony.shareExtensions Namespace provides the following function.