iOS: Minimum SDK version: 9.0 or higher
Before deploying all the necessary components to enable the Codavel Performance Service, an App must be configured in Codavel’s private area. In case you have already configured your App, you may skip this section. Otherwise, please follow these steps:
1. Login into https://private.codavel.com/
a. If you do not have access, please contact your dedicated account manager, he will give you access to the console.
2. Add a new app
a. Go to home and click “NEW APP”
b. Fill in the fields, namely
1. Give the app a name (descriptive)
2. Add the package name (Android) and/or bundle identifier (iOS) of your app. If it doesn’t match with your app, the traffic will be discarded.
3. Choose the App Type CDN to use Codavel Performance Service.
4. Select the regions where you want the Bolina service enabled. If you require other regions, please contact your dedicated account manager.
5. Click in the button CREATE APP
c. Your new app will appear in the list of deployments with the creation status “Processing (Creating deployment…)”. This will take some time, you will receive an email notification when the deployment is ready to use.
3. The deployment is ready to use when the Creation status change to “Deployment ready” and the Bolina server URL is available
4. Click the app info button (?) to see the deployment id and the deployment secret
5. Take note of both deployment id and secret, you will need them later.
The integration can be achieved by following this instructions:
1. Install Bolina Interceptor into your project through CocoaPods, a dependency manager for Objective-c and Swift.
a. Install CocoaPods, by running the following commands in a terminal:
b. Then, you’ll need to create a file named ‘Podfile’ in the same directory as your Xcode project (.xcodeproj) file with the following content:
The most recent version, is available in the private area, inside instructions.
c. Install the dependencies in your project using the command:
d. To build your app with the dependencies, you need to open the generated Xcode workspace (.xcworkspace) instead of the project file:
2. Make sure that, before performing any HTTP request (a good place would be the :didFinishLaunchingWithOptions: method in your AppDelegate), you import and start the interceptor:
a. Import Bolina headers:
b. Initialize the Bolina Configuration and set the Bolina Configuration domain name:
c. [optional] Configure your Origin:
With this configuration, all requests intercepted by Bolina that would originally be sent to <your.cdn.com>, will be sent to a Bolina Server, that then will fetch the resource from <your.origin.com>. In case the Bolina transfer fails, the requests will be sent to <your.cdn.com>, as before. You can add multiple entries to be replaced. Otherwise, without this configuration, Codavel Performance Service servers will perform the same request as your HTTP clients would, to your current CDN or Origin.
d. Start the Bolina interceptor:
e. Add the Bolina interceptor as a configuration of AFURLSessionManager and use that session manager to perform the HTTP requests:
f. Make sure you stop the interceptor whenever you don’t need it:
Other options to integrate:
Then you are able to use this manager in your application using this call:
Bolina SDK can collect the performance data between two points in your app code. This way you can easily compare the network performance of the app requests with and without bolina in a dashboard in your Bolina Performance Console. Bolina SDK provides a method to start the trace of an action, another one to stop the trace, and another one to add optional metadata.
1. When you want to mark the start of an action, add the following line to your code
2. When you want to mark the stop of the same action, add the following line to your code:
3. When you want to add metadata to the action, add the following lines to your code:
4. When you finish collecting data to the action, add the following line to your code:
Trace the time to start a video:
1. Call startAction when the user press the play button and give it a name, e.g. “video start”
2. Call stopAction when the video starts playing
3. Call processAction to save the action and send the action stats to your dashboard
Bolina SDK allows the configuration of some advanced settings for enabling some features, configuring security options and increasing the debug level. Please, before changing these settings make sure you know what you are doing. All the methods below are accessible via the BolinaConfiguration object that you need to pass to InterceptorSingleton.startInterceptor()
A/B Testing setting
To get more information about your deployment and the users connected through Codavel Performance Service, we provide an analytics page inside your Codavel account, with data collected from both Servers and Client’s SDKs.
In order to access it, please follow these steps:
1. Login into https://private.codavel.com/
a. If you do not have access, please contact our sales team, they will give you access to the console.
2. Go to the Insights section of the menu.
a. Network – Contains overall HTTP requests information, along with some more detailed and low level statistics.
b. User – Contains action information and user behaviour. Note: To view data in this dashboard you need to add action data via SDK. Please see the section Configure Action in App of the respective interceptor.
c. Debug – Contains detailed information about possible errors that may affect your user experience, that can be used to identify and fix any configuration or deployment issues.