BUAdSDKManager.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. //
  2. // BUAdSDKManager.h
  3. // BUAdSDK
  4. //
  5. // Copyright © 2017 bytedance. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <UIKit/UIKit.h>
  9. #import "BUAdSDKDefines.h"
  10. #import "BUMopubAdMarkUpDelegate.h"
  11. typedef void (^BUConfirmGDPR)(BOOL isAgreed);
  12. typedef void (^BUCompletionHandler)(BOOL success,NSError *error);
  13. @interface BUAdSDKManager : NSObject
  14. @property (nonatomic, copy, readonly, class) NSString *SDKVersion;
  15. /// The synchronize initialization method of Pangle
  16. /// @param completionHandler Callback to the initialization state of the calling thread
  17. + (void)startWithSyncCompletionHandler:(BUCompletionHandler)completionHandler;
  18. /// The asynchronize initialization method of Pangle
  19. /// @param completionHandler Callback to the initialization state of the non-main thread
  20. + (void)startWithAsyncCompletionHandler:(BUCompletionHandler)completionHandler;
  21. /// Open GDPR Privacy for the user to choose before setAppID.
  22. + (void)openGDPRPrivacyFromRootViewController:(UIViewController *)rootViewController confirm:(BUConfirmGDPR)confirm;
  23. @end
  24. @interface BUAdSDKManager (MopubAdaptor) <BUMopubAdMarkUpDelegate>
  25. @end
  26. @interface BUAdSDKManager (BUAdNR)
  27. + (NSString *)bunr_dictionaryWithSlot:(BUAdSlot *)slot isDynamicRender:(BOOL)isDynamicRender;
  28. @end
  29. @interface BUAdSDKManager (InterfaceReadyReplacement)
  30. /**
  31. This property should be set when integrating non-China and china areas at the same time, otherwise it need'nt to be set.you‘d better set Territory first, if you need to set them
  32. @param territory : Regional value
  33. */
  34. + (void)setTerritory:(BUAdSDKTerritory)territory;
  35. /**
  36. Register the App key that’s already been applied before requesting an ad from TikTok Audience Network.
  37. @param appID : the unique identifier of the App
  38. */
  39. + (void)setAppID:(NSString *)appID;
  40. /**
  41. Configure development mode.
  42. @param level : default BUAdSDKLogLevelNone
  43. */
  44. + (void)setLoglevel:(BUAdSDKLogLevel)level;
  45. /* Set the COPPA of the user, COPPA is the short of Children's Online Privacy Protection Rule, the interface only works in the United States.
  46. * @params Coppa 0 adult, 1 child
  47. */
  48. + (void)setCoppa:(NSUInteger)coppa;
  49. /// Set the user's keywords, such as interests and hobbies, etc.
  50. /// Must obtain the consent of the user before incoming.
  51. + (void)setUserKeywords:(NSString *)keywords;
  52. /// set additional user information.
  53. + (void)setUserExtData:(NSString *)data;
  54. /// Set whether the app is a paid app, the default is a non-paid app.
  55. /// Must obtain the consent of the user before incoming
  56. + (void)setIsPaidApp:(BOOL)isPaidApp;
  57. /// Solve the problem when your WKWebview post message empty,default is BUOfflineTypeWebview
  58. + (void)setOfflineType:(BUOfflineType)type;
  59. /// Custom set the GDPR of the user,GDPR is the short of General Data Protection Regulation,the interface only works in The European.
  60. /// @params GDPR 0 close privacy protection, 1 open privacy protection
  61. + (void)setGDPR:(NSInteger)GDPR;
  62. /// Custom set the CCPA of the user,CCPA is the short of General Data Protection Regulation,the interface only works in USA.
  63. /// @params CCPA 0: "sale" of personal information is permitted, 1: user has opted out of "sale" of personal information -1: default
  64. + (void)setCCPA:(NSInteger)CCPA;
  65. /// Custom set the AB vid of the user. Array element type is NSNumber
  66. + (void)setABVidArray:(NSArray<NSNumber *> *)abvids;
  67. /// Custom set the tob ab sdk version of the user.
  68. + (void)setABSDKVersion:(NSString *)abSDKVersion;
  69. /// Custom set idfa value
  70. + (void)setCustomIDFA:(NSString *)idfa;
  71. + (void)setThemeStatus:(BUAdSDKThemeStatus)themeStatus;
  72. /// get appID
  73. + (NSString *)appID;
  74. /// get isPaidApp
  75. + (BOOL)isPaidApp;
  76. /// get GDPR
  77. + (NSInteger)GDPR;
  78. /// get coppa
  79. + (NSUInteger)coppa;
  80. /// get CCPA
  81. + (NSInteger)CCPA;
  82. /**
  83. Whether to allow SDK to modify the category and options of AVAudioSession when playing audio, default is NO.
  84. The category set by the SDK is AVAudioSessionCategoryAmbient, and the options are AVAudioSessionCategoryOptionDuckOthers
  85. */
  86. + (void)allowModifyAudioSessionSetting:(BOOL)isAllow;
  87. + (BUAdSDKThemeStatus)themeStatus;
  88. @end