gift

Dokumentasi platform iBuildApp

XML Configuration iPhone

General information

XML-configuration describes app look/feel and functionality, including landing page elements:

  • buttons;
  • images;
  • labels;
  • background,
describes app features content.


Elements description

app is a document root element. All the tags and content should be placed between <app></app> and be child elements.

Design

design element contain the settings of the app landing page. It's a root element for the following tags:

  • appName - app name,
  • rgbcolor - landing page background colour,
  • backimage - landing page background image,
  • backimagedata - landing page background image in BASE64,
  • showLink - iBuildApp branding.

App name

appName elements contains app name.

This element is a child to design tag. That's Entry is obligatory, there may be at most one copy of it.

Example:

<appName><![CDATA[My App]]></appName>

Background color

rgbcolor element describes background color and is used if background image was not set. Default color (if color value was not set or is invalid) is #000000 (black).

This element is a child to design tag. Entry is optional but there may only be a single copy of it.

Example:

<rgbcolor>#FFFFFF</rgbcolor>

Background image

background element describes landing page background image, contains URL of the used image. If the element value was not set or is invalid, background colour is used.

This element is a child to design tag. This is an optional entry, there may be at most one copy of it.

Example:

<backimage><![CDATA[http://images.com/someimage.jpg]]></backimage>

Background image in BASE64

backgrounddata element contains landing page background image in BASE 64. Encoded image will be used if background image could not be downloaded. BASE64 encoding is used.

backgrounddata element is used in build-in configuration only*.

This element is a child to design tag. Entry is optional, there may be at most one copy of it.

Example:

<backimagedata>iVBORw0KGgoAAAA...AAABJRU5ErkJggg==</backimagedata>

iBuildApp branding

showLink element defines if iBuildApp branding should be presented in the app. iBuildApp branding is a link "Powered by iBuildap" placed at the bottom of app landing page. If one taps the link iBuildApp mobile site will be opened in default device browser.

Values:

  • 0 - iBuildApp branding is disabled
  • 1 - iBuildApp branding is enabled
Default value is 0 (branding is disabled)

This element is a child to design tag. Entry is optional, there may be at most one copy of it.

Example:

<showLink>1</showLink>

Images

image element describes images presented on the app landing page (e.g. logo image). On the landing page image is allocated with the use of XML-parameters, stored on a remote server. <image> element children:

  • <x> - image left top corner coordinate (horizontal)
  • <y> - image left top corner coordinate (vertical)
  • <height> - image hight in px
  • <width> - image width in px
  • <data> - image data. Children elements:
    • <url> - URL of the image used. Child element for <data>
    • <imagedata> - image in BASE64. Encoded image will be used if background image was not downloaded over the air. imagedata element is used in build-in configuration only*. This element is a child to data tag.

This element is a child to app tag. Entry is optional, may be presented in multiple copies.

Example:

<image>
    <x>0</x>
    <y>0</y>
    <width>320</width>
    <height>65</height>
    <data>
        <url><![CDATA[http://ibuildapp.com/assets/data/00033/33701/58534/images/logo.png]]></url>
    </data>
</image> 

Labels

label element describes labels presented on the app landing page (e.g. slogan). On the landing page image is allocated with the use of XML-parameters, stored on a remote server. <lalbel> element children:

  • <x> - label left top corner coordinate (horizontal);
  • <y> - label left top corner coordinate (vertical);
  • <height> - label height in px;
  • <width> - label width in px;
  • <data> - label data. Children elements.
    • <title> - label text. Child element for <data>.
    • <size> - font size. This is an optional entry. Child of <data>.
    • <color> - font colour. This is an optional entry. Child of <data>.
    • <style> - style colour. This is an optional entry. Child of <data>.

This element is a child to app tag. Entry is optional, may be presented in multiple copies.

Example:

<label>
    <x>10</x>
    <y>70</y>
    <width>300</width>
    <height>270</height>
    <data>
       <title><![CDATA[roman]]></title>
       <size>16</size>
       <color>#000000</color>
       <style>italic</style>
    </data>
</label>

Buttons

button element describes button situated on app landing page. Button is displayed according to the XML-parameters that come from remote server. Tap initiates associated feature launching. <button> element children:

  • <x> - label left top corner coordinate (horizontal);
  • <y> - label left top corner coordinate (vertical);
  • <height> - label height in px;
  • <width> - label width in px;
  • <icon> - button image URL. Entry is optional
  • <icondata> - image in BASE64. Encoded image will be used if background image could not be downloaded. icondata element is used in build-in configuration only*. Entry is optional
  • <label> - button label text. Entry is optional
  • <size> - font size. Entry is optional. This element is ignored if <label> element is omitted.
  • <color> - font color. Entry is optional. This element is ignored if <label> element is omitted.
  • <style> - text style. Entry is optional. This element is ignored if <label> element is omitted.
  • <func> - contains feature ID (decimal). Should correspond to one of the features <order> tag. If the value is not set or it's invalid tab action doesn't fire feature launching.

This element is a child to app tag. Entry is optional, may be presented in multiple copies or can be omitted.

Example:

<button>
    <x>30</x>
    <y>350</y>
    <width>95</width>
    <height>33</height>
    <icon><![CDATA[http://ibuildapp.com/assets/data/00033/33701/58534/buttons/button.png]]></icon>
    <label><![CDATA[Gallery]]></label>
    <title><![CDATA[Gallery]]></title>
    <size>13</size>
    <align>center</align>
    <color>#ffffff</color>
    <style>bold</style>
    <func>4</func>
</button>

Tabs

tabItem element describes tap bar situated at the bottom of app landing page. Tap bar is displayed according to the XML-parameters that come from remote server. Tap initiates associated feature launching. Children of <tabltem> element are:

  • <icon> - tab image URL.
  • <icondata> - image in BASE64. Encoded image will be used if tab image was not downloaded over the air. icondata element is used in build-in configuration only*.
  • <label> - tab label.
  • <func> - contains feature ID (decimal). Should correspond to one of the features <order> tag. If the value is not set or it's invalid tab action doesn't fire feature launching.
  • This element is a child to app tag. Entry is optional, may be presented in multiple copies or can be omitted.

    Example:

    <tabItem>
        <func>0</func>
        <label><![CDATA[Home]]></label>
        <icon><![CDATA[http://ibuildapp.com/assets/templates/menu/home.png]]></icon>
    </tabItem>
    

    Features

    feature element contains feature launching parameters. Children elements are:

    • <title> - feature title, is displayed on navigation bar.
    • <order> - feature ID (decimal). This value should correspond to func element of one or more buttons. If the value doesn't correspond any func value feature will not be launched.
    • <type> - feature type identifier. Is used to tell which feature should be launched. For custom features "custom_module" value is used.
    • <module_id> - custom module ID. Example: m12345_qwertymodule
    • <data> - xml-data container, specific for each feature. <data> parsing is performed within the feature and not within the core. <data> can contain any XML structure.

    This element is a child to app tag. Entry is optional, may be presented in multiple copies or can be omitted. The number of feature elements should correspond to the number of functions for app correct functioning.

    Example:

    <widget>
        <order>0</order>
        <type>custom_module</type>
        <module_id>m15682_qwertymodule</module_id>
        <title>
            <![CDATA[ BarCode ]]>
        </title>
        <data>
            <textField>default text</textField>
            <cb1>on</cb1>
            <dropdown/>
            <multilineText>Some text It has two lines.</multilineText>
            <cb2>on</cb2>
            <radio>1st</radio>
        </data>
    </widget>
    

    Ads

    Ads can be presented in the app as 320х50px or 320х52px banner on app inner pages (over the navigation tab). Ads won't be shown on app landing page and can be hidden with a tap on "close" control. Ads types:

    • HTML - custom ads, created with the use of HTML layout.
    • URL - ads link. Content is downloaded from the remote server.
    • Google AdMob - user should provide his AdMob uid. Content is downloaded from the remote server.
    • iAd - build in ads system for iOS-apps

    <adv> tag children:

    • <type> - ads type (string), values: «gAd» - Google AdMob; «url» - url; «html» - html; «iAd» - iAd.
    • <url> - ads link. Use case: if ads type url. Ignored in all other cases.
    • <url_on_click> - redirect webpage link (after a user taps banner). If this parameter is omitted then ads content links are used. Use case: if ads type url. Ignored in all other cases.
    • <html> - ads html-content. Use case: if ads type HTML. Ignored in all other cases.
    • <html_on_click> - redirect webpage link (after a user taps banner). If this parameter is omitted then ads content links are used. Use case: if ads type HTML. Ignored in all other cases.
    • <uid> - Google AdMob uid. Use case: if ads type Google AdMob. Ignored in all other cases.

    Example:

    <adv>
        <type>gAd</type>
        <uid>a14ffac11112233</uid>
    </adv>
    

    Native features

    Native features is an extra functionality, e.g. sharing, notifications, etc. Function types:

    • send_mail - enables emails sending
    • send_sms - enables sms sending
    • add_event - enables adding events to calendar
    • add_contact - enabling adding contacts to address book
    • save_picture - enabling adding pictures to albums
    • add_local_notific - local notifications

    Each additional function is described in plugin element. Chidlren tags:

    • <func> - feature ID assosiated with the function. Should correspond to one of the features <order> tag. If the value is not set or is invalid tab action doesn't fire feature launching.
    • <type> - corresponds to one of the function types.

    Example:

    <plugin>
        <type>save_picture</type>
        <func>1</func>
    </plugin>
    <plugin>
        <type>add_contact</type>
        <func>2</func>
    </plugin>
    

    GPS-notifications

    GPS-notifications allow users get notification depending on their GEO position. Each location is stored in gpsObject, it has the following parameters:

    • <latitude> - location latitude.
    • <longitude> - location longitude.
    • <title> - location name.
    • <description> - location description.
    • <radius> - location area radius for getting messages.

    Example:

    <gps_object>
        <latitude>50</latitude>
        <longitude>40</longitude>
        <radius>15</radius>
        <title>
            <![CDATA[ Some title ]]>
        </title>
        <description>
            <![CDATA[ Some description ]]>
        </description>
    </gps_object>
    

    * built-in configuration - configuration included in application resources. Used when it configuration from server or cache cannot be downloaded.