BUMaterialMeta.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // BUMaterialMeta.h
  3. // BUAdSDK
  4. //
  5. // Copyright © 2017 bytedance. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import "BUDislikeWords.h"
  9. #import "BUImage.h"
  10. #import "BUPersonalizationPrompts.h"
  11. typedef NS_ENUM(NSInteger, BUInteractionType) {
  12. BUInteractionTypeCustorm = 0,
  13. BUInteractionTypeNO_INTERACTION = 1, // pure ad display
  14. BUInteractionTypeURL = 2, // open the webpage using a browser
  15. BUInteractionTypePage = 3, // open the webpage within the app
  16. BUInteractionTypeDownload = 4, // download the app
  17. BUInteractionTypePhone = 5, // make a call
  18. BUInteractionTypeMessage = 6, // send messages
  19. BUInteractionTypeEmail = 7, // send email
  20. BUInteractionTypeVideoAdDetail = 8 // video ad details page
  21. };
  22. typedef NS_ENUM(NSInteger, BUFeedADMode) {
  23. BUFeedADModeSmallImage = 2,
  24. BUFeedADModeLargeImage = 3,
  25. BUFeedADModeGroupImage = 4,
  26. BUFeedVideoAdModeImage = 5, // video ad || rewarded video ad horizontal screen
  27. BUFeedVideoAdModePortrait = 15, // rewarded video ad vertical screen
  28. BUFeedADModeImagePortrait = 16,
  29. BUFeedADModeSquareImage = 33, //SquareImage Currently it exists only in the oversea now. V3200 add
  30. BUFeedADModeSquareVideo = 50, //SquareVideo Currently it exists only in the oversea now. V3200 add
  31. };
  32. @interface BUMaterialMeta : NSObject <NSCoding>
  33. /// interaction types supported by ads.
  34. @property (nonatomic, assign) BUInteractionType interactionType;
  35. /// material pictures.
  36. @property (nonatomic, strong) NSArray<BUImage *> *imageAry;
  37. /// ad logo icon.
  38. @property (nonatomic, strong) BUImage *icon;
  39. /// ad headline.
  40. @property (nonatomic, copy) NSString *AdTitle;
  41. /// ad description.
  42. @property (nonatomic, copy) NSString *AdDescription;
  43. /// ad source.
  44. @property (nonatomic, copy) NSString *source;
  45. /// text displayed on the creative button.
  46. @property (nonatomic, copy) NSString *buttonText;
  47. /// display format of the in-feed ad, other ads ignores it.
  48. @property (nonatomic, assign) BUFeedADMode imageMode;
  49. /// Star rating, range from 1 to 5.
  50. @property (nonatomic, assign) NSInteger score;
  51. /// Number of comments.
  52. @property (nonatomic, assign) NSInteger commentNum;
  53. /// ad installation package size, unit byte.
  54. @property (nonatomic, assign) NSInteger appSize;
  55. /// video duration
  56. @property (nonatomic, assign) NSInteger videoDuration;
  57. /// video url, will be empty string if allowCustomVideoPlayer is NO, contact BD to add to allow list.
  58. @property (nonatomic, copy, readonly) NSString *videoUrl;
  59. /// be allowed to play video ad via custome player, contact BD to add to allow list.
  60. @property (nonatomic, assign, readonly) BOOL allowCustomVideoPlayer;
  61. /// video resolution width
  62. @property (nonatomic, assign, readonly) NSInteger videoResolutionWidth;
  63. /// video resolution height
  64. @property (nonatomic, assign, readonly) NSInteger videoResolutionHeight;
  65. /// the reason why dislike the ad.
  66. @property (nonatomic, copy) NSArray<BUDislikeWords *> *filterWords;
  67. /// compliance statement of personalized advertising push
  68. @property (nonatomic, strong) BUPersonalizationPrompts *personalPrompts;
  69. /// media configuration parameters.
  70. @property (nonatomic, copy) NSDictionary *mediaExt;
  71. - (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError * __autoreleasing *)error;
  72. @end