...
Code Block | ||
---|---|---|
| ||
/*
* Importing SpringMobile
*/
#import "Spring.h"
/*
* Providing entity
*/
Spring *spring;
/*
* Generating SpringMobile entity with site id and
* application name
*/
spring = [[Spring alloc] initWithSiteAndApplication:@"<site>" application:@"myApplication1"];
/*
* Sending the start of the application to the measurement system */
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:APP_STARTED,VAR_ACTION,nil];
[spring commit:dict];
...
// OR
/*
* Sending the action spring.BACKGROUND
*/
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:APP_BACKGROUND,VAR_ACTION,nil];
[spring commit:dict];
|
Timeout (default: 30 seconds)
With this value, a timeout (in seconds) for each HTTP request can be configured within the library.
...
Code Block | ||
---|---|---|
| ||
spring = [[Spring alloc] initWithSiteAndApplication:@"app" application:@"Test App"]; spring.timeout = 30.0; // in seconds |
Debug
If this value is set on YES
, the library provides debug outputs over the class NSLog
.
...