Mobile SDK Sizes

iOS SDK Framework

The pre-compiled iOS Framework is approx. 100 Mb

Why is it so big?

  • the pre-compiled framework has to support several iOS architectures (arm7, arm7s, arm64)

Once compiled into an .ipa the sdk is ~3MB

Android SDK Library

Once included in the apk the additional size <1 MB and adds ~5K methods.

 

More details here:

HelloWorld application w/o the Applause SDK

HelloWorld application with the Applause SDK

 

 

 

Applause Autoinstrumentation Service

AIS SERVICE [BETA]:
Please note this document describes the beta release of the Applause Autoinstrumentation Service (AIS). The document assumes you are familiar with the principles and concepts behind manual instrumentation. If not, please see Applause SDK Installation Guide for iOS or Applause SDK: Android Installation Guide.
Autoinstrumentation will take your binary build and automatically add the Applause SDK to that build.
Firstly, you’ll need to request an API key from your Applause Project Manager. Once you have one
You can test it with curl:

$ curl -XGET https://ais.applause.com/autoinstrumentation/upload-data?apikey=uaghohJ7PeeH6moRhH1EJthoMolAi8UN

The response should look like:

{

  “action”: “https://ai-production.s3.amazonaws.com/“, 

  “fields”: {

    “AWSAccessKeyId”: “AKIAIU5THEINUOTJ5ZIQ”, 

    “acl”: “public-read”, 

    “key”: “upload/b448ce/6623fdd8-feb4-4df7-ae94-80f5c7434654″, 

    “policy”: “eyJleHBpcmF0aW9uIjogIjIwMTYtMDgtMTdUMTM6MDI6NDRaIiwKImNvbmRpdGlvbnMiOiBbeyJidWNrZXQiOiAiYWktcHJvZHVjdGlvbiJ9LHsia2V5IjogInVwbG9hZC9iNDQ4Y2UvNjYyM2ZkZDgtZmViNC00ZGY3LWFlOTQtODBmNWM3NDM0NjU0In0seyJhY2wiOiAicHVibGljLXJlYWQifSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMCwgNTM2ODcwOTEyMF0seyJ4LWFtei1zdG9yYWdlLWNsYXNzIjogIlNUQU5EQVJEIn1dfQ==”

    “signature”: “X33Dq76Vl1oCyB3zQu4d9I6Go2M=”

    “x-amz-storage-class”: “STANDARD”

  }, 

  “upload_url”: “https://ai-production.s3.amazonaws.com/upload/b448ce/6623fdd8-feb4-4df7-ae94-80f5c7434654

}

How to autoinstrument your builds:

Key Points:
  • AIS will work on either an IPA or APK for a build WITHOUT the Applause SDK manually instrumented.
  • Autoinstrumented builds MUST be re-signed in order to be installed.

To instrument file with AIService you need to do 5 steps:

  1. Get upload url from AIService
  2. Upload file to upload url
  3. Ping AIService with config to instrument uploaded file and obtain receive token.
  4. Wait for instrumentation process to finish using the token.
  5. Download instrumented file

The example below uses Python, but you can easily write it in any other modern programming language.

Step 1. Get upload url and token from AIService

Make HTTP GET request to Upload Data endpoint.

import requests

AISERVICE_HOST = 'http://api.applause.com/autoinstrumentation'

response = requests.get(
    AISERVICE_HOST + '/upload-data',
    params={'apikey': 'AIS_API_KEY'})
data = response.json()

data dict will look something like:

{
"action": "https://autoinst.s3.amazonaws.com/",
"fields": {
    "acl": "public-read",
    "x-amz-storage-class": "STANDARD",
    "policy": "eyJle...XX0=",
    "AWSAccessKeyId": "BK...QB",
    "signature": "9mrnQZcNzIIvcfxGZItAFxlDZjg=",
    "key": "upload/b448ce/ed4b8977-1559-4882-9919-336ae375bdf1",
},
"token": "ed4b8977-1559-4882-9919-336ae375bdf1",
"upload_url": "https://autoinst.s3.amazonaws.com/upload/b448ce/ed4b8977-1559-4882-9919-336ae375bdf1"
}

Step 2. Upload file to upload url

To upload data to S3 you need to pass fields data received in Step 1

files = {'file': open('ApplicationFile.ipa', 'rb')}

requests.post(
    data['action'],
    data['fields'],
    files=files
)

Step 3. Ping AIService with config to instrument uploaded file

When you’ve uploaded successfully application file to S3 you can schedule instrumentation job with desired configuration.

form_data = {
    'app_url': "http://s3.binary_app_url.com",
    'platform': 'ios',
    'app_key': 'APP_KEY_40_CHARS'.zfill(40),
    'server_url': 'https://applause-sdk-backend-url.com',
    'default_user': 'optional-default-user@applause.com',
    'report_on_shake': 'true',
    'mach_exceptions': 'false',
    'with_utest': 'false',
    'screenshots_from_gallery': 'false'
}

job_response = requests.post(
    AISERVICE_HOST + '/instrument',
    data=form_data,
    params={'apikey': 'AIS_API_KEY'})
job = job_response.json()

job response will look like:

{
"token": "INSTRUMENTATION_JOB_TOKEN"
}

Step 4. Wait for instrumentation process to finish

You can check instrumentation process status by calling Status endpoint.

while True:
    response = requests.get(AISERVICE_HOST + '/status/' + job['token'],
                            params={'apikey': 'AIS_API_KEY'})
    status = response.json()
    if status['status'] in ['success', 'error']:
        break
    print "Waiting..."
    time.sleep(1)

status response looks like:

{
"status": "begin",
"title": "Instrumenting application ..."
}

Step 5. Download instrumented file

When instrumentation process finishes, status endpoint will return url from where you can download instrumented file.

response = requests.get(AISERVICE_HOST + '/status/' + job['token'],
                        params={'apikey': 'AIS_API_KEY'})
status = response.json()

status response will contain processed_url key:

{
    "status": "success",
    "title": "Instrumentation process finished",
    "processed_url": "https://autoinst.s3.amazonaws.com/instrumented/f0e4a3/ed4b8977-1559-4882-9919-336ae375bdf1"
}

You can now download instrumented file.

response = requests.get(AISERVICE_HOST + '/status/' + job['token'],
                        params={'apikey': 'AIS_API_KEY'})
status = response.json()
with open('InstrumentedApplication.ipa', 'wb') as app_file:
    response = requests.get(status['processed_url'], stream=True)

    for block in response.iter_content(1024):
        if not block:
            break

        app_file.write(block)