MGLicenseManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // MGLicenseManager.h
  3. // MGBaseKit
  4. //
  5. // Created by 张英堂 on 16/9/5.
  6. // Copyright © 2016年 megvii. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "MGLicenseCommon.h"
  10. @interface MGLicenseManager : NSObject
  11. /**
  12. 获取过期时间
  13. @param version SDK 版本号
  14. @return 过期日期
  15. */
  16. + (NSDate *)getExpiretime:(NSString *)version;
  17. #pragma mark - 简单调用联网授权
  18. /**
  19. 联网获取授权信息
  20. @param UUID UUID
  21. @param version 通过SDK获取
  22. @param apiKey apiKey
  23. @param apiSecret apiSecret
  24. @param duration appKey有效期
  25. @param url
  26. @param complete 授权结束回调
  27. @return SessionTask
  28. */
  29. + (NSURLSessionTask *)getLicenseWithUUID:(NSString *)UUID
  30. version:(NSString *)version
  31. apiKey:(NSString *)apiKey
  32. apiSecret:(NSString *)apiSecret
  33. apiDuration:(NSInteger)duration
  34. URLString:(NSString *)url
  35. finish:(void(^)(bool License, NSError *error))complete;
  36. @end