We can extract the analysis results via the iOS SDK. To do so, we need to specify the following information:
Dimension/Grouping Key (which field?). If omitted, the default view will be used.
Filters (if any). When multiple filters are defined, they will be concatenated using "AND".
Please specify the target rule with its rule ID. The rule ID is shown on the developer portal. For setting dimensions and filters, please use the value(s) set as "Name" when you define your Aggregation Rule.
Here is the sample code for getting the analysis result.
The analysis result will be returned as an object of KAGroupedResult, with a snapshots property containing NSArray of KAGroupedSnapShot.
Each KAGroupedSnapShot contains the following properties:
Name : The label of the dimension/grouping key (i.e. the value set as "Label" when you define your Aggregation Rule. If you did not set it, the value set as "Name" will be used instead).
Data: The JSON Array that contains the data retrieved by the query.
PointStart: The date (in milliseconds since UNIX epoch in UTC) in which the data starts.
PointInterval: Interval (in milliseconds) between data points.
Please check our appledoc for more details on how to interpret GroupSnapShot.