AppsFlyerCrossPromotionHelper.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // CrossPromotionHelper.h
  3. // AppsFlyerLib
  4. //
  5. // Created by Gil Meroz on 27/01/2017.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. AppsFlyer allows you to log and attribute installs originating
  12. from cross promotion campaigns of your existing apps.
  13. Afterwards, you can optimize on your cross-promotion traffic to get even better results.
  14. */
  15. @interface AppsFlyerCrossPromotionHelper : NSObject
  16. /**
  17. To log an impression use the following API call.
  18. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
  19. @param appID Promoted App ID
  20. @param campaign A campaign name
  21. @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }`
  22. */
  23. + (void)logCrossPromoteImpression:(nonnull NSString *)appID
  24. campaign:(nullable NSString *)campaign
  25. parameters:(nullable NSDictionary *)parameters;
  26. /**
  27. iOS allows you to utilize the StoreKit component to open
  28. the App Store while remaining in the context of your app.
  29. More details at https://support.appsflyer.com/hc/en-us/articles/115004481946-Cross-Promotion-Tracking#tracking-cross-promotion-impressions
  30. @param appID Promoted App ID
  31. @param campaign A campaign name
  32. @param parameters Additional params like `@{@"af_sub1": @"val", @"custom_param": @"val2" }`
  33. @param openStoreBlock Contains promoted `clickURL`
  34. */
  35. + (void)logAndOpenStore:(nonnull NSString *)appID
  36. campaign:(nullable NSString *)campaign
  37. parameters:(nullable NSDictionary *)parameters
  38. openStore:(void (^)(NSURLSession *urlSession, NSURL *clickURL))openStoreBlock;
  39. @end
  40. NS_ASSUME_NONNULL_END