PgyUpdateManager.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // PgyUpdateManager.h
  3. // Pods
  4. //
  5. // Created by Scott Lei on 15/9/16.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface PgyUpdateManager : NSObject
  10. + (PgyUpdateManager *)sharedPgyManager;
  11. /**
  12. * 启动蒲公英SDK
  13. * @param appId 应用程序ID,从蒲公英网站上获取。
  14. */
  15. - (void)startManagerWithAppId:(NSString *)appId;
  16. /**
  17. * 检查是否有版本更新。
  18. * 如果开发者在蒲公英上提交了新版本,则调用此方法后会弹出更新提示界面。
  19. */
  20. - (void)checkUpdate;
  21. /**
  22. * 检查是否有版本更新。
  23. *
  24. * @param delegate 自定义checkUpdateWithDelegete方法的对象
  25. * @param updateMethodWithDictionary 当checkUpdateWithDelegete事件完成时此方法会被调用,包含更新信息的字典也被回传。
  26. * 如果有更新信息,那么字典里就会包含新版本的信息,否则的话字典信息为nil。
  27. */
  28. - (void)checkUpdateWithDelegete:(id)delegate selector:(SEL)updateMethodWithDictionary;
  29. /**
  30. * 检查更新是根据本地存储的Build号和蒲公英上的最新Build号比较来完成的。如果调用checkUpdateWithDelegete,SDK会获取到最新的
  31. * Build号,但是checkUpdateWithDelegete方法自己不会来更新本地版本号,如果需要更新本地版本号,则需要调用此方法。
  32. */
  33. - (void)updateLocalBuildNumber;
  34. @end