SDK Integration

Installation

Prerequisites : here

Using CocoaPods

  • Add Vectaury dependency to Podfile: pod 'Vectaury'

 target 'Exemple' do
   use_frameworks!

   # Vectaury SDK
   pod 'Vectaury'

   target 'ExempleTests' do
     inherit! :search_paths
     # Pods for testing
   end

   target 'ExempleUITests' do
     inherit! :search_paths
     # Pods for testing
   end

 end

  • In your shell, run: pod install

Update

Using CocoaPods

  • In your shell, run: pod update
  • You can check the last available version at: Changelog

Integration

1 - Init Vectaury SDK from the AppDelegate.m file

To initialise the SDK, you need to have an Api Key, and choose the appropriate consent and legitimate interest modes. Consent mode depends on CMP that you use. If it is an IAB CMP, cmpIAB is available. Specific modes are available for some CMP (cmpSinglespot, cmpChandago, cmpVectauryConsent, cmpFidzup), use it instead of IAB CMP Mode.

  • Import Vectaury
  • Init SDK with + (void)initWithApiKey:(NSString *)key withLaunchOptions:(NSDictionary *)launchOptions withPush:(BOOL)pushIsEnabled withConsentType:(ConsentType)consentType andLegIntType:(LegitimateInterestType)legInt; function on:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {}

If you use Vectaury CMP, the init method will be:

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        Vectaury.initWithApiKey("xxxxxx", withLaunchOptions: launchOptions, withPush:false, with: cmpVectauryConsent, andLegIntType: cmpVectauryLegInt)

        return true
    }
}

Note

With GDPR, the consent of the user is mandatory before collecting data in UE. You must use a CMP.

Start with IAB CMP

SDK is automatically started and stoped. No action is required for you.

Start with none-iab CMP

You must start and stop SDK manualy. For that use manual mode and call + (void)optInConsent:(BOOL) optin;, following the permission.