UMSocialGlobal.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. //
  2. // UMSocialGlobal.h
  3. // UMSocialSDK
  4. //
  5. // Created by 张军华 on 16/8/16.
  6. // Copyright © 2016年 dongjianxiong. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /**
  10. * UMSocial的全局配置文件
  11. */
  12. @class UMSocialWarterMarkConfig;
  13. /**
  14. * 用来设置UMSocial的全局设置变量
  15. */
  16. @interface UMSocialGlobal: NSObject
  17. + (UMSocialGlobal *)shareInstance;
  18. /**
  19. * 是否用cocos2dx,0-没有使用 1-使用cocos2dx 默认为0
  20. */
  21. @property(atomic,readwrite, assign)NSInteger use_coco2dx;
  22. /**
  23. * 统计的主题,默认为:UMSocialDefault
  24. */
  25. @property(atomic,readwrite,copy)NSString* dc;
  26. /**
  27. * 是否请求的回流统计请求,默认为不请求
  28. */
  29. @property(atomic,readwrite,assign)BOOL isUrlRequest;
  30. /**
  31. * type字符串
  32. * @discuss type是新加入的字段,目前默认值为@"native"
  33. */
  34. @property(atomic,readwrite, copy)NSString* type;
  35. /**
  36. * Universal Links设置
  37. * @note universalLinkDic 的key是由UMSocialPlatformType来确定
  38. * universalLinkDic 的value是由对应平台申请的universalLink来设置
  39. *
  40. * @exapmle 比如微信平台的universalLink为:@"https://developer.umeng.com/"
  41. * 在初始化每个平台之前调用
  42. * [UMSocialGlobal shareInstance].universalLinkDic = @{@(UMSocialPlatformType_WechatSession):@"https://developer.umeng.com/"};
  43. */
  44. @property(atomic,readwrite, copy)NSDictionary* universalLinkDic;
  45. /**
  46. * 设置额外的初始化平台的参数
  47. * @note 目前用于企业微信的配置 corpId为第三方App所属企业的ID agentId 第三方App在企业内部的ID
  48. * @exapmle 比如微信企业平台的额外初始化配置如下
  49. [UMSocialGlobal shareInstance].extraInitDic = @{
  50. @(UMSocialPlatformType_WechatWork):@{@"corpId":@"ww813cd5c1f46dc9ab",@"agentId":@"1000002"}
  51. };
  52. */
  53. @property(atomic,readwrite, copy)NSDictionary* extraInitDic;
  54. /**
  55. * UMSocial的版本号
  56. *
  57. * @return 返回当前的版本号
  58. */
  59. +(NSString*)umSocialSDKVersion;
  60. /**
  61. * 对平台的分享文本的时候,做规定的截断,默认开启
  62. * @discuss 针对特定平台(比如:微信,qq,sina等)对当前的分享信息中的文本截断到合理的位置从而能成功分享
  63. */
  64. @property(atomic,readwrite,assign)BOOL isTruncateShareText;
  65. /**
  66. * 当前网络请求是否用https
  67. * @discuss 针对ios9系统以后强制使用https的网络请求,针对分享的网络图片都必须是https的网络图片(此为苹果官方要求)
  68. * @discuss 该函数默认开启https请求
  69. * @discuss 如果开启ios9的请求后,自动会过滤ios的http的请求,并返回错误。
  70. *
  71. */
  72. @property(atomic,readwrite,assign)BOOL isUsingHttpsWhenShareContent;
  73. /**
  74. * 是否清除缓存在获得用户资料的时候
  75. * 默认设置为YES,代表请求用户的时候需要请求缓存
  76. * NO,代表不清楚缓存,用缓存的数据请求用户数据
  77. */
  78. @property(atomic,readwrite,assign)BOOL isClearCacheWhenGetUserInfo;
  79. /**
  80. * 添加水印功能
  81. * @note 此功能为6.2版本以后的功能
  82. * @discuss 此函数默认关闭 NO - 关闭水印 YES - 打开水印
  83. * @discuss 设置此函数为YES后,必须要设置warterMarkConfig,来配置图片水印和字符串水印,如果不配置,就会用默认的[UMSocialWarterMarkConfig defaultWarterMarkConfig]来显示水印
  84. */
  85. @property(atomic,readwrite,assign)BOOL isUsingWaterMark;
  86. /**
  87. * 添加水印的配置类
  88. * @note 此功能为6.2版本以后的功能
  89. * @discuss 设置isUsingWaterMark此函数为YES后,必须要设置warterMarkConfig,来配置图片水印和字符串水印
  90. */
  91. @property(nonatomic,readwrite,strong)UMSocialWarterMarkConfig* warterMarkConfig;
  92. /**
  93. * 废弃 API
  94. */
  95. @property(atomic,readwrite,copy)NSString* thumblr_Tag;
  96. @end