Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed outdated references to releases

...

  • API Builder: Mobile backend-as-a-service solution providing commonly used features, such as user management, push notification, integration with social networks and cloud storage provided by Mobile Backend Services. Using API Builder Cloud and Arrow Builder, developers can quickly and easily create mobile-optimized APIs that manage data from multiple data sources, such as SAP, Salesforce.com, Oracle, Sharepoint and others.  For more information, see the Axway API Builder.
  • Appcelerator Test: Integrated automated functional testing for your application, powered by SOASTA services. Using Appcelerator Test, developers and testers collaborate to record tests directly on the mobile device, execute tests and analyze the results.  For more information, see Appcelerator Test
  • Appcelerator Performance: Monitors your application's health, crashes and overall performance, powered by our own crash server service. Using Appcelerator Performance, developers are able to diagnose why applications crash and focus on specific issues based on user feedback. For more information, see Appcelerator Performance Management.
  • Appcelerator Analytics: Track your applications' user adoption and engagement. Understand how your application is used, which features are not used and decide what will go in the next version of your application. For more information, see Appcelerator Analytics.

...

To enable Appcelerator Services for a Titanium or Alloy project:

  • Make sure the Titanium SDK version in the tiapp.xml file is set to 3.1.1 or later.
  • When creating a new application in Appcelerator Studio, make sure the Enable Appcelerator Services checkbox is enabled.
  • For a previously created project, open your tiapp.xml file, then click the Enable Services button under the Appcelerator Service section.

...

The following changes are made to the tiapp.xml file to enable Appcelerator Services for both classic mobile and Alloy projects.

Code Block
titletiapp.xml
linenumberstrue
languagehtml/xml
    <!-- Crittercism Application ID for Appcelerator Performance service -->
    <property name="com-apm-id" type="string">CRITTERCISM_APP_ID</property>
 
    <!-- Set keys for the ArrowDB service -->
    <property name="acs-api-key-production" type="string">API_KEY_PROD</property>
    <property name="acs-authbase-url" type="string">ACS_AUTH_URL</property>
    <property name="acs-base-url" type="string">ACS_BASE_URL</property>
    <property name="acs-api-key-development" type="string">API_KEY_DEV</property>

    <!-- Enable the Appcelerator Analytics service -->
    <analytics>true</analytics>
 
    <!-- Android Manifest keys for the Appcelerator Test service -->
    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>	
            <application>
                <activity
                    android:configChanges="keyboardHidden|orientation"
                    android:label="<AppName>"
                    android:name=".<Appname>androidActivity" android:theme="@style/Theme.Titanium">
                    <intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                    <intent-filter>
                        <data android:scheme="touchtest-<GUID>"/>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.BROWSABLE"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                    </intent-filter>
                </activity>
                <service android:enabled="true" android:exported="false" android:name="com.soasta.android.touchtest.TouchTestService"/>
            </application>
            <!-- All services require the ACCESS_WIFI_STATE and INTERNET permissions -->
            <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
            <uses-permission android:name="android.permission.INTERNET"/>
            <!-- The Appcelerator Test service requires READ_PHONE_STATE, BLUETOOTH, and BLUETOOTH_ADMIN permissions -->
            <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
            <uses-permission android:name="android.permission.BLUETOOTH"/>
            <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
            <!-- The Appcelerator Performance and Test services require the GET_TASKS permission -->
            <uses-permission android:name="android.permission.GET_TASKS"/>
        </manifest>
    </android>
 
    <!-- Include modules for Appcelerator Performance, Cloud and Test services -->
    <modules>
        <module platform="commonjs">ti.cloud</module>
        <module platform="android">com.appcelerator.apm</module>
        <module platform="iphone">com.appcelerator.apm</module>
        <module deploy-type="test" platform="iphone" version="1.0">com.soasta.touchtest</module>
        <module deploy-type="development" platform="iphone" version="1.0">com.soasta.touchtest</module>
        <module deploy-type="test" platform="android" version="1.0">com.soasta.touchtest</module>
        <module deploy-type="development" platform="android" version="1.0">com.soasta.touchtest</module>
    </modules>
 
    <!-- Configure Appcelerator Test settings -->
    <ios>
        <plist>
            <dict>
                <key>CFBundleURLTypes</key>
                <array>
                    <dict>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
                        <key>CFBundleURLName</key>
                        <string>PACKAGE</string>
                        <key>CFBundleURLSchemes</key>
                        <array>
                            <string>touchtest-<GUID></string>
                        </array>
                    </dict>
                </array>
            </dict>
        </plist>
    </ios>
    <plugins>
        <plugin>com.soasta.touchtest.android</plugin>
    </plugins>

    <property name="com-soasta-touchtest-version" type="string">VERSION</property>
    <property name="com-soasta-touchtest-ios-appId" type="string">TEST_APP_ID</property>

...

PermissionRequired By
ACCESS_WIFI_STATE
All services to access the Wi-Fi state of the device.
BLUETOOTH
The Test service to uniquely identify the device.
BLUETOOTH_ADMIN
The Test service to uniquely identify the device.
GET_TASKS
  • The Performance service to accurately log which activity caused a crash or error
  • The Test service to detect UI changes, UI interactions and playback changes.
INTERNET
All services to access the Appcelerator Platform servers.
READ_PHONE_STATE
The Test service to uniquely identify the device.

Behavior Prior to Release 3.3.0

Prior to Release 3.3.0, Appcelerator Studio injected code into the  app.js  file for classic mobile projects, and  alloy.js  and  index.js  files for Alloy projects to enable Appcelerator Performance and Test Services as shown in the code snippets below.

To enable the Performance and Test services for Release 3.3.0 and later:

  • For the Performance service, the module and plugin are auto-loaded and provide basic crash monitoring services.  For advanced features, the application needs to load and initialize the Performance module, then make module API calls (see Performance  for more details).
  • For the Test service, the module is auto-loaded and does not require any code to start it.

app.js

The following changes are made to the app.js file to enable Appcelerator Services for a classic mobile projects.

Code Block
titleapp.js
languagejavascript
// Loads and initializes the Appcelerator Performance module
// Appended to the beginning of the file
var apm = undefined;

try {
    apm = require("com.appcelerator.apm");
}
catch (e) {
    Ti.API.info("com.appcelerator.apm module is not available");
}


apm && apm.init();
 
...
 
// Loads the Appcelerator iOS Test module to use the Test service for iOS
// Appended to the end of the file
if (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad')
{
    var touchTestModule = undefined;
    try
    {
        touchTestModule = require("com.soasta.touchtest");
    }
    catch (tt_exception)
    {
        Ti.API.error("com.soasta.touchest module is required");
    }
    var cloudTestURL = Ti.App.getArguments().url;
    if (cloudTestURL != null)
    {
        // The URL will be null if we don't launch through TouchTest.
        touchTestModule && touchTestModule.initTouchTest(cloudTestURL);
    }
    Ti.App.addEventListener('resumed',function(e)
    {
        // Hook the resumed from background
        var cloudTestURL = Ti.App.getArguments().url;
        if (cloudTestURL != null)
        {
            touchTestModule && touchTestModule.initTouchTest(cloudTestURL);
        }
    });
}

 

app/alloy.js

The following changes are made to the alloy.js file to enable Appcelerator Service for Alloy projects.

Code Block
// Loads and initializes the Appcelerator Performance module
// Appended to the beginning of the file
Alloy.Globals.apm = undefined;

try {
    Alloy.Globals.apm = require("com.appcelerator.apm");
}
catch (e) {
    Ti.API.info("com.appcelerator.apm module is not available");
}

Alloy.Globals.apm && Alloy.Globals.apm.init();

 

app/controllers/index.js

The following changes are made to the index.js file to enable Appcelerator Services for Alloy projects.

Code Block
// Loads the Appcelerator iOS Test module to use the Test service for iOS
// Appended to the end of the file
if (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad')
{
    var touchTestModule = undefined;
    try
    {
        touchTestModule = require("com.soasta.touchtest");
    }
    catch (tt_exception)
    {
        Ti.API.error("com.soasta.touchest module is required");
    }
    var cloudTestURL = Ti.App.getArguments().url;
    if (cloudTestURL != null)
    {
        // The URL will be null if we don't launch through TouchTest.
        touchTestModule && touchTestModule.initTouchTest(cloudTestURL);
    }
    Ti.App.addEventListener('resumed',function(e)
    {
        // Hook the resumed from background
        var cloudTestURL = Ti.App.getArguments().url;
        if (cloudTestURL != null)
        {
            touchTestModule && touchTestModule.initTouchTest(cloudTestURL);
        }
    });
}

Troubleshooting

Excerpt

Unable to enable Appcelerator Services

If more than one person is working on the same project and you try to enable Appcelerator Services after it has already been enabled once, the enablement process may freeze. To resolve this issue, copy the tiapp.xml from the user who first enabled Appcelerator Services.