MicroStrategy ONE
Create a Custom Widget in iOS
In addition to using one of the widgets that MicroStrategy provides for mobile applications, you can also build a custom widget that has access to the MicroStrategy data provided in the grid it is applied to. You can design the custom widget to render the MicroStrategy data according to your specific requirements.
You can use a custom widget in either the MicroStrategy Mobile application or a custom application that has the MicroStrategy Mobile framework embedded. For both implementations, there are two ways to add the widget to the application. You can add the widget code directly to the application or you can add a static library containing the widget code to the Xcode project.
To add a static library containing the widget code to a mobile application, follow the steps listed below:
- Open the Xcode project, select MicroStrategy Mobile and specify the target.
- On the General tab, scroll down to Linked Frameworks and Libraries and click the add items button “+” below the list of frameworks and libraries.
- At the bottom of the pop-up dialog, click Add Other… and navigate to the Library folder of the DMG.
- Select the framework you want to add and click Open. There are currently two supported frameworks: MSTRDataCloud.framework and RSSWidget.framework.
To build a custom widget and add it to a mobile application, follow the steps listed below.
Design
-
Before you build a custom widget, you must decide what the custom widget will look like and what it will do.
Changes in MicroStrategy Web
-
Registering a custom widget with MicroStrategy Web
In Eclipse, you register the custom widget with MicroStrategy Web using the Web Customization Editor.
-
Applying a custom widget to a MicroStrategy report or report grid
In MicroStrategy Web, you apply the custom widget to a report or report grid in a document.
-
Building a widget properties editor
You have the option of building a widget properties editor that allows you to set properties on your custom widget.
Changes in Xcode
-
In Xcode, you write the basic code for a custom widget, extending MSIWidgetViewer and implementing its life-cycle methods. Then you add additional functionality as defined by your specific requirements.
-
Registering a custom widget in the application's Xcode project
In Xcode, you register a custom widget as the code that will render the content for any grid that the widget is applied to. Registering the widget lets MicroStrategy establish the relationship between a style and the client rendering code.
-
Using a custom widget as a selector
In Xcode, you can enable a custom widget that you build to act as a selector.