RPConfiguration.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. //
  2. // RPConfiguration.h
  3. // ALRealIdentity
  4. //
  5. // Created by Hank Zhang on 2020/2/20.
  6. // Copyright © 2020 Alibaba. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. /**
  12. NS_ENUM(NSInteger, RPTransitionStyle)
  13. 实人认证页面弹出风格
  14. */
  15. typedef NS_ENUM(NSInteger, RPTransitionStyle) {
  16. /**
  17. present
  18. */
  19. RPTransitionStylePresent = 0,
  20. /**
  21. push
  22. */
  23. RPTransitionStylePush,
  24. };
  25. /**
  26. `RPViewControllerHandler` 活体检测视图控制器回调。
  27. @param viewController 活体检测视图控制器。
  28. */
  29. typedef void (^RPViewControllerHandler)(UIViewController *viewController);
  30. /**
  31. `RPConfiguration` 实人认证配置
  32. */
  33. NS_SWIFT_NAME(RPConfiguration)
  34. @interface RPConfiguration : NSObject
  35. /**
  36. 自定义UI path
  37. */
  38. @property (nonatomic, copy) NSString *customUIPath;
  39. /**
  40. 是否默认关闭声音,默认开启声音。
  41. */
  42. @property (nonatomic, assign) BOOL isMutedByDefault;
  43. /**
  44. 是否在主动退出时弹窗确认,默认打开弹窗。
  45. */
  46. @property (nonatomic, assign) BOOL shouldAlertOnExit;
  47. /**
  48. 实人认证结束后是否恢复 webview 设置,默认恢复。
  49. */
  50. @property (nonatomic, assign) BOOL shouldRestoreWebview;
  51. /**
  52. 是否显示错误结果页
  53. */
  54. @property (nonatomic, assign) BOOL showErrorResultPage;
  55. /**
  56. 活体检测页面是否等待服务端认证结果,默认不等待。
  57. 此配置只适用于 native 接口,start 接口请在控制台配置。
  58. */
  59. @property (nonatomic, assign) BOOL shouldWaitResult DEPRECATED_MSG_ATTRIBUTE("v4.8.0 废弃,请及时删除, 默认等待服务端认证结果");
  60. /**
  61. 自定义活体检测页面展示方法。
  62. */
  63. @property (nonatomic, copy, nullable) RPViewControllerHandler presentHandler;
  64. /**
  65. 自定义活体检测页面消失方法。
  66. */
  67. @property (nonatomic, copy, nullable) RPViewControllerHandler dismissHandler;
  68. /**
  69. 页面弹出方式,默认为 present。 建议 present,如果你是 push 且支持横屏则需要在 nav 层控制实人的 VC 强制竖屏
  70. */
  71. @property (nonatomic, assign) RPTransitionStyle transitionStyle;
  72. /**
  73. 是否开启页面弹窗动画,默认开启动画。
  74. */
  75. @property (nonatomic, assign) BOOL isTransitionAnimationEnabled;
  76. /**
  77. 来源,一般来说接入方用不到, 不设置即可
  78. */
  79. @property (nonatomic, strong, nullable) NSString *fromSource;
  80. /**
  81. 实人认证默认配置
  82. @return 实人认证配置
  83. */
  84. + (instancetype)configuration;
  85. /**
  86. 请使用 [RPConfiguration configuration] 生成配置。
  87. @return 实人认证配置
  88. */
  89. - (instancetype)init NS_UNAVAILABLE;
  90. @end
  91. NS_ASSUME_NONNULL_END