SDK Implementation for iOS
Print
Created by: Radim Chamrad
Modified on: Sun, 12 Jan, 2020 at 5:46 PM
Objective-C
- Download our SDK for iOS from your Attributo Admin Panel.
- Extract downloaded zip with SDK.
- Add "Attributo.a", "Attributo.h" and "AttributoEvent.h" to your project.
- Select "Copy items if needed" and select correct target.
- Import "Attributo.h" file where you want to call Attributo methods.
- Call [Attributo initializeWithAttributoAppId:@"YOUR_APP_ID" attributoSecretKey:@"YOUR_SECRET_KEY"] method for init right after your app started. You can find your App ID and Secret Key on your Attributo admin panel in section App Settings.
- Call [Attributo measureSession] method for Session tracking right after your app started.
- Call [Attributo measureEventName:@"YOUR_EVENT"] method anywhere your event is completed.
Swift
- Download our SDK for iOS [HERE]
- Extract downloaded zip with SDK
- Add "Attributo.a", "Attributo.h" and "AttributoEvent.h" to your project.
- Select "Copy items if needed" and select correct target.
- Add #import "Attributo.h" line into your ObjectiveC Bridging Header file.
- Call Attributo.initialize( withAttributoAppId: "YOUR_APP_ID", attributoSecretKey:"YOUR_SECRET_KEY") method for init right after your app started. You can find your App ID and Secret Key on your Attributo admin panel in section App Settings.
- Call Attributo.measureSession() method for Session tracking right after your app started.
- Call Attributo.measureEventName("YOUR_EVENT") method anywhere your event is completed.
Radim is the author of this solution article.
Did you find it helpful?
Yes
No
Send feedback Sorry we couldn't be helpful. Help us improve this article with your feedback.