├── .gitignore ├── .swift-version ├── GTFramework.framework ├── GTFramework ├── Headers │ ├── GTFramework.h │ ├── GTManager.h │ └── GTUtils.h ├── Info.plist ├── Modules │ └── module.modulemap └── _CodeSignature │ ├── CodeDirectory │ ├── CodeRequirements │ ├── CodeRequirements-1 │ ├── CodeResources │ ├── CodeSignature │ └── CodeTopDirectory ├── GTFramework_bitcode.framework ├── GTFramework ├── Headers │ ├── GTFramework.h │ ├── GTManager.h │ └── GTUtils.h ├── Info.plist ├── Modules │ └── module.modulemap └── _CodeSignature │ ├── CodeDirectory │ ├── CodeRequirements │ ├── CodeRequirements-1 │ ├── CodeResources │ ├── CodeSignature │ └── CodeTopDirectory ├── GeeTestSDK-OC.podspec ├── README.rst ├── geetest_ios_dev.rst ├── gt-iOS-sdk-failback -demo ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── GeeTestSDK-OC.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ └── Pods-TestGT │ │ ├── Info.plist │ │ ├── Pods-TestGT-acknowledgements.markdown │ │ ├── Pods-TestGT-acknowledgements.plist │ │ ├── Pods-TestGT-dummy.m │ │ ├── Pods-TestGT-frameworks.sh │ │ ├── Pods-TestGT-resources.sh │ │ ├── Pods-TestGT-umbrella.h │ │ ├── Pods-TestGT.debug.xcconfig │ │ ├── Pods-TestGT.modulemap │ │ └── Pods-TestGT.release.xcconfig ├── TestGT.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── TestGT.xcworkspace │ └── contents.xcworkspacedata ├── TestGT │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon_120.png │ │ │ ├── icon_152.png │ │ │ ├── icon_167.png │ │ │ ├── icon_180.png │ │ │ ├── icon_29.png │ │ │ ├── icon_40.png │ │ │ ├── icon_58.png │ │ │ ├── icon_76.png │ │ │ ├── icon_80.png │ │ │ └── icon_87.png │ │ ├── Contents.json │ │ └── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── LaunchImage1024768.png │ │ │ ├── LaunchImage12422208.png │ │ │ ├── LaunchImage15362028.png │ │ │ ├── LaunchImage20281536.png │ │ │ ├── LaunchImage22081242.png │ │ │ ├── LaunchImage6401136.png │ │ │ ├── LaunchImage640960.png │ │ │ ├── LaunchImage7501334.png │ │ │ └── LaunchImage7681024.png │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── TestGTTests │ ├── Info.plist │ └── TestGTTests.m └── TestGTUITests │ ├── Info.plist │ └── TestGTUITests.m ├── img ├── demo_0.png ├── demo_1.png ├── demo_2.png ├── geetest_flow.png ├── geetest_ios.png ├── indicator_custom_sample.png ├── indicator_default.png ├── indicator_system.png ├── mobile-info.png ├── question │ ├── question01_00.png │ ├── question02_00.png │ ├── question03_00.png │ ├── question04_00.png │ ├── question05_00.png │ ├── question05_01.png │ ├── question05_02.png │ ├── question06_00.png │ ├── question07_00.png │ ├── solution01_00.png │ ├── solution01_01.png │ └── solution02_00.png └── unit_test_0.png └── ios_question_and_answer.rst /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 2.3 2 | -------------------------------------------------------------------------------- /GTFramework.framework/GTFramework: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/GTFramework -------------------------------------------------------------------------------- /GTFramework.framework/Headers/GTFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTFramework.h 3 | // GTFramework 4 | // 5 | // Created by LYJ on 15/6/2. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for GTFramework. 12 | FOUNDATION_EXPORT double GTFrameworkVersionNumber; 13 | 14 | //! Project version string for GTFramework. 15 | FOUNDATION_EXPORT const unsigned char GTFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | 22 | -------------------------------------------------------------------------------- /GTFramework.framework/Headers/GTManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTManager.h 3 | // GTTest 4 | // 5 | // Created by LYJ on 15/5/14. 6 | // Copyright (c) 2015年 LYJ. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GTUtils.h" 11 | 12 | @protocol GTManageDelegate 13 | 14 | @required 15 | /** 16 | * 验证错误的处理方法 17 | * 主要捕捉网络错误和Json解析错误, 详见在线文档说明 18 | * https://github.com/GeeTeam/gtapp-ios-oc/blob/master/geetest_ios_dev.rst#id9 19 | * 20 | * @param error 错误源 21 | */ 22 | - (void)GTNetworkErrorHandler:(NSError *)error; 23 | 24 | @end 25 | 26 | /** 27 | * 验证管理器 28 | */ 29 | @interface GTManager : NSObject 30 | 31 | /** 32 | * 验证网络错误的代理 33 | */ 34 | @property (nonatomic, weak) id GTDelegate; 35 | 36 | /** 37 | * 验证的显示状态 38 | * 此属性告知验证是否在展示 39 | */ 40 | @property (nonatomic, assign) BOOL operated; 41 | 42 | /** 43 | * 第一次向网站主服务器API_1请求返回的cookie里的Session ID,仅在默认failback可用 44 | */ 45 | @property (nonatomic, strong) NSString *sessionID; 46 | 47 | /** 48 | * 验证背景颜色 49 | */ 50 | @property (nonatomic, strong) UIColor *backgroundColor; 51 | 52 | /** 53 | * 验证实例(单例) 54 | * 55 | * @return 单例 56 | */ 57 | + (instancetype)sharedGTManager; 58 | 59 | /** 60 | * @abstract 默认配置验证方法 61 | * 62 | * @discussion 63 | * 向CustomServer发送geetest验证请求,如果网站主服务器判断geetest服务可用,返回验证必要的数据,否则通过错误代理方法里给出错误信息。 64 | * 65 | * ❗️适合没有自己的灾难防备策略的网站主 66 | * 67 | * @seealso 68 | * ❗️此方法与 configureGTest:challenge:success: 方法二选一 69 | * 70 | * @param requestCustomServerForGTestURL 客户端向网站主服务端发起验证请求的链接(api_1) 71 | * @param timeoutInterval 超时间隔 72 | * @param name 网站主http cookie name的键名,用于获取sessionID,如果不需要可为nil 73 | * @param RequestType 请求的类型 74 | * @param handler 请求完成后的处理(主线程) 75 | * 76 | * @return 只有当网站主服务器可用时, 以block的形式返回以下数据 77 |
 78 |  {
 79 |  "gt_challenge" : "12ae1159ffdfcbbc306897e8d9bf6d06",
 80 |  "gt_captcha_id" : "ad872a4e1a51888967bdb7cb45589605",
 81 |  "gt_success_code" : 1
 82 |  }
 83 |  
84 | */ 85 | - (void)configureGTest:(NSURL *)customURL 86 | timeout:(NSTimeInterval)timeoutInterval 87 | withCookieName:(NSString *)name 88 | options:(DefaultRequestOptions)RequestType 89 | completionHandler:(GTDefaultCaptchaHandlerBlock)handler; 90 | 91 | /** 92 | * @abstract 取消异步请求。 93 | * 94 | * @discussion 95 | * 当希望取消正在执行的 Default Asynchronous Request时,调用此方法取消。 96 | * ❗️有且仅当使用默认异步请求可以调用该方法。 97 | */ 98 | - (void)cancelRequest; 99 | 100 | /** 101 | * @abstract 自定义配置验证方法 102 | * 103 | * @discussion 104 | * 当网站主使用自己的failback逻辑的时候使用此方法开启验证 105 | * 使用此方法之前,网站主必须在服务端测试geetest服务可用性然后通知客户端 106 | * 107 | * ❗️适合有自己灾难防备策略的网站主 108 | * 109 | * @seealso 110 | * ❗️此方法与方法 configureGTest:timeoutInterval:withHTTPCookieName:options:completionHandler:二选一 111 | * 112 | * @param captcha_id 在官网申请的captcha_id 113 | * @param gt_challenge 根据极验服务器sdk生成的challenge 114 | * @param success 网站主服务器监测geetest服务的可用状态 0/1 不可用/可用 115 | * 116 | * @return YES配置成功,NO配置失败 117 | */ 118 | - (BOOL)configureGTest:(NSString *)captcha_id 119 | challenge:(NSString *)gt_challenge 120 | success:(NSNumber *)successCode; 121 | 122 | /** 123 | * ❗️必要方法❗️ 124 | * @abstract 展示验证 125 | * 126 | * @discussion 127 | * 实现方式 直接在 keyWindow 上添加遮罩视图、极验验证的UIWebView视图 128 | * 极验验证UIWebView通过JS与SDK通信 129 | * 130 | * @param finish 验证返回后的处理(非主线程) 131 | * @param close 关闭验证的处理(非主线程) 132 | * @param animated 开启验证的动画 133 | */ 134 | - (void)openGTViewAddFinishHandler:(GTCallFinishBlock)finish 135 | closeHandler:(GTCallCloseBlock)close 136 | animated:(BOOL)animated; 137 | 138 | /** 139 | * (非必要方法) 140 | * @abstract 只使用id配置验证 141 | * 142 | * @discussion 143 | * 测试用户端与极验服务连接是否畅通可用,如果直接使用此方法来判断是否开启验证,则会导致当极验验证动态服务器宕机的情况下无法正常进行极验验证。 144 | * ❗️此方法仅允许在debugMode可用,用于测试 145 | * 146 | * @param captcha_id 分配的captcha_id 147 | * 148 | * @return YES则服务可用;NO则客户端与geetest服务端之间连接不通畅 149 | */ 150 | - (BOOL)serverStatusWithCaptcha_id:(NSString *)captcha_id; 151 | 152 | /** 153 | * 若验证显示则关闭验证界面 154 | */ 155 | - (void)closeGTViewIfIsOpen; 156 | 157 | /** 158 | * (非必要方法) 159 | * @abstract 配置状态指示器 160 | * 161 | * @discussion 162 | * 为了能方便的调试动画,真机调试模拟低速网络 Settings->Developer->Status->Enable->Edge(E网,2.5G😂) 163 | * 164 | * @param animationBlock 自定义时需要实现的动画block,仅在type配置为GTIndicatorCustomType时才执行 165 | * @param type 状态指示器的类型 166 | */ 167 | - (void)configureAnimatedAcitvityIndicator:(GTIndicatorAnimationViewBlock)animationBlock 168 | withIndicatorType:(ActivityIndicatorType)type; 169 | 170 | /** 171 | * (非必要方法) 172 | * @abstract 使用HTTPS协议请求验证 173 | * 174 | * @discussion 175 | * 默认不开启 176 | * 177 | * @param secured 是否需要https支持 178 | */ 179 | - (void)useSecurityAuthentication:(BOOL)secured; 180 | 181 | /** 182 | * @abstract 配置背景模糊 183 | * 184 | * @discussion 185 | * iOS8以上生效 186 | * 187 | * @param blurEffect 模糊特效 188 | */ 189 | - (void)useVisualViewWithEffect:(UIBlurEffect *)blurEffect; 190 | 191 | /** 192 | * (非必要方法) 193 | * @abstract 验证标题 194 | * 195 | * @discussion 196 | * 默认不开启. 字符长度不能超过28, 一个中文字符为两个2字符长度. 197 | * 198 | * @param title 验证标题字符串 199 | */ 200 | - (void)useGTViewWithTitle:(NSString *)title; 201 | 202 | /** 203 | * (非必要方法) 204 | * @abstract 验证展示方式 205 | * 206 | * @discussion 207 | * 默认居中展示 GTPopupCenterType 208 | * 209 | * @see GTPresentType 210 | * 211 | * @param type 布局类型 212 | */ 213 | - (void)useGTViewWithPresentType:(GTPresentType)type; 214 | 215 | /** 216 | * @abstract 验证高度约束 217 | * 218 | * @discussion 219 | * iOS8以下默认GTViewHeightConstraintDefault, iOS9以上自动适配验证高度, 不受此方法约束 220 | * 221 | * @param type 高度约束类型 222 | */ 223 | - (void)useGTViewWithHeightConstraintType:(GTViewHeightConstraintType)type; 224 | 225 | /** 226 | * @abstract 验证背景交互事件的开关 227 | * 228 | * @discussion 默认关闭 229 | * 230 | * @param disable YES忽略交互事件/NO接受交互事件 231 | */ 232 | - (void)disableBackgroundUserInteraction:(BOOL)disable; 233 | 234 | /** 235 | * (非必要方法) 236 | * @abstract 切换验证语言 237 | * 238 | * @discussion 239 | * 默认中文 240 | * 241 | * @param Type 语言类型 242 | */ 243 | - (void)languageSwitch:(LanguageType)Type; 244 | 245 | /** 246 | * (非必要方法) 247 | * @abstract Debug Mode 248 | * 249 | * @discussion 250 | * 开启debugMode,在开启验证之前调用此方法 251 | * 默认不开启 252 | * 253 | * @param debugEnable YES开启,NO关闭 254 | */ 255 | - (void)enableDebugMode:(BOOL)debugEnable; 256 | 257 | @end 258 | -------------------------------------------------------------------------------- /GTFramework.framework/Headers/GTUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTUtils.h 3 | // GTFramework 4 | // 5 | // Created by LYJ on 15/5/18. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #ifndef GTFramework_GTUtils_h 10 | #define GTFramework_GTUtils_h 11 | 12 | #import 13 | 14 | /** 15 | * 默认failback请求类型选项 16 | */ 17 | typedef NS_ENUM(NSInteger, DefaultRequestOptions) { 18 | /** Send Synchronous Request */ 19 | GTDefaultSynchronousRequest = 0, 20 | /** Send Asynchronous Request */ 21 | GTDefaultAsynchronousRequest 22 | }; 23 | 24 | /** 25 | * 展示方式 26 | */ 27 | typedef NS_ENUM(NSInteger, GTPresentType) { 28 | /** Popup on the center of screen. Default. */ 29 | GTPopupCenterType = 0, 30 | /** 31 | * @abstract Popup on the bottom of screen. Portrait ONLY. 32 | * 33 | * @discussion Close geetest if opened when detect the device orientated. You should open geetest again manually because of the Challenge can't be used twice in the same session. 34 | */ 35 | GTPopupBottomType 36 | }; 37 | 38 | /** 39 | * 高度约束类型 40 | */ 41 | typedef NS_ENUM(NSInteger, GTViewHeightConstraintType) { 42 | /** Default Type */ 43 | GTViewHeightConstraintDefault, 44 | /** Small View With Logo*/ 45 | GTViewHeightConstraintSmallViewWithLogo, 46 | /** Small View With No Logo */ 47 | GTViewHeightConstraintSmallViewWithNoLogo, 48 | /** Large View With Logo */ 49 | GTViewHeightConstraintLargeViewWithLogo, 50 | /** Large View With No Logo */ 51 | GTViewHeightConstraintLargeViewWithNoLogo 52 | }; 53 | 54 | /** 55 | * 语言选项 56 | */ 57 | typedef NS_ENUM(NSInteger, LanguageType) { 58 | /** Simplified Chinese */ 59 | LANGTYPE_ZH_CN = 0, 60 | /** Traditional Chinese */ 61 | LANGTYPE_ZH_TW, 62 | /** Traditional Chinese */ 63 | LANGTYPE_ZH_HK, 64 | /** Korean */ 65 | LANGTYPE_KO_KR, 66 | /** Japenese */ 67 | LANGTYPE_JA_JP, 68 | /** English */ 69 | LANGTYPE_EN_US, 70 | /** System language*/ 71 | LANGTYPE_AUTO 72 | }; 73 | 74 | /** 75 | * 活动指示器类型 76 | */ 77 | typedef NS_ENUM(NSInteger, ActivityIndicatorType) { 78 | /** System Indicator Type */ 79 | GTIndicatorSystemType = 0, 80 | /** Geetest Defualt Indicator Type */ 81 | GTIndicatorDefaultType, 82 | /** Custom Indicator Type */ 83 | GTIndicatorCustomType, 84 | }; 85 | 86 | /** 87 | * 默认验证处理block 88 | * 89 | * @param gt_captcha_id 用于验证的captcha_id 90 | * @param gt_challenge 验证的流水号 91 | * @param gt_success_code 网站主侦测到极验服务器的状态 92 | */ 93 | typedef void(^GTDefaultCaptchaHandlerBlock)(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code); 94 | 95 | /** 96 | * 自定义状态指示器的动画实现block 97 | * 98 | * @param layer 状态指示器视图的layer 99 | * @param size layer的大小,默认 {64, 64} 100 | * @param color layer的颜色,默认 蓝色 [UIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:1] 101 | */ 102 | typedef void(^GTIndicatorAnimationViewBlock)(CALayer *layer, CGSize size, UIColor *color); 103 | 104 | /** 105 | * 验证完成回调 106 | * 107 | * @param code 验证结果 1 成功/ 其他 失败 108 | * @param result 返回二次验证所需数据 109 | { 110 | "geetest_challenge": "5a8c21e206f5f7ba4fa630acf269d0ec4z", 111 | "geetest_validate": "f0f541006215ac784859e29ec23d5b97", 112 | "geetest_seccode": "f0f541006215ac784859e29ec23d5b97|jordan" 113 | } 114 | * @param message 验证结果信息 (sucess/fail) 115 | */ 116 | typedef void(^GTCallFinishBlock)(NSString *code, NSDictionary *result, NSString *message); 117 | 118 | /** 119 | * 关闭验证回调 120 | */ 121 | typedef void(^GTCallCloseBlock)(void); 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /GTFramework.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/Info.plist -------------------------------------------------------------------------------- /GTFramework.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GTFramework { 2 | umbrella header "GTFramework.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/GTFramework.h 8 | 9 | JQr1ptM0U6ctZ50YTTi9gPTZ7Ac= 10 | 11 | Headers/GTManager.h 12 | 13 | JTWNPovOVIe/bAadbGzL0sYIAfw= 14 | 15 | Headers/GTUtils.h 16 | 17 | jmevG208qmwP2rsJaKhSLGFvrg0= 18 | 19 | Info.plist 20 | 21 | DHxkO+BHTRnivrzTEoW9BOm82zk= 22 | 23 | Modules/module.modulemap 24 | 25 | i2dZ3d3VGODYXNzEJQybM3Ac8+E= 26 | 27 | 28 | files2 29 | 30 | Headers/GTFramework.h 31 | 32 | hash 33 | 34 | JQr1ptM0U6ctZ50YTTi9gPTZ7Ac= 35 | 36 | hash2 37 | 38 | Om0AQpDtYgCektacIaxJJjdxnECy7NXQQqb3lCbrDRQ= 39 | 40 | 41 | Headers/GTManager.h 42 | 43 | hash 44 | 45 | JTWNPovOVIe/bAadbGzL0sYIAfw= 46 | 47 | hash2 48 | 49 | 6hMEvc6LG5HVvpOaT57eKFeSQUaA8tB4Z9I4CMK5x6A= 50 | 51 | 52 | Headers/GTUtils.h 53 | 54 | hash 55 | 56 | jmevG208qmwP2rsJaKhSLGFvrg0= 57 | 58 | hash2 59 | 60 | xPTG4SdVPbqZ1EaZjR8MxQYPhWF5SA9toiA/0WCymNQ= 61 | 62 | 63 | Modules/module.modulemap 64 | 65 | hash 66 | 67 | i2dZ3d3VGODYXNzEJQybM3Ac8+E= 68 | 69 | hash2 70 | 71 | 8GKrsgmd4uX/H6tlDgIT632eok91R0ockoOp4gvwN/o= 72 | 73 | 74 | 75 | rules 76 | 77 | ^ 78 | 79 | ^.*\.lproj/ 80 | 81 | optional 82 | 83 | weight 84 | 1000 85 | 86 | ^.*\.lproj/locversion.plist$ 87 | 88 | omit 89 | 90 | weight 91 | 1100 92 | 93 | ^version.plist$ 94 | 95 | 96 | rules2 97 | 98 | .*\.dSYM($|/) 99 | 100 | weight 101 | 11 102 | 103 | ^ 104 | 105 | weight 106 | 20 107 | 108 | ^(.*/)?\.DS_Store$ 109 | 110 | omit 111 | 112 | weight 113 | 2000 114 | 115 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 116 | 117 | nested 118 | 119 | weight 120 | 10 121 | 122 | ^.* 123 | 124 | ^.*\.lproj/ 125 | 126 | optional 127 | 128 | weight 129 | 1000 130 | 131 | ^.*\.lproj/locversion.plist$ 132 | 133 | omit 134 | 135 | weight 136 | 1100 137 | 138 | ^Info\.plist$ 139 | 140 | omit 141 | 142 | weight 143 | 20 144 | 145 | ^PkgInfo$ 146 | 147 | omit 148 | 149 | weight 150 | 20 151 | 152 | ^[^/]+$ 153 | 154 | nested 155 | 156 | weight 157 | 10 158 | 159 | ^embedded\.provisionprofile$ 160 | 161 | weight 162 | 20 163 | 164 | ^version\.plist$ 165 | 166 | weight 167 | 20 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework.framework/_CodeSignature/CodeSignature -------------------------------------------------------------------------------- /GTFramework.framework/_CodeSignature/CodeTopDirectory: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/GTFramework: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/GTFramework -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/Headers/GTFramework.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTFramework.h 3 | // GTFramework 4 | // 5 | // Created by LYJ on 15/6/2. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for GTFramework. 12 | FOUNDATION_EXPORT double GTFrameworkVersionNumber; 13 | 14 | //! Project version string for GTFramework. 15 | FOUNDATION_EXPORT const unsigned char GTFrameworkVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | 22 | -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/Headers/GTManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTManager.h 3 | // GTTest 4 | // 5 | // Created by LYJ on 15/5/14. 6 | // Copyright (c) 2015年 LYJ. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GTUtils.h" 11 | 12 | @protocol GTManageDelegate 13 | 14 | @required 15 | /** 16 | * 验证错误的处理方法 17 | * 主要捕捉网络错误和Json解析错误, 详见在线文档说明 18 | * https://github.com/GeeTeam/gtapp-ios-oc/blob/master/geetest_ios_dev.rst#id9 19 | * 20 | * @param error 错误源 21 | */ 22 | - (void)GTNetworkErrorHandler:(NSError *)error; 23 | 24 | @end 25 | 26 | /** 27 | * 验证管理器 28 | */ 29 | @interface GTManager : NSObject 30 | 31 | /** 32 | * 验证网络错误的代理 33 | */ 34 | @property (nonatomic, weak) id GTDelegate; 35 | 36 | /** 37 | * 验证的显示状态 38 | * 此属性告知验证是否在展示 39 | */ 40 | @property (nonatomic, assign) BOOL operated; 41 | 42 | /** 43 | * 第一次向网站主服务器API_1请求返回的cookie里的Session ID,仅在默认failback可用 44 | */ 45 | @property (nonatomic, strong) NSString *sessionID; 46 | 47 | /** 48 | * 验证背景颜色 49 | */ 50 | @property (nonatomic, strong) UIColor *backgroundColor; 51 | 52 | /** 53 | * 验证实例(单例) 54 | * 55 | * @return 单例 56 | */ 57 | + (instancetype)sharedGTManager; 58 | 59 | /** 60 | * @abstract 默认配置验证方法 61 | * 62 | * @discussion 63 | * 向CustomServer发送geetest验证请求,如果网站主服务器判断geetest服务可用,返回验证必要的数据,否则通过错误代理方法里给出错误信息。 64 | * 65 | * ❗️适合没有自己的灾难防备策略的网站主 66 | * 67 | * @seealso 68 | * ❗️此方法与 configureGTest:challenge:success: 方法二选一 69 | * 70 | * @param requestCustomServerForGTestURL 客户端向网站主服务端发起验证请求的链接(api_1) 71 | * @param timeoutInterval 超时间隔 72 | * @param name 网站主http cookie name的键名,用于获取sessionID,如果不需要可为nil 73 | * @param RequestType 请求的类型 74 | * @param handler 请求完成后的处理(主线程) 75 | * 76 | * @return 只有当网站主服务器可用时, 以block的形式返回以下数据 77 |
 78 |  {
 79 |  "gt_challenge" : "12ae1159ffdfcbbc306897e8d9bf6d06",
 80 |  "gt_captcha_id" : "ad872a4e1a51888967bdb7cb45589605",
 81 |  "gt_success_code" : 1
 82 |  }
 83 |  
84 | */ 85 | - (void)configureGTest:(NSURL *)customURL 86 | timeout:(NSTimeInterval)timeoutInterval 87 | withCookieName:(NSString *)name 88 | options:(DefaultRequestOptions)RequestType 89 | completionHandler:(GTDefaultCaptchaHandlerBlock)handler; 90 | 91 | /** 92 | * @abstract 取消异步请求。 93 | * 94 | * @discussion 95 | * 当希望取消正在执行的 Default Asynchronous Request时,调用此方法取消。 96 | * ❗️有且仅当使用默认异步请求可以调用该方法。 97 | */ 98 | - (void)cancelRequest; 99 | 100 | /** 101 | * @abstract 自定义配置验证方法 102 | * 103 | * @discussion 104 | * 当网站主使用自己的failback逻辑的时候使用此方法开启验证 105 | * 使用此方法之前,网站主必须在服务端测试geetest服务可用性然后通知客户端 106 | * 107 | * ❗️适合有自己灾难防备策略的网站主 108 | * 109 | * @seealso 110 | * ❗️此方法与方法 configureGTest:timeoutInterval:withHTTPCookieName:options:completionHandler:二选一 111 | * 112 | * @param captcha_id 在官网申请的captcha_id 113 | * @param gt_challenge 根据极验服务器sdk生成的challenge 114 | * @param success 网站主服务器监测geetest服务的可用状态 0/1 不可用/可用 115 | * 116 | * @return YES配置成功,NO配置失败 117 | */ 118 | - (BOOL)configureGTest:(NSString *)captcha_id 119 | challenge:(NSString *)gt_challenge 120 | success:(NSNumber *)successCode; 121 | 122 | /** 123 | * ❗️必要方法❗️ 124 | * @abstract 展示验证 125 | * 126 | * @discussion 127 | * 实现方式 直接在 keyWindow 上添加遮罩视图、极验验证的UIWebView视图 128 | * 极验验证UIWebView通过JS与SDK通信 129 | * 130 | * @param finish 验证返回后的处理(非主线程) 131 | * @param close 关闭验证的处理(非主线程) 132 | * @param animated 开启验证的动画 133 | */ 134 | - (void)openGTViewAddFinishHandler:(GTCallFinishBlock)finish 135 | closeHandler:(GTCallCloseBlock)close 136 | animated:(BOOL)animated; 137 | 138 | /** 139 | * (非必要方法) 140 | * @abstract 只使用id配置验证 141 | * 142 | * @discussion 143 | * 测试用户端与极验服务连接是否畅通可用,如果直接使用此方法来判断是否开启验证,则会导致当极验验证动态服务器宕机的情况下无法正常进行极验验证。 144 | * ❗️此方法仅允许在debugMode可用,用于测试 145 | * 146 | * @param captcha_id 分配的captcha_id 147 | * 148 | * @return YES则服务可用;NO则客户端与geetest服务端之间连接不通畅 149 | */ 150 | - (BOOL)serverStatusWithCaptcha_id:(NSString *)captcha_id; 151 | 152 | /** 153 | * 若验证显示则关闭验证界面 154 | */ 155 | - (void)closeGTViewIfIsOpen; 156 | 157 | /** 158 | * (非必要方法) 159 | * @abstract 配置状态指示器 160 | * 161 | * @discussion 162 | * 为了能方便的调试动画,真机调试模拟低速网络 Settings->Developer->Status->Enable->Edge(E网,2.5G😂) 163 | * 164 | * @param animationBlock 自定义时需要实现的动画block,仅在type配置为GTIndicatorCustomType时才执行 165 | * @param type 状态指示器的类型 166 | */ 167 | - (void)configureAnimatedAcitvityIndicator:(GTIndicatorAnimationViewBlock)animationBlock 168 | withIndicatorType:(ActivityIndicatorType)type; 169 | 170 | /** 171 | * (非必要方法) 172 | * @abstract 使用HTTPS协议请求验证 173 | * 174 | * @discussion 175 | * 默认不开启 176 | * 177 | * @param secured 是否需要https支持 178 | */ 179 | - (void)useSecurityAuthentication:(BOOL)secured; 180 | 181 | /** 182 | * @abstract 配置背景模糊 183 | * 184 | * @discussion 185 | * iOS8以上生效 186 | * 187 | * @param blurEffect 模糊特效 188 | */ 189 | - (void)useVisualViewWithEffect:(UIBlurEffect *)blurEffect; 190 | 191 | /** 192 | * (非必要方法) 193 | * @abstract 验证标题 194 | * 195 | * @discussion 196 | * 默认不开启. 字符长度不能超过28, 一个中文字符为两个2字符长度. 197 | * 198 | * @param title 验证标题字符串 199 | */ 200 | - (void)useGTViewWithTitle:(NSString *)title; 201 | 202 | /** 203 | * (非必要方法) 204 | * @abstract 验证展示方式 205 | * 206 | * @discussion 207 | * 默认居中展示 GTPopupCenterType 208 | * 209 | * @see GTPresentType 210 | * 211 | * @param type 布局类型 212 | */ 213 | - (void)useGTViewWithPresentType:(GTPresentType)type; 214 | 215 | /** 216 | * @abstract 验证高度约束 217 | * 218 | * @discussion 219 | * iOS8以下默认GTViewHeightConstraintDefault, iOS9以上自动适配验证高度, 不受此方法约束 220 | * 221 | * @param type 高度约束类型 222 | */ 223 | - (void)useGTViewWithHeightConstraintType:(GTViewHeightConstraintType)type; 224 | 225 | /** 226 | * @abstract 验证背景交互事件的开关 227 | * 228 | * @discussion 默认关闭 229 | * 230 | * @param disable YES忽略交互事件/NO接受交互事件 231 | */ 232 | - (void)disableBackgroundUserInteraction:(BOOL)disable; 233 | 234 | /** 235 | * (非必要方法) 236 | * @abstract 切换验证语言 237 | * 238 | * @discussion 239 | * 默认中文 240 | * 241 | * @param Type 语言类型 242 | */ 243 | - (void)languageSwitch:(LanguageType)Type; 244 | 245 | /** 246 | * (非必要方法) 247 | * @abstract Debug Mode 248 | * 249 | * @discussion 250 | * 开启debugMode,在开启验证之前调用此方法 251 | * 默认不开启 252 | * 253 | * @param debugEnable YES开启,NO关闭 254 | */ 255 | - (void)enableDebugMode:(BOOL)debugEnable; 256 | 257 | @end 258 | -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/Headers/GTUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTUtils.h 3 | // GTFramework 4 | // 5 | // Created by LYJ on 15/5/18. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #ifndef GTFramework_GTUtils_h 10 | #define GTFramework_GTUtils_h 11 | 12 | #import 13 | 14 | /** 15 | * 默认failback请求类型选项 16 | */ 17 | typedef NS_ENUM(NSInteger, DefaultRequestOptions) { 18 | /** Send Synchronous Request */ 19 | GTDefaultSynchronousRequest = 0, 20 | /** Send Asynchronous Request */ 21 | GTDefaultAsynchronousRequest 22 | }; 23 | 24 | /** 25 | * 展示方式 26 | */ 27 | typedef NS_ENUM(NSInteger, GTPresentType) { 28 | /** Popup on the center of screen. Default. */ 29 | GTPopupCenterType = 0, 30 | /** 31 | * @abstract Popup on the bottom of screen. Portrait ONLY. 32 | * 33 | * @discussion Close geetest if opened when detect the device orientated. You should open geetest again manually because of the Challenge can't be used twice in the same session. 34 | */ 35 | GTPopupBottomType 36 | }; 37 | 38 | /** 39 | * 高度约束类型 40 | */ 41 | typedef NS_ENUM(NSInteger, GTViewHeightConstraintType) { 42 | /** Default Type */ 43 | GTViewHeightConstraintDefault, 44 | /** Small View With Logo*/ 45 | GTViewHeightConstraintSmallViewWithLogo, 46 | /** Small View With No Logo */ 47 | GTViewHeightConstraintSmallViewWithNoLogo, 48 | /** Large View With Logo */ 49 | GTViewHeightConstraintLargeViewWithLogo, 50 | /** Large View With No Logo */ 51 | GTViewHeightConstraintLargeViewWithNoLogo 52 | }; 53 | 54 | /** 55 | * 语言选项 56 | */ 57 | typedef NS_ENUM(NSInteger, LanguageType) { 58 | /** Simplified Chinese */ 59 | LANGTYPE_ZH_CN = 0, 60 | /** Traditional Chinese */ 61 | LANGTYPE_ZH_TW, 62 | /** Traditional Chinese */ 63 | LANGTYPE_ZH_HK, 64 | /** Korean */ 65 | LANGTYPE_KO_KR, 66 | /** Japenese */ 67 | LANGTYPE_JA_JP, 68 | /** English */ 69 | LANGTYPE_EN_US, 70 | /** System language*/ 71 | LANGTYPE_AUTO 72 | }; 73 | 74 | /** 75 | * 活动指示器类型 76 | */ 77 | typedef NS_ENUM(NSInteger, ActivityIndicatorType) { 78 | /** System Indicator Type */ 79 | GTIndicatorSystemType = 0, 80 | /** Geetest Defualt Indicator Type */ 81 | GTIndicatorDefaultType, 82 | /** Custom Indicator Type */ 83 | GTIndicatorCustomType, 84 | }; 85 | 86 | /** 87 | * 默认验证处理block 88 | * 89 | * @param gt_captcha_id 用于验证的captcha_id 90 | * @param gt_challenge 验证的流水号 91 | * @param gt_success_code 网站主侦测到极验服务器的状态 92 | */ 93 | typedef void(^GTDefaultCaptchaHandlerBlock)(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code); 94 | 95 | /** 96 | * 自定义状态指示器的动画实现block 97 | * 98 | * @param layer 状态指示器视图的layer 99 | * @param size layer的大小,默认 {64, 64} 100 | * @param color layer的颜色,默认 蓝色 [UIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:1] 101 | */ 102 | typedef void(^GTIndicatorAnimationViewBlock)(CALayer *layer, CGSize size, UIColor *color); 103 | 104 | /** 105 | * 验证完成回调 106 | * 107 | * @param code 验证结果 1 成功/ 其他 失败 108 | * @param result 返回二次验证所需数据 109 | { 110 | "geetest_challenge": "5a8c21e206f5f7ba4fa630acf269d0ec4z", 111 | "geetest_validate": "f0f541006215ac784859e29ec23d5b97", 112 | "geetest_seccode": "f0f541006215ac784859e29ec23d5b97|jordan" 113 | } 114 | * @param message 验证结果信息 (sucess/fail) 115 | */ 116 | typedef void(^GTCallFinishBlock)(NSString *code, NSDictionary *result, NSString *message); 117 | 118 | /** 119 | * 关闭验证回调 120 | */ 121 | typedef void(^GTCallCloseBlock)(void); 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/Info.plist -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GTFramework { 2 | umbrella header "GTFramework.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeDirectory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/_CodeSignature/CodeDirectory -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeRequirements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/_CodeSignature/CodeRequirements -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeRequirements-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/_CodeSignature/CodeRequirements-1 -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/GTFramework.h 8 | 9 | JQr1ptM0U6ctZ50YTTi9gPTZ7Ac= 10 | 11 | Headers/GTManager.h 12 | 13 | JTWNPovOVIe/bAadbGzL0sYIAfw= 14 | 15 | Headers/GTUtils.h 16 | 17 | jmevG208qmwP2rsJaKhSLGFvrg0= 18 | 19 | Info.plist 20 | 21 | DHxkO+BHTRnivrzTEoW9BOm82zk= 22 | 23 | Modules/module.modulemap 24 | 25 | i2dZ3d3VGODYXNzEJQybM3Ac8+E= 26 | 27 | 28 | files2 29 | 30 | Headers/GTFramework.h 31 | 32 | hash 33 | 34 | JQr1ptM0U6ctZ50YTTi9gPTZ7Ac= 35 | 36 | hash2 37 | 38 | Om0AQpDtYgCektacIaxJJjdxnECy7NXQQqb3lCbrDRQ= 39 | 40 | 41 | Headers/GTManager.h 42 | 43 | hash 44 | 45 | JTWNPovOVIe/bAadbGzL0sYIAfw= 46 | 47 | hash2 48 | 49 | 6hMEvc6LG5HVvpOaT57eKFeSQUaA8tB4Z9I4CMK5x6A= 50 | 51 | 52 | Headers/GTUtils.h 53 | 54 | hash 55 | 56 | jmevG208qmwP2rsJaKhSLGFvrg0= 57 | 58 | hash2 59 | 60 | xPTG4SdVPbqZ1EaZjR8MxQYPhWF5SA9toiA/0WCymNQ= 61 | 62 | 63 | Modules/module.modulemap 64 | 65 | hash 66 | 67 | i2dZ3d3VGODYXNzEJQybM3Ac8+E= 68 | 69 | hash2 70 | 71 | 8GKrsgmd4uX/H6tlDgIT632eok91R0ockoOp4gvwN/o= 72 | 73 | 74 | 75 | rules 76 | 77 | ^ 78 | 79 | ^.*\.lproj/ 80 | 81 | optional 82 | 83 | weight 84 | 1000 85 | 86 | ^.*\.lproj/locversion.plist$ 87 | 88 | omit 89 | 90 | weight 91 | 1100 92 | 93 | ^version.plist$ 94 | 95 | 96 | rules2 97 | 98 | .*\.dSYM($|/) 99 | 100 | weight 101 | 11 102 | 103 | ^ 104 | 105 | weight 106 | 20 107 | 108 | ^(.*/)?\.DS_Store$ 109 | 110 | omit 111 | 112 | weight 113 | 2000 114 | 115 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 116 | 117 | nested 118 | 119 | weight 120 | 10 121 | 122 | ^.* 123 | 124 | ^.*\.lproj/ 125 | 126 | optional 127 | 128 | weight 129 | 1000 130 | 131 | ^.*\.lproj/locversion.plist$ 132 | 133 | omit 134 | 135 | weight 136 | 1100 137 | 138 | ^Info\.plist$ 139 | 140 | omit 141 | 142 | weight 143 | 20 144 | 145 | ^PkgInfo$ 146 | 147 | omit 148 | 149 | weight 150 | 20 151 | 152 | ^[^/]+$ 153 | 154 | nested 155 | 156 | weight 157 | 10 158 | 159 | ^embedded\.provisionprofile$ 160 | 161 | weight 162 | 20 163 | 164 | ^version\.plist$ 165 | 166 | weight 167 | 20 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeSignature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/GTFramework_bitcode.framework/_CodeSignature/CodeSignature -------------------------------------------------------------------------------- /GTFramework_bitcode.framework/_CodeSignature/CodeTopDirectory: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /GeeTestSDK-OC.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint gtapp-ios-oc.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'GeeTestSDK-OC' 11 | s.version = '2.16.9.21.1' 12 | s.summary = 'GeeTestSDK for iOS.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | GeeTestSDK for iOS platform. 22 | DESC 23 | 24 | s.homepage = 'http://www.geetest.com/' 25 | s.license = { :type => "Copyright", :text => "武汉极意网络科技有限公司 版权所有." } 26 | s.author = { "GeeTeam" => "http://www.geetest.com/" } 27 | s.source = { :git => 'https://github.com/GeeTeam/gtapp-ios-oc.git', :tag => s.version.to_s } 28 | # s.social_media_url = 'https://twitter.com/' 29 | 30 | s.ios.deployment_target = '7.0' 31 | s.requires_arc = true 32 | 33 | s.frameworks = 'WebKit' 34 | 35 | s.default_subspec = 'Core' 36 | s.subspec "Core" do |core| 37 | core.vendored_frameworks = 'GTFramework.framework' 38 | end 39 | s.subspec "Bitcode" do |bitcode| 40 | bitcode.vendored_frameworks = 'GTFramework_bitcode.framework' 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | 2 | ================================================ 3 | gtapp-ios-oc 4 | ================================================ 5 | 6 | 为了方便第三方开发者快速集成 极验验证 SDK,我们提供了以下联系方式,协助开发者进行集成。 7 | 8 | QQ群: 487868018 (iOS) 请注明验证信息 9 | 10 | 关于SDK的Bug反馈、用户体验、以及好的建议可以在Github或QQ群提交给我们,我们会讨论合理性后会尽快跟进。 11 | 12 | .. contents:: 目录 13 | .. sectnum:: 14 | 15 | Screenshot 16 | ================================================ 17 | .. image:: img/demo_0.png 18 | 19 | .. image:: img/demo_1.png 20 | 21 | .. image:: img/demo_2.png 22 | 23 | Outline 24 | ================================================ 25 | 26 | 主要层次: 27 | --------------------------------------------------------------------- 28 | 29 | 验证主要分为三个部分: 30 | 1. 从网站主服务器 获取所需的验证数据 (id,challenge,success) 31 | 2. 核心验证过程 32 | 3. 根据验证回调数据在网站主服务器进行二次验证 33 | 34 | 其中: 35 | --------------------------------------------------------------------- 36 | 37 | iOS SDK 主要完成过程: 38 | 1. 给出默认的failback机制 获取所需的验证数据 (网站主也可以根据自己的服务器配置以及需求完成此过程,但必须保持通讯流程完整) 39 | 2. 完成核心验证过程 40 | 41 | demo 演示完成的部分 42 | 1. 二次验证不是由sdk完成,而是网站主自己根据demo的逻辑以及网站主的服务器配置来完成这一块的部署 43 | 44 | Requirement 45 | ================================================ 46 | 47 | 1. ios 7.0 + 48 | 2. xcode 6.0 + 49 | 3. arc 50 | 4. webkit.framework 51 | 52 | Version 53 | ================================================ 54 | 55 | Description 56 | --------------------------------------------------------------------- 57 | 58 | 1. 需要配合极验的服务端sdk一同使用. [*require geetest server sdk*] 59 | 2. 请认真查阅开发者文档,支持iOS7以上. [*please read developer doc, and support iOS7+*] 60 | #. 在gtapp-ios-oc项目下版本号为2.15.8.*之后的版本,现在持续更新和维护中。[*The latest one has the failback feature (version 2.15.8.* +). We had stopped to develop the old version. So we recommend you to use the failback version.*] 61 | #. failback版本在项目路径的‘gt-iOS-sdk-failback -demo’下。[*the failback version in the file 'gt-iOS-sdk-failback -demo'*] 62 | #. 2.16.3.10.1 版本之后需要导入webkit.framework, 添加了对wkwebview的支持。 63 | #. 详细开发文档查看根目录下的开发者文档。[*get more information in demo files*] 64 | #. 常见问题查看根目录下的q&a文件。 65 | 66 | 67 | History 68 | --------------------------------------------------------------------- 69 | 70 | 1. 2.15.12.30.1 对svg支持,动态获取验证高度,适配新ui 71 | 2. 2.16.1.20.1 添加对https、localization支持,增加对状态指示器自定义 72 | 3. 2.16.3.10.1 优化图层结构,优化性能表现,iOS8以上基于wkwebview,表现更稳定 73 | 4. 2.16.6.8.1 完善功能,修复bug 74 | 75 | UnitTest 76 | --------------------------------------------------------------------- 77 | 78 | .. image:: img/unit_test_0.png 79 | 80 | Failback 81 | --------------------------------------------------------------------- 82 | 83 | 1. 2.15. 5.x : no failback version 84 | #. 2.15. 8.x - current : failback version 85 | 86 | About gtapp-ios-oc 87 | ================================================ 88 | 89 | 1. GTFramework 极验验证iOS版本的SDK,生成一个基于i386、x86_64、armv7、 armv7s、arm64的framework,支持iOS7.0+。开发使用的Xcode版本为Xcode 7.0。[*build on i386、x86_64、armv7、 armv7s、arm64, and support iOS7+*] 90 | #. gt-iOS-sdk-demo 调用sdk的演示app程序。 [*use demo to know more about GTFramework*] 91 | #. 演示项目提供了完整的一次验证,并将客户端验证结果向示例的客户服务器上发起二次验证的完整通讯过程。[*in the demo, we provide a networking flow completely*] 92 | #. 不依赖任何第三方库,demo里的代码可根据网站主项目需要自行修改。[*you can change what you want in the demo*] 93 | #. 如果使用failback版本的请下看项目路径下‘gt-iOS-sdk-failback -demo’ [*the failback version in the file 'gt-iOS-sdk-failback -demo'*] 94 | 95 | How to use GTFramework, run the demo first 96 | ================================================ 97 | 98 | 自建项目引用 99 | 假设用户自建项目名称为:TestGT 100 | 101 | 1. 在极验官方主页www.geetest.com注册账号并申请相应的应用公钥,id:{{id}}。[*get geetest id/key from* `geetest.com `_ ] 102 | #. 将gt-iOS-sdk下的GTFramework项目生成的静态库 GTFramework.framework 和 webkit.framework 引入到项目中 [*import GTFramework to your preject*] 103 | #. 将GTFramework.framework项目以Static Library的方式进行引用。将所需的GTFramework.framework拷贝到工程所在文件夹下。在 TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择GTFramework.framework文件添加到工程中。[*add GTframework to 'Link Binary With Libaries'*] 104 | 105 | #. 在项目标有TODO注释的地方写入网站主自已的处理代码。[*add you handle method where signed 'TODO'*] 106 | 107 | 集成GTFramework到swift项目 108 | ================================================ 109 | 110 | 暂时只提供纯Objective-C的Framework 111 | 112 | 导入外部框架,无论框架是纯Objective-C,纯Swift还是混合语言,import外部框架的流程是一样的。当你要导入外部框架的时,确保Build >Packaging >Defines Modele 设置为Yes. 113 | 114 | 用下面的语法将框架导入到相应的target的Swift文件中: 115 | 116 | .. code :: 117 | 118 | import FrameworkName 119 | 120 | 用下面的语法将框架导入到相应target的 Objective-C .m 文件中: 121 | 122 | .. code :: 123 | 124 | @import FrameworkName; 125 | 126 | 更多请查阅官方文档 `Using Swift with Cocoa and Objective-C (Swift 2) `_ 127 | 128 | iOS9的适配问题 129 | ================================================ 130 | 131 | iOS9适配详细可跳转至 `iOS9适配tips `_ 132 | 133 | 对网络传输安全协议https的支持 134 | --------------------------------------------------------------------- 135 | 136 | 由于 iOS 9 改用更安全的https,为了能够在iOS9中正常使用http,请在"Info.plist"中进行如下配置,否则影响网络的使用。 137 | 138 | 暂时的解决方案: 139 | 140 | 方案A: 141 | 强制将NSAllowsArbitraryLoads属性设置为YES,并添加到你应用的plist中 142 | 143 | .. code :: 144 | 145 | NSAppTransportSecurity 146 | 147 | NSAllowsArbitraryLoads 148 | 149 | 150 | 151 | 方案B: 152 | 建立白名单并添加到你的app的plsit中 153 | 154 | .. code :: 155 | 156 | NSAppTransportSecurity 157 | 158 | NSExceptionDomains 159 | 160 | geetest.com 161 | 162 | NSIncludesSubdomains 163 | 164 | NSThirdPartyExceptionAllowsInsecureHTTPLoads 165 | 166 | NSThirdPartyExceptionRequiresForwardSecrecy 167 | 168 | 169 | 170 | 171 | 172 | 方案C: 173 | 依赖TLS建立白名单的另一种配置方法 174 | 175 | .. code :: 176 | 177 | NSAppTransportSecurity 178 | 179 | 180 | NSAllowsArbitraryLoads 181 | 182 | 183 | NSExceptionDomains 184 | 185 | geetest.com 186 | 187 | NSIncludesSubdomains 188 | 189 | NSTemporaryExceptionAllowsInsecureHTTPLoads 190 | 191 | NSTemporaryExceptionMinimumTLSVersion 192 | TLSv1.1 193 | 194 | 195 | 196 | 197 | bitcode 198 | --------------------------------------------------------------------- 199 | 200 | 苹果在iOS9的SDK中添加了对应用的瘦身的支持,其中就包括bitcode。你可以以如下方法解决bitcode适配问题 201 | 202 | 我们目前也在编译生成了支持bitcode版本的sdk。该版本的sdk请见failback demo目录,将文件"GTFramework_bitcode"去掉后缀后的替换原GTFramework文件。 203 | 204 | 或者: 205 | 206 | 通过设置编译标志ENABLE_BITCODE = NO,亦或者修改工程的构建设置(build settings)可关闭bitcode功能 207 | 208 | Xcode7适配问题 209 | ================================================ 210 | 211 | 使用第三方库导致的问题 212 | --------------------------------------------------------------------- 213 | 214 | `Lots of warnings when building with Xcode 7 with 3rd party libraries `_ 215 | 216 | 在Build Settings 作如下配置 217 | 218 | .. code :: 219 | 220 | Precompile Prefix (GCC_PRECOMPILE_PREFIX_HEADER) = NO 221 | Debug Information Format (DEBUG_INFORMATION_FORMAT) = DWARF with dSYM 222 | Enabled Modules (C and Objective-C) (CLANG_ENABLE_MODULES) = NO 223 | 224 | 如果不可行尝试(推荐下面的解决方案) 225 | 226 | .. code :: 227 | 228 | Enabled Clang Module Debugging = NO 229 | 230 | IPv6适配 231 | ================================================ 232 | 233 | 网络层面使用NSURLConnection, 高层次api, 支持IPv6 234 | 235 | 回调Block及返回值 236 | ================================================ 237 | 238 | .. code :: 239 | 240 | Block: 241 | ^(NSString *code, NSDictionary *result, NSString *message) {} 242 | 243 | 返回值: 244 | 245 | 1.code 246 | 成功或者失败的值(1:成功/其他:失败) 247 | status code, (1: success/2: fail) 248 | 2.message 249 | 成功或者失败的信息(success/fail) 250 | description about your result 251 | 3.result 252 | 详细的返回信息,用于向客户服务器提交之后的SDK二次验证信息 253 | if you want to finish Secondery-Validate ,you should send those result information to your server. 254 | 255 | .. code :: 256 | 257 | { 258 | "geetest_challenge": "5a8c21e206f5f7ba4fa630acf269d0ec4z", 259 | "geetest_validate": "f0f541006215ac784859e29ec23d5b97", 260 | "geetest_seccode": "f0f541006215ac784859e29ec23d5b97|jordan" 261 | } 262 | -------------------------------------------------------------------------------- /geetest_ios_dev.rst: -------------------------------------------------------------------------------- 1 | ==================================== 2 | iOS-Dev 3 | ==================================== 4 | 5 | .. contents:: 目录 6 | 7 | 概述 8 | ================================================ 9 | 10 | 1. gt-iOS-sdk 极验验证iOS版本的SDK,生成一个基于i386、x86_64、armv7、 armv7s、arm64的Static Library,支持iOS7.0+。开发使用的Xcode版本位Xcode 8.1。 11 | #. gt-iOS-sdk-failback-demo 调用sdk的演示app程序。 12 | #. 在gt-iOS-sdk-failback-demo下TestGT项目倒入生成的GTFramework.framework静态库,即可运行TestGT项目。 13 | #. 演示项目提供了用户服务器的预处理以及完整的一次验证,并将客户端验证结果向示例的客户服务器上发起二次验证的完整通讯过程。 14 | #. 不依赖任何第三方库, 需要导入webkit.framework, demo可根据项目需要自行修改。环境原因, 可能还需要引入CoreTelephony.framework 15 | , SystemConfiguration.framework. 16 | #. iOS端sdk必须与服务器部署代码配套使用,否者无法完成二次验证。`服务器部署代码请移步官网安装文档 `__ 17 | 18 | 验证主要分为三个部分: 19 | 1. 从网站主服务器获取所需的验证数据(id,challenge,success) 20 | 2. 核心验证过程 21 | 3. 根据验证回调数据进行二次验证 22 | 23 | iOS SDK 主要完成过程: 24 | 1. 给出默认的failback机制获取所需的验证数据(网站主可以根据自己的需求自己完成此过程) 25 | 2. 完成核心验证过程 26 | 3. 二次验证不是由sdk完成,而是网站主自己根据demo的逻辑来完成这一块的部署 27 | 28 | 需求 29 | ================================================ 30 | 31 | 1. ios 7.0 + 32 | 2. xcode 8.0 + 33 | 3. arc 34 | 4. webkit.framework 35 | 36 | 搭建Demo 37 | ================================================= 38 | 39 | 自建项目引用 40 | 假设用户自建项目名称为: TestGT 41 | 42 | 1. 在极验官方主页www.geetest.com注册账号并申请相应的应用公钥,id:{{id}} 43 | #. 将gt-iOS-sdk-failback文件夹下的GTFramework.framework引入到项目中 44 | #. 将GTFramework.framework项目以Static Library的方式进行引用。 45 | 将所需的GTFramework.framework拷贝到工程所在文件夹下。在 TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择GTFramework.framework文件添加到工程中。 46 | #. 在项目中有4处标注'TODO'的位置,请网站主根据提示写入用户自已的处理代码。 47 | 48 | 49 | 通讯流程图 50 | ======================================= 51 | 52 | .. image:: img/geetest_flow.png 53 | 54 | 实现流程图 55 | ======================================= 56 | 57 | .. image:: img/geetest_ios.png 58 | 59 | 采集设备静态信息 60 | ======================================= 61 | 62 | mobileInfo里面的具体字段描述表 63 | ------------------------------------------------------------------- 64 | 65 | .. image:: img/mobile-info.png 66 | 67 | _mobileInfo 手机静态信息举例 Code Sample 68 | ------------------------------------------------------------------- 69 | 70 | .. code:: 71 | 72 | _mobileInfo = [@{@"mType" : [GTData osType], 73 | @"mScreen" : [GTData screen], 74 | @"osType" : @"ios", 75 | @"osVerRelease" : [GTData systemVersion], 76 | @"osVerInt" : [GTData systemVersion], 77 | @"hAppVerCode" : [GTData buildVersion], 78 | @"hAppVerName" : [GTData buildVersionRelease], 79 | @"gsdkVerCode" : @"2.15.8.7.1", 80 | @"imei" : @"000000000000000" } mutableCopy]; 81 | 82 | 83 | 回调Block及返回值 84 | ======================================== 85 | 验证结果返回后的操作,非主线程操作 86 | 87 | .. code:: 88 | 89 | typedef void(^GTCallFinishBlock)(NSString *code, NSDictionary *result, NSString *message); 90 | 91 | 返回值: 92 | 93 | 1.code 94 | 成功或者失败的值(1:成功/其他:失败)(success/fail) 95 | 2.message 96 | 成功或者失败的信息(some description) 97 | 3.result 98 | 详细的返回信息,用于向客户服务器提交之后的SDK二次验证信息 99 | 100 | .. code:: 101 | 102 | { 103 | "geetest_challenge": "5a8c21e206f5f7ba4fa630acf269d0ec4z", 104 | "geetest_validate": "f0f541006215ac784859e29ec23d5b97", 105 | "geetest_seccode": "f0f541006215ac784859e29ec23d5b97|jordan" 106 | } 107 | 108 | 验证关闭block 109 | ======================================== 110 | 验证关闭的操作,非主线程操作 111 | 112 | .. code:: 113 | 114 | typedef void(^GTCallCloseBlock)(void); 115 | 116 | 117 | gt验证SDK Header暴露的方法 118 | ======================================== 119 | 客户端向网站主服务器发起验证请求,并配置验证 120 | --------------------------------------------------------------- 121 | 122 | 获取并且解析用于验证的必要数据,并且自动配置验证 123 | 124 | 向CustomServer发送geetest验证请求,如果网站主服务器判断geetest服务可用,返回验证必要的数据 125 | 126 | @param requestCustomServerForGTestURL 客户端向网站主服务端发起验证请求的链接(api_1) 127 | 128 | @param timeoutInterval 超时间隔 129 | 130 | @param name 网站主http cookie name的键名 131 | 132 | @param RequestType 请求的类型 133 | 134 | @param handler 请求完成后的处理 135 | 136 | @return 只有当网站主服务器可用时,以block的形式返回以下数据 137 | 138 | .. code:: 139 | { 140 | "challenge": "12ae1159ffdfcbbc306897e8d9bf6d06" , 141 | "gt" : "ad872a4e1a51888967bdb7cb45589605" , 142 | "success" : 1 143 | } 144 | 145 | .. code:: 146 | 147 | - (void)configureGTest:(NSURL *)customURL 148 | timeout:(NSTimeInterval)timeoutInterval 149 | withCookieName:(NSString *)name 150 | options:(DefaultRequestOptions)RequestType 151 | completionHandler:(GTDefaultCaptchaHandlerBlock)handler; 152 | 153 | options: 请求选项 154 | 155 | .. code:: 156 | 157 | typedef NS_ENUM(NSInteger, DefaultRequestOptions){ 158 | //发送同步请求, 基于 [NSURLConnection sendSynchronousRequest: returningResponse: error:&error] 159 | GTDefaultSynchronousRequest, 160 | //发送异步请求, 基于 NSURLConnectionDataDelegate 161 | GTDefaultAsynchronousRequest 162 | }; 163 | 164 | 165 | 使用id,challenge和success配置验证 166 | ------------------------------------------------------------------- 167 | 168 | 此方法提供给不使用或不便于使用默认failback功能而自己搭建failback机制的用户 169 | 170 | @param captcha_id 在官网申请的captcha_id 171 | 172 | @param gt_challenge 从geetest服务器获取的challenge 173 | 174 | @param success 网站主服务器监测geetest服务的可用状态 175 | 176 | @return YES可开启验证,NO则客户端与geetest服务端之间连接不通畅 177 | 178 | .. code:: 179 | 180 | - (BOOL)configureGTest:(NSString *)captcha_id 181 | challenge:(NSString *)gt_challenge 182 | success:(NSNumber *)successCode; 183 | 184 | 185 | 错误处理的代理方法 186 | ------------------------------------------------------------------- 187 | 188 | GTManageDelegate, 处理错误的代理方法 189 | 190 | .. code:: 191 | 192 | @required 193 | - (void)GTNetworkErrorHandler:(NSError *)error; 194 | 195 | 可能出现的error: 196 | 197 | 1. NSURLErrorTimedOut -1001 超时 198 | 199 | 与开发人员配置的超时时间和用户的网络情况的有关, 在低速网络可以对这块做测试 200 | #. NSURLErrorCancelled -999 取消了网络请求 201 | 202 | 一般不出现, 可能出现的情况是异步网络加载的时候, 用户关闭了验证 203 | 204 | #. NSURLErrorCannotFindHost -1003 无法找到主机 205 | 206 | 网络异常, 检查网络 207 | #. NSURLErrorCannotConnectToHost -1004 无法连接到极验服务器 208 | 209 | 网络异常, 无法连接到极验服务器 210 | #. NSURLErrorNotConnectedToInternet -1009 没有连接到互联网 211 | 212 | 没有网络时提示 213 | #. NSURLErrorBadServerResponse -1011 服务器响应500 214 | 215 | 等价于"500 Server Error" 216 | 217 | #. NSURLErrorNoPermissionsToReadFile -1102 无访访问资源权限 218 | 219 | 传入的参数错误, 被极验服务器拒绝访问. 通常为id(gt)和challenge不正确或者不匹配导致 220 | #. json解析出错(error code = 3840等) 221 | 222 | 在使用默认的failback里使用了json转字典, 检查网站主服务器返回的验证数据格式是否正确(也可能在failback接口下, 增加了额外的键值导致) 223 | 224 | 解析使用JSONObjectWithData: options: error:方法 225 | 226 | 227 | 228 | 展示验证 229 | ------------------------------------------------------------------- 230 | 231 | 验证最核心的方法,在此之前必须先配置好验证 232 | 233 | 实现方式 直接在 keyWindow 上添加遮罩视图、极验验证的UIWebView视图 234 | 极速验证UIWebView通过JS与SDK通信 235 | 236 | @param finish 验证返回结果 237 | 238 | @param close 关闭验证 239 | 240 | @param animated 开启动画 241 | 242 | .. code:: 243 | 244 | - (void)openGTViewAddFinishHandler:(GTCallFinishBlock)finish 245 | closeHandler:(GTCallCloseBlock)close 246 | animated:(BOOL)animated; 247 | 248 | 249 | 提前关闭gt验证 250 | ------------------------------------------------------------------- 251 | 252 | 关闭正在显示的验证界面 253 | 254 | .. code:: 255 | 256 | - (void)closeGTViewIfIsOpen; 257 | 258 | 配置状态指示器 259 | ------------------------------------------------------------------- 260 | 261 | 配置加载验证时的状态指示器 262 | 263 | @param animationBlock 自定义时需要实现的动画block,仅在type配置为GTIndicatorCustomType时才执行 264 | 265 | @param type 状态指示器的类型 266 | 267 | 268 | .. code:: 269 | 270 | - (void)configureAnimatedAcitvityIndicator:(GTIndicatorAnimationViewBlock)animationBlock 271 | withIndicatorType:(ActivityIndicatorType)type; 272 | 273 | ActivityIndicatorViewType: 274 | 275 | .. code:: 276 | 277 | typedef NS_ENUM(NSInteger, ActivityIndicatorType) { 278 | /** System Indicator Type 系统样式*/ 279 | GTIndicatorSystemType = 0, 280 | /** Geetest Defualt Indicator Type 极验验证默认样式*/ 281 | GTIndicatorDefaultType, 282 | /** Custom Indicator Type 自定义样式*/ 283 | GTIndicatorCustomType, 284 | }; 285 | 286 | GTIndicatorSystemType 287 | 288 | .. image:: img/indicator_system.png 289 | 290 | GTIndicatorDefaultType 291 | 292 | .. image:: img/indicator_default.png 293 | 294 | GTIndicatorCustomType(sample), 可根据需要修改 295 | 296 | .. image:: img/indicator_custom_sample.png 297 | 298 | HTTPS支持(非必要方法,默认不使用https) 299 | ------------------------------------------------------------------- 300 | 301 | 使用https协议开启验证, 付费用户可使用, 极验服务器对这块的支持有判定 302 | 303 | @param secured 是否需要https支持 304 | 305 | .. code:: 306 | 307 | - (void)useSecurityAuthentication:(BOOL)secured; 308 | 309 | 310 | 配置背景模糊 311 | ------------------------------------------------------------------- 312 | 313 | 利用UIVisualEffectView 实现背景模糊 314 | 315 | iOS8 以上生效, iOS8 以下背景透明 316 | 317 | @param blurEffect 模糊特效 318 | 319 | .. code:: 320 | 321 | - (void)useVisualViewWithEffect:(UIBlurEffect *)blurEffect; 322 | 323 | 324 | 验证布局方式 325 | ------------------------------------------------------------------- 326 | 327 | @abstract 验证展示方式 328 | 329 | @discussion 330 | 默认居中展示 GTPopupCenterType 331 | 332 | @see GTPresentType 333 | 334 | @param type 布局类型 335 | 336 | .. code:: 337 | 338 | - (void)useGTViewWithPresentType:(GTPresentType)type; 339 | 340 | GTPresentType: 341 | 342 | .. code:: 343 | 344 | /** 345 | * 展示方式 346 | */ 347 | typedef NS_ENUM(NSInteger, GTPresentType) { 348 | /** 居中展示, 默认 */ 349 | GTPopupCenterType = 0, 350 | /** 351 | * @abstract 从底部展示验证, 仅限iPhone竖屏 352 | * 353 | * @discussion 当检测到旋转了屏幕, 会自动关闭验证 354 | */ 355 | GTPopupBottomType 356 | }; 357 | 358 | 359 | 配置验证高度的适配 360 | ------------------------------------------------------------------- 361 | 362 | @abstract 验证高度约束 363 | 364 | @discussion 365 | iOS8以下默认GTViewHeightConstraintDefault, iOS9以上自动适配验证高度 366 | 367 | @param type 高度约束类型 368 | 369 | .. code:: 370 | 371 | - (void)useGTViewWithHeightConstraintType:(GTViewHeightConstraintType)type; 372 | 373 | GTViewHeightConstraintType 374 | 375 | .. code:: 376 | 377 | typedef NS_ENUM(NSInteger, GTViewHeightConstraintType) { 378 | /** 默认高度 */ 379 | GTViewHeightConstraintDefault, 380 | /** 小图有logo */ 381 | GTViewHeightConstraintSmallViewWithLogo, 382 | /** 小图无logo */ 383 | GTViewHeightConstraintSmallViewWithNoLogo, 384 | /** 大图有logo */ 385 | GTViewHeightConstraintLargeViewWithLogo, 386 | /** 大图无logo */ 387 | GTViewHeightConstraintLargeViewWithNoLogo 388 | }; 389 | 390 | 391 | 验证背景交互响应 392 | ------------------------------------------------------------------- 393 | 394 | @abstract 验证背景交互事件的开关 395 | 396 | @discussion 默认关闭 397 | 398 | @param disable YES忽略交互事件/NO接受交互事件 399 | 400 | .. code:: 401 | 402 | - (void)disableBackgroundUserInteraction:(BOOL)disable; 403 | 404 | 验证展示语言(非必要,默认中文) 405 | ------------------------------------------------------------------- 406 | 407 | 切换验证展示的语言 408 | 409 | @param Type 语言类型 410 | 411 | .. code:: 412 | 413 | - (void)languageSwitch:(LanguageType)Type; 414 | 415 | LanguageType: 416 | 417 | .. code:: 418 | 419 | //语言选项 420 | typedef NS_ENUM(NSInteger, LanguageType) { 421 | /** Simplified Chinese 简体*/ 422 | LANGTYPE_ZH_CN = 0, 423 | /** Traditional Chinese 繁体*/ 424 | LANGTYPE_ZH_TW, 425 | /** Traditional Chinese 繁体*/ 426 | LANGTYPE_ZH_HK, 427 | /** Korean 韩语*/ 428 | LANGTYPE_KO_KR, 429 | /** Japenese 日语*/ 430 | LANGTYPE_JA_JP, 431 | /** English 英语*/ 432 | LANGTYPE_EN_US, 433 | /** System language, 返回与系统同步的语言 */ 434 | LANGTYPE_AUTO 435 | }; 436 | 437 | 备注: 438 | LANGTYPE_AUTO 通过 [NSLocale preferredLanguages] 获取语言简码。 439 | 440 | 测试服务是否可用(仅限debugMode) 441 | ------------------------------------------------------------------- 442 | 443 | @param captcha_id 分配的captcha_id 444 | 445 | @return YES则服务可用;NO则不可用 446 | 447 | .. code:: 448 | 449 | - (BOOL)serverStatusWithCaptcha_id:(NSString *)captcha_id; 450 | 451 | 452 | 开启debugMode(非必要方法) 453 | ------------------------------------------------------------------- 454 | 455 | 开启debugMode用于debug,正常验证不是用此方法或此方法设为 NO 456 | 457 | .. code:: 458 | 459 | - (void)debugModeEnable:(BOOL)debugEnalbe; 460 | 461 | 462 | 参考资料 463 | ======================================== 464 | 默认验证处理block 465 | ------------------------------------------------------------------- 466 | 467 | 默认验证处理block, 在使用默认failback设计模式时, 将<核心验证>方法放在此处 468 | 469 | @param gt_captcha_id 用于验证的captcha_id 470 | 471 | @param gt_challenge 验证的流水号 472 | 473 | @param gt_success_code 网站主侦测到极验服务器的状态 474 | 475 | .. code:: 476 | 477 | typedef void(^GTDefaultCaptchaHandlerBlock)(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code); 478 | 479 | 480 | 自定义状态指示器的动画实现block 481 | ------------------------------------------------------------------- 482 | 483 | 仅当ActivityIndicatorViewType配置为GTIndicatorCustomType时才执行此block 484 | 485 | @param layer 状态指示器视图的layer 486 | 487 | @param size layer的大小,默认 {64, 64} 488 | 489 | @param color layer的颜色,默认 蓝色 [UIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:1] 490 | 491 | .. code:: 492 | 493 | typedef void(^GTIndicatorAnimationViewBlock)(CALayer *layer, CGSize size, UIColor *color); 494 | 495 | (完) -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | target 'TestGT' do 3 | pod 'GeeTestSDK-OC/Core', :path => '../' 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GeeTestSDK-OC/Core (2.16.7.22.1) 3 | 4 | DEPENDENCIES: 5 | - GeeTestSDK-OC/Core (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | GeeTestSDK-OC: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | GeeTestSDK-OC: 26982cc6f4cc76e029f3e74d017da1f04fec7be4 13 | 14 | PODFILE CHECKSUM: 0d34506b6e7aac4320c2667ed5d6ad22e93e8c54 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Local Podspecs/GeeTestSDK-OC.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GeeTestSDK-OC", 3 | "version": "2.16.7.22.1", 4 | "summary": "GeeTestSDK for iOS.", 5 | "description": "GeeTestSDK for iOS platform.", 6 | "homepage": "http://www.geetest.com/", 7 | "license": { 8 | "type": "Copyright", 9 | "text": "武汉极意网络科技有限公司 版权所有." 10 | }, 11 | "authors": { 12 | "GeeTeam": "http://www.geetest.com/" 13 | }, 14 | "source": { 15 | "git": "https://github.com/GeeTeam/gtapp-ios-oc.git", 16 | "tag": "2.16.7.22.1" 17 | }, 18 | "platforms": { 19 | "ios": "7.0" 20 | }, 21 | "requires_arc": true, 22 | "frameworks": "WebKit", 23 | "default_subspecs": "Core", 24 | "subspecs": [ 25 | { 26 | "name": "Core", 27 | "vendored_frameworks": "GTFramework.framework" 28 | }, 29 | { 30 | "name": "Bitcode", 31 | "vendored_frameworks": "GTFramework.framework" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GeeTestSDK-OC/Core (2.16.7.22.1) 3 | 4 | DEPENDENCIES: 5 | - GeeTestSDK-OC/Core (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | GeeTestSDK-OC: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | GeeTestSDK-OC: 26982cc6f4cc76e029f3e74d017da1f04fec7be4 13 | 14 | PODFILE CHECKSUM: 0d34506b6e7aac4320c2667ed5d6ad22e93e8c54 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 20CDDCA9C1A65F73D0CC932E1EDFD323 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 11 | 67A3EA05D7803D9753839A68CB0A7C09 /* Pods-TestGT-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C470FDE9B07E8DF959DB5B9130FF90C9 /* Pods-TestGT-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | A4AE25A4D7D17BAB1855BA1D9C44FEEC /* Pods-TestGT-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EB2DE13BF0F6E4482E4C3E2C508D056C /* Pods-TestGT-dummy.m */; }; 13 | /* End PBXBuildFile section */ 14 | 15 | /* Begin PBXFileReference section */ 16 | 2069BE90BB068C0987105DD409C8C8D6 /* Pods-TestGT-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestGT-resources.sh"; sourceTree = ""; }; 17 | 219367EF327B6CF981AFE0FFACB0EBD5 /* Pods-TestGT-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TestGT-acknowledgements.markdown"; sourceTree = ""; }; 18 | 22285A96514A0784E475EDF9458A32CE /* Pods-TestGT.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestGT.debug.xcconfig"; sourceTree = ""; }; 19 | 402D14E259C26CA9E3F13C70D89602F3 /* Pods-TestGT.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-TestGT.modulemap"; sourceTree = ""; }; 20 | 59AD9E5A581B8CE4D2EC7B97AC180547 /* GTFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GTFramework.framework; sourceTree = ""; }; 21 | 62B2F54816DBE81E12D7D8F56EE3CAD9 /* Pods-TestGT-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestGT-acknowledgements.plist"; sourceTree = ""; }; 22 | 901AF345C5154567232086CDC4EA53E7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 24 | B35D4DC0E78CAC9C62BEFF41D58F186F /* Pods-TestGT-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestGT-frameworks.sh"; sourceTree = ""; }; 25 | C470FDE9B07E8DF959DB5B9130FF90C9 /* Pods-TestGT-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TestGT-umbrella.h"; sourceTree = ""; }; 26 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 27 | CC8761A3D161D9930932AAC4532B5A64 /* Pods-TestGT.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestGT.release.xcconfig"; sourceTree = ""; }; 28 | EB2DE13BF0F6E4482E4C3E2C508D056C /* Pods-TestGT-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TestGT-dummy.m"; sourceTree = ""; }; 29 | FA81E8F7CB742EAE44EE96EEE9C74BF3 /* Pods_TestGT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TestGT.framework; path = "Pods-TestGT.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | /* End PBXFileReference section */ 31 | 32 | /* Begin PBXFrameworksBuildPhase section */ 33 | 8A65C0D1F3937569496BCCC52674530C /* Frameworks */ = { 34 | isa = PBXFrameworksBuildPhase; 35 | buildActionMask = 2147483647; 36 | files = ( 37 | 20CDDCA9C1A65F73D0CC932E1EDFD323 /* Foundation.framework in Frameworks */, 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | 2294A5DD25662BC7A2A38C8BFB980F3B /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | FA81E8F7CB742EAE44EE96EEE9C74BF3 /* Pods_TestGT.framework */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | 4C19EE1C893A1353F88B99A49BB3A505 /* Targets Support Files */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | E9398F7E8A46AFFE2061894C07CBDC16 /* Pods-TestGT */, 56 | ); 57 | name = "Targets Support Files"; 58 | sourceTree = ""; 59 | }; 60 | 544D9DACA8EB3B6DC893EECB0DE2F6F8 /* Core */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | F168D77E2293B3D72A2CD2E575A8AF87 /* Frameworks */, 64 | ); 65 | name = Core; 66 | sourceTree = ""; 67 | }; 68 | 5FFAAEAA8F95830CDDD43FD077AA6935 /* GeeTestSDK-OC */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 544D9DACA8EB3B6DC893EECB0DE2F6F8 /* Core */, 72 | ); 73 | name = "GeeTestSDK-OC"; 74 | path = ../..; 75 | sourceTree = ""; 76 | }; 77 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 81 | ); 82 | name = iOS; 83 | sourceTree = ""; 84 | }; 85 | 7DB346D0F39D3F0E887471402A8071AB = { 86 | isa = PBXGroup; 87 | children = ( 88 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 89 | FB57033EDAFE210B37BABAC2FA6E2E5A /* Development Pods */, 90 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 91 | 2294A5DD25662BC7A2A38C8BFB980F3B /* Products */, 92 | 4C19EE1C893A1353F88B99A49BB3A505 /* Targets Support Files */, 93 | ); 94 | sourceTree = ""; 95 | }; 96 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 100 | ); 101 | name = Frameworks; 102 | sourceTree = ""; 103 | }; 104 | E9398F7E8A46AFFE2061894C07CBDC16 /* Pods-TestGT */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 901AF345C5154567232086CDC4EA53E7 /* Info.plist */, 108 | 402D14E259C26CA9E3F13C70D89602F3 /* Pods-TestGT.modulemap */, 109 | 219367EF327B6CF981AFE0FFACB0EBD5 /* Pods-TestGT-acknowledgements.markdown */, 110 | 62B2F54816DBE81E12D7D8F56EE3CAD9 /* Pods-TestGT-acknowledgements.plist */, 111 | EB2DE13BF0F6E4482E4C3E2C508D056C /* Pods-TestGT-dummy.m */, 112 | B35D4DC0E78CAC9C62BEFF41D58F186F /* Pods-TestGT-frameworks.sh */, 113 | 2069BE90BB068C0987105DD409C8C8D6 /* Pods-TestGT-resources.sh */, 114 | C470FDE9B07E8DF959DB5B9130FF90C9 /* Pods-TestGT-umbrella.h */, 115 | 22285A96514A0784E475EDF9458A32CE /* Pods-TestGT.debug.xcconfig */, 116 | CC8761A3D161D9930932AAC4532B5A64 /* Pods-TestGT.release.xcconfig */, 117 | ); 118 | name = "Pods-TestGT"; 119 | path = "Target Support Files/Pods-TestGT"; 120 | sourceTree = ""; 121 | }; 122 | F168D77E2293B3D72A2CD2E575A8AF87 /* Frameworks */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 59AD9E5A581B8CE4D2EC7B97AC180547 /* GTFramework.framework */, 126 | ); 127 | name = Frameworks; 128 | sourceTree = ""; 129 | }; 130 | FB57033EDAFE210B37BABAC2FA6E2E5A /* Development Pods */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 5FFAAEAA8F95830CDDD43FD077AA6935 /* GeeTestSDK-OC */, 134 | ); 135 | name = "Development Pods"; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXHeadersBuildPhase section */ 141 | AC1CE18C0232E14E55E6AE037F40D278 /* Headers */ = { 142 | isa = PBXHeadersBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 67A3EA05D7803D9753839A68CB0A7C09 /* Pods-TestGT-umbrella.h in Headers */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXHeadersBuildPhase section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 509C20B1F76CEADCF09F01FF6891B6A5 /* Pods-TestGT */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 2314D2280106585323BDE37376552C09 /* Build configuration list for PBXNativeTarget "Pods-TestGT" */; 155 | buildPhases = ( 156 | C922673BFCC4ADEE503462FF8CC984C8 /* Sources */, 157 | 8A65C0D1F3937569496BCCC52674530C /* Frameworks */, 158 | AC1CE18C0232E14E55E6AE037F40D278 /* Headers */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = "Pods-TestGT"; 165 | productName = "Pods-TestGT"; 166 | productReference = FA81E8F7CB742EAE44EE96EEE9C74BF3 /* Pods_TestGT.framework */; 167 | productType = "com.apple.product-type.framework"; 168 | }; 169 | /* End PBXNativeTarget section */ 170 | 171 | /* Begin PBXProject section */ 172 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 173 | isa = PBXProject; 174 | attributes = { 175 | LastSwiftUpdateCheck = 0730; 176 | LastUpgradeCheck = 0700; 177 | }; 178 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 179 | compatibilityVersion = "Xcode 3.2"; 180 | developmentRegion = English; 181 | hasScannedForEncodings = 0; 182 | knownRegions = ( 183 | en, 184 | ); 185 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 186 | productRefGroup = 2294A5DD25662BC7A2A38C8BFB980F3B /* Products */; 187 | projectDirPath = ""; 188 | projectRoot = ""; 189 | targets = ( 190 | 509C20B1F76CEADCF09F01FF6891B6A5 /* Pods-TestGT */, 191 | ); 192 | }; 193 | /* End PBXProject section */ 194 | 195 | /* Begin PBXSourcesBuildPhase section */ 196 | C922673BFCC4ADEE503462FF8CC984C8 /* Sources */ = { 197 | isa = PBXSourcesBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | A4AE25A4D7D17BAB1855BA1D9C44FEEC /* Pods-TestGT-dummy.m in Sources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXSourcesBuildPhase section */ 205 | 206 | /* Begin XCBuildConfiguration section */ 207 | 0FF17185D3AF4D36EADAA29D547CEB6F /* Release */ = { 208 | isa = XCBuildConfiguration; 209 | baseConfigurationReference = CC8761A3D161D9930932AAC4532B5A64 /* Pods-TestGT.release.xcconfig */; 210 | buildSettings = { 211 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 213 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 214 | CURRENT_PROJECT_VERSION = 1; 215 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 216 | DEFINES_MODULE = YES; 217 | DYLIB_COMPATIBILITY_VERSION = 1; 218 | DYLIB_CURRENT_VERSION = 1; 219 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 220 | ENABLE_STRICT_OBJC_MSGSEND = YES; 221 | GCC_NO_COMMON_BLOCKS = YES; 222 | INFOPLIST_FILE = "Target Support Files/Pods-TestGT/Info.plist"; 223 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 224 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 225 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 226 | MACH_O_TYPE = staticlib; 227 | MODULEMAP_FILE = "Target Support Files/Pods-TestGT/Pods-TestGT.modulemap"; 228 | MTL_ENABLE_DEBUG_INFO = NO; 229 | OTHER_LDFLAGS = ""; 230 | OTHER_LIBTOOLFLAGS = ""; 231 | PODS_ROOT = "$(SRCROOT)"; 232 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 233 | PRODUCT_NAME = Pods_TestGT; 234 | SDKROOT = iphoneos; 235 | SKIP_INSTALL = YES; 236 | TARGETED_DEVICE_FAMILY = "1,2"; 237 | VERSIONING_SYSTEM = "apple-generic"; 238 | VERSION_INFO_PREFIX = ""; 239 | }; 240 | name = Release; 241 | }; 242 | 79B0C2E66EFA9917ED6EDDB8FC6A7684 /* Release */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_ANALYZER_NONNULL = YES; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 258 | CLANG_WARN_UNREACHABLE_CODE = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | CODE_SIGNING_REQUIRED = NO; 261 | COPY_PHASE_STRIP = YES; 262 | ENABLE_NS_ASSERTIONS = NO; 263 | GCC_C_LANGUAGE_STANDARD = gnu99; 264 | GCC_PREPROCESSOR_DEFINITIONS = ( 265 | "POD_CONFIGURATION_RELEASE=1", 266 | "$(inherited)", 267 | ); 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 275 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 276 | STRIP_INSTALLED_PRODUCT = NO; 277 | SYMROOT = "${SRCROOT}/../build"; 278 | VALIDATE_PRODUCT = YES; 279 | }; 280 | name = Release; 281 | }; 282 | AF7145E6C31F9C7313301DB07650B95C /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | baseConfigurationReference = 22285A96514A0784E475EDF9458A32CE /* Pods-TestGT.debug.xcconfig */; 285 | buildSettings = { 286 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 288 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 289 | CURRENT_PROJECT_VERSION = 1; 290 | DEBUG_INFORMATION_FORMAT = dwarf; 291 | DEFINES_MODULE = YES; 292 | DYLIB_COMPATIBILITY_VERSION = 1; 293 | DYLIB_CURRENT_VERSION = 1; 294 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 295 | ENABLE_STRICT_OBJC_MSGSEND = YES; 296 | GCC_NO_COMMON_BLOCKS = YES; 297 | INFOPLIST_FILE = "Target Support Files/Pods-TestGT/Info.plist"; 298 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 299 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 300 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 301 | MACH_O_TYPE = staticlib; 302 | MODULEMAP_FILE = "Target Support Files/Pods-TestGT/Pods-TestGT.modulemap"; 303 | MTL_ENABLE_DEBUG_INFO = YES; 304 | OTHER_LDFLAGS = ""; 305 | OTHER_LIBTOOLFLAGS = ""; 306 | PODS_ROOT = "$(SRCROOT)"; 307 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 308 | PRODUCT_NAME = Pods_TestGT; 309 | SDKROOT = iphoneos; 310 | SKIP_INSTALL = YES; 311 | TARGETED_DEVICE_FAMILY = "1,2"; 312 | VERSIONING_SYSTEM = "apple-generic"; 313 | VERSION_INFO_PREFIX = ""; 314 | }; 315 | name = Debug; 316 | }; 317 | CF7953F66E785E8876EB4D370D777D50 /* Debug */ = { 318 | isa = XCBuildConfiguration; 319 | buildSettings = { 320 | ALWAYS_SEARCH_USER_PATHS = NO; 321 | CLANG_ANALYZER_NONNULL = YES; 322 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 323 | CLANG_CXX_LIBRARY = "libc++"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 329 | CLANG_WARN_EMPTY_BODY = YES; 330 | CLANG_WARN_ENUM_CONVERSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 333 | CLANG_WARN_UNREACHABLE_CODE = YES; 334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 335 | CODE_SIGNING_REQUIRED = NO; 336 | COPY_PHASE_STRIP = NO; 337 | ENABLE_TESTABILITY = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREPROCESSOR_DEFINITIONS = ( 342 | "POD_CONFIGURATION_DEBUG=1", 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 354 | ONLY_ACTIVE_ARCH = YES; 355 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 356 | STRIP_INSTALLED_PRODUCT = NO; 357 | SYMROOT = "${SRCROOT}/../build"; 358 | }; 359 | name = Debug; 360 | }; 361 | /* End XCBuildConfiguration section */ 362 | 363 | /* Begin XCConfigurationList section */ 364 | 2314D2280106585323BDE37376552C09 /* Build configuration list for PBXNativeTarget "Pods-TestGT" */ = { 365 | isa = XCConfigurationList; 366 | buildConfigurations = ( 367 | AF7145E6C31F9C7313301DB07650B95C /* Debug */, 368 | 0FF17185D3AF4D36EADAA29D547CEB6F /* Release */, 369 | ); 370 | defaultConfigurationIsVisible = 0; 371 | defaultConfigurationName = Release; 372 | }; 373 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 374 | isa = XCConfigurationList; 375 | buildConfigurations = ( 376 | CF7953F66E785E8876EB4D370D777D50 /* Debug */, 377 | 79B0C2E66EFA9917ED6EDDB8FC6A7684 /* Release */, 378 | ); 379 | defaultConfigurationIsVisible = 0; 380 | defaultConfigurationName = Release; 381 | }; 382 | /* End XCConfigurationList section */ 383 | }; 384 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 385 | } 386 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## GeeTestSDK-OC 5 | 6 | 武汉极意网络科技有限公司 版权所有. 7 | Generated by CocoaPods - https://cocoapods.org 8 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | 武汉极意网络科技有限公司 版权所有. 18 | License 19 | Copyright 20 | Title 21 | GeeTestSDK-OC 22 | Type 23 | PSGroupSpecifier 24 | 25 | 26 | FooterText 27 | Generated by CocoaPods - https://cocoapods.org 28 | Title 29 | 30 | Type 31 | PSGroupSpecifier 32 | 33 | 34 | StringsTable 35 | Acknowledgements 36 | Title 37 | Acknowledgements 38 | 39 | 40 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TestGT : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TestGT 5 | @end 6 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_TestGTVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_TestGTVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.." 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GeeTestSDK-OC" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GeeTestSDK-OC" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "GTFramework" -framework "WebKit" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TestGT { 2 | umbrella header "Pods-TestGT-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/Pods/Target Support Files/Pods-TestGT/Pods-TestGT.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.." 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GeeTestSDK-OC" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GeeTestSDK-OC" 7 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "GTFramework" -framework "WebKit" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2967F3671B2D8A060081A66F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2967F3661B2D8A060081A66F /* main.m */; }; 11 | 2967F36A1B2D8A060081A66F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2967F3691B2D8A060081A66F /* AppDelegate.m */; }; 12 | 2967F36D1B2D8A060081A66F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2967F36C1B2D8A060081A66F /* ViewController.m */; }; 13 | 2967F3701B2D8A060081A66F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2967F36E1B2D8A060081A66F /* Main.storyboard */; }; 14 | 2967F3721B2D8A060081A66F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2967F3711B2D8A060081A66F /* Images.xcassets */; }; 15 | 2967F3751B2D8A060081A66F /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2967F3731B2D8A060081A66F /* LaunchScreen.xib */; }; 16 | 44D5A5D94F85A7433E5828B8 /* Pods_TestGT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99738970C5F9D1E49F630FA /* Pods_TestGT.framework */; }; 17 | 735AC3B91C915E87009F89C3 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 735AC3B71C911BAB009F89C3 /* WebKit.framework */; }; 18 | 73A8BFAE1C3286AE0082103E /* TestGTTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 73A8BFAD1C3286AE0082103E /* TestGTTests.m */; }; 19 | 73E6B7491C33B5CA00C808E0 /* TestGTUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 73E6B7481C33B5CA00C808E0 /* TestGTUITests.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 73A8BFB01C3286AE0082103E /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 2967F3591B2D8A060081A66F /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 2967F3601B2D8A060081A66F; 28 | remoteInfo = TestGT; 29 | }; 30 | 73E6B74B1C33B5CA00C808E0 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 2967F3591B2D8A060081A66F /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 2967F3601B2D8A060081A66F; 35 | remoteInfo = TestGT; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 2967F3611B2D8A060081A66F /* TestGT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestGT.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 2967F3651B2D8A060081A66F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 2967F3661B2D8A060081A66F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 43 | 2967F3681B2D8A060081A66F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | 2967F3691B2D8A060081A66F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | 2967F36B1B2D8A060081A66F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 46 | 2967F36C1B2D8A060081A66F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 47 | 2967F36F1B2D8A060081A66F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 2967F3711B2D8A060081A66F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 49 | 2967F3741B2D8A060081A66F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 50 | 48D3B2437F92B599485CFBD8 /* Pods-TestGT.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestGT.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TestGT/Pods-TestGT.debug.xcconfig"; sourceTree = ""; }; 51 | 6C26E9BF8BF636B625252BDB /* Pods-TestGT.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestGT.release.xcconfig"; path = "Pods/Target Support Files/Pods-TestGT/Pods-TestGT.release.xcconfig"; sourceTree = ""; }; 52 | 735AC3B71C911BAB009F89C3 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 53 | 73A8BFAB1C3286AE0082103E /* TestGTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestGTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 73A8BFAD1C3286AE0082103E /* TestGTTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestGTTests.m; sourceTree = ""; }; 55 | 73A8BFAF1C3286AE0082103E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 73E6B7461C33B5CA00C808E0 /* TestGTUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestGTUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 73E6B7481C33B5CA00C808E0 /* TestGTUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestGTUITests.m; sourceTree = ""; }; 58 | 73E6B74A1C33B5CA00C808E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | B99738970C5F9D1E49F630FA /* Pods_TestGT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestGT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 2967F35E1B2D8A060081A66F /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 735AC3B91C915E87009F89C3 /* WebKit.framework in Frameworks */, 68 | 44D5A5D94F85A7433E5828B8 /* Pods_TestGT.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | 73A8BFA81C3286AE0082103E /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 73E6B7431C33B5CA00C808E0 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | /* End PBXFrameworksBuildPhase section */ 87 | 88 | /* Begin PBXGroup section */ 89 | 2967F3581B2D8A060081A66F = { 90 | isa = PBXGroup; 91 | children = ( 92 | 735AC3B71C911BAB009F89C3 /* WebKit.framework */, 93 | 2967F3631B2D8A060081A66F /* TestGT */, 94 | 73A8BFAC1C3286AE0082103E /* TestGTTests */, 95 | 73E6B7471C33B5CA00C808E0 /* TestGTUITests */, 96 | 2967F3621B2D8A060081A66F /* Products */, 97 | 72AA9A1CAA9843C092953931 /* Pods */, 98 | E0AC11FB400D9E7930224D9C /* Frameworks */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 2967F3621B2D8A060081A66F /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 2967F3611B2D8A060081A66F /* TestGT.app */, 106 | 73A8BFAB1C3286AE0082103E /* TestGTTests.xctest */, 107 | 73E6B7461C33B5CA00C808E0 /* TestGTUITests.xctest */, 108 | ); 109 | name = Products; 110 | sourceTree = ""; 111 | }; 112 | 2967F3631B2D8A060081A66F /* TestGT */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 2967F3681B2D8A060081A66F /* AppDelegate.h */, 116 | 2967F3691B2D8A060081A66F /* AppDelegate.m */, 117 | 2967F36B1B2D8A060081A66F /* ViewController.h */, 118 | 2967F36C1B2D8A060081A66F /* ViewController.m */, 119 | 2967F36E1B2D8A060081A66F /* Main.storyboard */, 120 | 2967F3711B2D8A060081A66F /* Images.xcassets */, 121 | 2967F3731B2D8A060081A66F /* LaunchScreen.xib */, 122 | 2967F3641B2D8A060081A66F /* Supporting Files */, 123 | ); 124 | path = TestGT; 125 | sourceTree = ""; 126 | }; 127 | 2967F3641B2D8A060081A66F /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 2967F3651B2D8A060081A66F /* Info.plist */, 131 | 2967F3661B2D8A060081A66F /* main.m */, 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | 72AA9A1CAA9843C092953931 /* Pods */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 48D3B2437F92B599485CFBD8 /* Pods-TestGT.debug.xcconfig */, 140 | 6C26E9BF8BF636B625252BDB /* Pods-TestGT.release.xcconfig */, 141 | ); 142 | name = Pods; 143 | sourceTree = ""; 144 | }; 145 | 73A8BFAC1C3286AE0082103E /* TestGTTests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 73A8BFAD1C3286AE0082103E /* TestGTTests.m */, 149 | 73A8BFAF1C3286AE0082103E /* Info.plist */, 150 | ); 151 | path = TestGTTests; 152 | sourceTree = ""; 153 | }; 154 | 73E6B7471C33B5CA00C808E0 /* TestGTUITests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 73E6B7481C33B5CA00C808E0 /* TestGTUITests.m */, 158 | 73E6B74A1C33B5CA00C808E0 /* Info.plist */, 159 | ); 160 | path = TestGTUITests; 161 | sourceTree = ""; 162 | }; 163 | E0AC11FB400D9E7930224D9C /* Frameworks */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | B99738970C5F9D1E49F630FA /* Pods_TestGT.framework */, 167 | ); 168 | name = Frameworks; 169 | sourceTree = ""; 170 | }; 171 | /* End PBXGroup section */ 172 | 173 | /* Begin PBXNativeTarget section */ 174 | 2967F3601B2D8A060081A66F /* TestGT */ = { 175 | isa = PBXNativeTarget; 176 | buildConfigurationList = 2967F3841B2D8A060081A66F /* Build configuration list for PBXNativeTarget "TestGT" */; 177 | buildPhases = ( 178 | 16C5BECE045892CC6C8B23B9 /* [CP] Check Pods Manifest.lock */, 179 | 2967F35D1B2D8A060081A66F /* Sources */, 180 | 2967F35E1B2D8A060081A66F /* Frameworks */, 181 | 2967F35F1B2D8A060081A66F /* Resources */, 182 | 86E4DDF7F2F238C1109F2BFF /* [CP] Embed Pods Frameworks */, 183 | E0494667E3FC4B86DDC90342 /* [CP] Copy Pods Resources */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | ); 189 | name = TestGT; 190 | productName = TestGT; 191 | productReference = 2967F3611B2D8A060081A66F /* TestGT.app */; 192 | productType = "com.apple.product-type.application"; 193 | }; 194 | 73A8BFAA1C3286AE0082103E /* TestGTTests */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 73A8BFB21C3286AE0082103E /* Build configuration list for PBXNativeTarget "TestGTTests" */; 197 | buildPhases = ( 198 | 73A8BFA71C3286AE0082103E /* Sources */, 199 | 73A8BFA81C3286AE0082103E /* Frameworks */, 200 | 73A8BFA91C3286AE0082103E /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 73A8BFB11C3286AE0082103E /* PBXTargetDependency */, 206 | ); 207 | name = TestGTTests; 208 | productName = TestGTTests; 209 | productReference = 73A8BFAB1C3286AE0082103E /* TestGTTests.xctest */; 210 | productType = "com.apple.product-type.bundle.unit-test"; 211 | }; 212 | 73E6B7451C33B5CA00C808E0 /* TestGTUITests */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 73E6B74F1C33B5CA00C808E0 /* Build configuration list for PBXNativeTarget "TestGTUITests" */; 215 | buildPhases = ( 216 | 73E6B7421C33B5CA00C808E0 /* Sources */, 217 | 73E6B7431C33B5CA00C808E0 /* Frameworks */, 218 | 73E6B7441C33B5CA00C808E0 /* Resources */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | 73E6B74C1C33B5CA00C808E0 /* PBXTargetDependency */, 224 | ); 225 | name = TestGTUITests; 226 | productName = TestGTUITests; 227 | productReference = 73E6B7461C33B5CA00C808E0 /* TestGTUITests.xctest */; 228 | productType = "com.apple.product-type.bundle.ui-testing"; 229 | }; 230 | /* End PBXNativeTarget section */ 231 | 232 | /* Begin PBXProject section */ 233 | 2967F3591B2D8A060081A66F /* Project object */ = { 234 | isa = PBXProject; 235 | attributes = { 236 | LastUpgradeCheck = 0700; 237 | ORGANIZATIONNAME = gt; 238 | TargetAttributes = { 239 | 2967F3601B2D8A060081A66F = { 240 | CreatedOnToolsVersion = 6.3.1; 241 | DevelopmentTeam = 2448B7W898; 242 | }; 243 | 73A8BFAA1C3286AE0082103E = { 244 | CreatedOnToolsVersion = 7.2; 245 | TestTargetID = 2967F3601B2D8A060081A66F; 246 | }; 247 | 73E6B7451C33B5CA00C808E0 = { 248 | CreatedOnToolsVersion = 7.2; 249 | TestTargetID = 2967F3601B2D8A060081A66F; 250 | }; 251 | }; 252 | }; 253 | buildConfigurationList = 2967F35C1B2D8A060081A66F /* Build configuration list for PBXProject "TestGT" */; 254 | compatibilityVersion = "Xcode 3.2"; 255 | developmentRegion = English; 256 | hasScannedForEncodings = 0; 257 | knownRegions = ( 258 | en, 259 | Base, 260 | ); 261 | mainGroup = 2967F3581B2D8A060081A66F; 262 | productRefGroup = 2967F3621B2D8A060081A66F /* Products */; 263 | projectDirPath = ""; 264 | projectRoot = ""; 265 | targets = ( 266 | 2967F3601B2D8A060081A66F /* TestGT */, 267 | 73A8BFAA1C3286AE0082103E /* TestGTTests */, 268 | 73E6B7451C33B5CA00C808E0 /* TestGTUITests */, 269 | ); 270 | }; 271 | /* End PBXProject section */ 272 | 273 | /* Begin PBXResourcesBuildPhase section */ 274 | 2967F35F1B2D8A060081A66F /* Resources */ = { 275 | isa = PBXResourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 2967F3701B2D8A060081A66F /* Main.storyboard in Resources */, 279 | 2967F3751B2D8A060081A66F /* LaunchScreen.xib in Resources */, 280 | 2967F3721B2D8A060081A66F /* Images.xcassets in Resources */, 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | 73A8BFA91C3286AE0082103E /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | 73E6B7441C33B5CA00C808E0 /* Resources */ = { 292 | isa = PBXResourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXResourcesBuildPhase section */ 299 | 300 | /* Begin PBXShellScriptBuildPhase section */ 301 | 16C5BECE045892CC6C8B23B9 /* [CP] Check Pods Manifest.lock */ = { 302 | isa = PBXShellScriptBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | ); 306 | inputPaths = ( 307 | ); 308 | name = "[CP] Check Pods Manifest.lock"; 309 | outputPaths = ( 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | shellPath = /bin/sh; 313 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 314 | showEnvVarsInLog = 0; 315 | }; 316 | 86E4DDF7F2F238C1109F2BFF /* [CP] Embed Pods Frameworks */ = { 317 | isa = PBXShellScriptBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | ); 321 | inputPaths = ( 322 | ); 323 | name = "[CP] Embed Pods Frameworks"; 324 | outputPaths = ( 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | shellPath = /bin/sh; 328 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-frameworks.sh\"\n"; 329 | showEnvVarsInLog = 0; 330 | }; 331 | E0494667E3FC4B86DDC90342 /* [CP] Copy Pods Resources */ = { 332 | isa = PBXShellScriptBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | ); 336 | inputPaths = ( 337 | ); 338 | name = "[CP] Copy Pods Resources"; 339 | outputPaths = ( 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | shellPath = /bin/sh; 343 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TestGT/Pods-TestGT-resources.sh\"\n"; 344 | showEnvVarsInLog = 0; 345 | }; 346 | /* End PBXShellScriptBuildPhase section */ 347 | 348 | /* Begin PBXSourcesBuildPhase section */ 349 | 2967F35D1B2D8A060081A66F /* Sources */ = { 350 | isa = PBXSourcesBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | 2967F36D1B2D8A060081A66F /* ViewController.m in Sources */, 354 | 2967F36A1B2D8A060081A66F /* AppDelegate.m in Sources */, 355 | 2967F3671B2D8A060081A66F /* main.m in Sources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | 73A8BFA71C3286AE0082103E /* Sources */ = { 360 | isa = PBXSourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | 73A8BFAE1C3286AE0082103E /* TestGTTests.m in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | 73E6B7421C33B5CA00C808E0 /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 73E6B7491C33B5CA00C808E0 /* TestGTUITests.m in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | /* End PBXSourcesBuildPhase section */ 376 | 377 | /* Begin PBXTargetDependency section */ 378 | 73A8BFB11C3286AE0082103E /* PBXTargetDependency */ = { 379 | isa = PBXTargetDependency; 380 | target = 2967F3601B2D8A060081A66F /* TestGT */; 381 | targetProxy = 73A8BFB01C3286AE0082103E /* PBXContainerItemProxy */; 382 | }; 383 | 73E6B74C1C33B5CA00C808E0 /* PBXTargetDependency */ = { 384 | isa = PBXTargetDependency; 385 | target = 2967F3601B2D8A060081A66F /* TestGT */; 386 | targetProxy = 73E6B74B1C33B5CA00C808E0 /* PBXContainerItemProxy */; 387 | }; 388 | /* End PBXTargetDependency section */ 389 | 390 | /* Begin PBXVariantGroup section */ 391 | 2967F36E1B2D8A060081A66F /* Main.storyboard */ = { 392 | isa = PBXVariantGroup; 393 | children = ( 394 | 2967F36F1B2D8A060081A66F /* Base */, 395 | ); 396 | name = Main.storyboard; 397 | sourceTree = ""; 398 | }; 399 | 2967F3731B2D8A060081A66F /* LaunchScreen.xib */ = { 400 | isa = PBXVariantGroup; 401 | children = ( 402 | 2967F3741B2D8A060081A66F /* Base */, 403 | ); 404 | name = LaunchScreen.xib; 405 | sourceTree = ""; 406 | }; 407 | /* End PBXVariantGroup section */ 408 | 409 | /* Begin XCBuildConfiguration section */ 410 | 2967F3821B2D8A060081A66F /* Debug */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_EMPTY_BODY = YES; 422 | CLANG_WARN_ENUM_CONVERSION = YES; 423 | CLANG_WARN_INT_CONVERSION = YES; 424 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 425 | CLANG_WARN_UNREACHABLE_CODE = YES; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 428 | COPY_PHASE_STRIP = NO; 429 | DEBUG_INFORMATION_FORMAT = dwarf; 430 | ENABLE_BITCODE = NO; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | ENABLE_TESTABILITY = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu99; 434 | GCC_DYNAMIC_NO_PIC = NO; 435 | GCC_NO_COMMON_BLOCKS = YES; 436 | GCC_OPTIMIZATION_LEVEL = 0; 437 | GCC_PREPROCESSOR_DEFINITIONS = ( 438 | "DEBUG=1", 439 | "$(inherited)", 440 | ); 441 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 442 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 443 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 444 | GCC_WARN_UNDECLARED_SELECTOR = YES; 445 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 446 | GCC_WARN_UNUSED_FUNCTION = YES; 447 | GCC_WARN_UNUSED_VARIABLE = YES; 448 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 449 | MTL_ENABLE_DEBUG_INFO = YES; 450 | ONLY_ACTIVE_ARCH = YES; 451 | SDKROOT = iphoneos; 452 | TARGETED_DEVICE_FAMILY = "1,2"; 453 | }; 454 | name = Debug; 455 | }; 456 | 2967F3831B2D8A060081A66F /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BOOL_CONVERSION = YES; 465 | CLANG_WARN_CONSTANT_CONVERSION = YES; 466 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 467 | CLANG_WARN_EMPTY_BODY = YES; 468 | CLANG_WARN_ENUM_CONVERSION = YES; 469 | CLANG_WARN_INT_CONVERSION = YES; 470 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 471 | CLANG_WARN_UNREACHABLE_CODE = YES; 472 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 473 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 474 | COPY_PHASE_STRIP = NO; 475 | DEBUG_INFORMATION_FORMAT = dwarf; 476 | ENABLE_BITCODE = NO; 477 | ENABLE_NS_ASSERTIONS = NO; 478 | ENABLE_STRICT_OBJC_MSGSEND = YES; 479 | GCC_C_LANGUAGE_STANDARD = gnu99; 480 | GCC_NO_COMMON_BLOCKS = YES; 481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 483 | GCC_WARN_UNDECLARED_SELECTOR = YES; 484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 485 | GCC_WARN_UNUSED_FUNCTION = YES; 486 | GCC_WARN_UNUSED_VARIABLE = YES; 487 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 488 | MTL_ENABLE_DEBUG_INFO = NO; 489 | SDKROOT = iphoneos; 490 | TARGETED_DEVICE_FAMILY = "1,2"; 491 | VALIDATE_PRODUCT = YES; 492 | }; 493 | name = Release; 494 | }; 495 | 2967F3851B2D8A060081A66F /* Debug */ = { 496 | isa = XCBuildConfiguration; 497 | baseConfigurationReference = 48D3B2437F92B599485CFBD8 /* Pods-TestGT.debug.xcconfig */; 498 | buildSettings = { 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 501 | CLANG_ENABLE_MODULES = YES; 502 | CLANG_ENABLE_MODULE_DEBUGGING = NO; 503 | CODE_SIGN_IDENTITY = "iPhone Developer"; 504 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 505 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 506 | ENABLE_BITCODE = NO; 507 | FRAMEWORK_SEARCH_PATHS = ( 508 | "$(inherited)", 509 | "$(PROJECT_DIR)/TestGT", 510 | "$(PROJECT_DIR)", 511 | ); 512 | INFOPLIST_FILE = TestGT/Info.plist; 513 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 515 | PRODUCT_BUNDLE_IDENTIFIER = com.geetest.demo; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | PROVISIONING_PROFILE = ""; 518 | }; 519 | name = Debug; 520 | }; 521 | 2967F3861B2D8A060081A66F /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | baseConfigurationReference = 6C26E9BF8BF636B625252BDB /* Pods-TestGT.release.xcconfig */; 524 | buildSettings = { 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 527 | CLANG_ENABLE_MODULES = YES; 528 | CLANG_ENABLE_MODULE_DEBUGGING = NO; 529 | CODE_SIGN_IDENTITY = "iPhone Developer"; 530 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 531 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 532 | ENABLE_BITCODE = NO; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "$(PROJECT_DIR)/TestGT", 536 | "$(PROJECT_DIR)", 537 | ); 538 | INFOPLIST_FILE = TestGT/Info.plist; 539 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 540 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 541 | PRODUCT_BUNDLE_IDENTIFIER = com.geetest.demo; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | PROVISIONING_PROFILE = ""; 544 | }; 545 | name = Release; 546 | }; 547 | 73A8BFB31C3286AE0082103E /* Debug */ = { 548 | isa = XCBuildConfiguration; 549 | buildSettings = { 550 | BUNDLE_LOADER = "$(TEST_HOST)"; 551 | FRAMEWORK_SEARCH_PATHS = ( 552 | "$(inherited)", 553 | "$(PROJECT_DIR)", 554 | ); 555 | INFOPLIST_FILE = TestGTTests/Info.plist; 556 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 557 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 558 | PRODUCT_BUNDLE_IDENTIFIER = com.nikoxu.TestGTTests; 559 | PRODUCT_NAME = "$(TARGET_NAME)"; 560 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestGT.app/TestGT"; 561 | }; 562 | name = Debug; 563 | }; 564 | 73A8BFB41C3286AE0082103E /* Release */ = { 565 | isa = XCBuildConfiguration; 566 | buildSettings = { 567 | BUNDLE_LOADER = "$(TEST_HOST)"; 568 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 569 | FRAMEWORK_SEARCH_PATHS = ( 570 | "$(inherited)", 571 | "$(PROJECT_DIR)", 572 | ); 573 | INFOPLIST_FILE = TestGTTests/Info.plist; 574 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 575 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 576 | PRODUCT_BUNDLE_IDENTIFIER = com.nikoxu.TestGTTests; 577 | PRODUCT_NAME = "$(TARGET_NAME)"; 578 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestGT.app/TestGT"; 579 | }; 580 | name = Release; 581 | }; 582 | 73E6B74D1C33B5CA00C808E0 /* Debug */ = { 583 | isa = XCBuildConfiguration; 584 | buildSettings = { 585 | FRAMEWORK_SEARCH_PATHS = ( 586 | "$(inherited)", 587 | "$(PROJECT_DIR)", 588 | ); 589 | INFOPLIST_FILE = TestGTUITests/Info.plist; 590 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 591 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 592 | PRODUCT_BUNDLE_IDENTIFIER = com.nikoxu.TestGTUITests; 593 | PRODUCT_NAME = "$(TARGET_NAME)"; 594 | TEST_TARGET_NAME = TestGT; 595 | USES_XCTRUNNER = YES; 596 | }; 597 | name = Debug; 598 | }; 599 | 73E6B74E1C33B5CA00C808E0 /* Release */ = { 600 | isa = XCBuildConfiguration; 601 | buildSettings = { 602 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 603 | FRAMEWORK_SEARCH_PATHS = ( 604 | "$(inherited)", 605 | "$(PROJECT_DIR)", 606 | ); 607 | INFOPLIST_FILE = TestGTUITests/Info.plist; 608 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 609 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 610 | PRODUCT_BUNDLE_IDENTIFIER = com.nikoxu.TestGTUITests; 611 | PRODUCT_NAME = "$(TARGET_NAME)"; 612 | TEST_TARGET_NAME = TestGT; 613 | USES_XCTRUNNER = YES; 614 | }; 615 | name = Release; 616 | }; 617 | /* End XCBuildConfiguration section */ 618 | 619 | /* Begin XCConfigurationList section */ 620 | 2967F35C1B2D8A060081A66F /* Build configuration list for PBXProject "TestGT" */ = { 621 | isa = XCConfigurationList; 622 | buildConfigurations = ( 623 | 2967F3821B2D8A060081A66F /* Debug */, 624 | 2967F3831B2D8A060081A66F /* Release */, 625 | ); 626 | defaultConfigurationIsVisible = 0; 627 | defaultConfigurationName = Release; 628 | }; 629 | 2967F3841B2D8A060081A66F /* Build configuration list for PBXNativeTarget "TestGT" */ = { 630 | isa = XCConfigurationList; 631 | buildConfigurations = ( 632 | 2967F3851B2D8A060081A66F /* Debug */, 633 | 2967F3861B2D8A060081A66F /* Release */, 634 | ); 635 | defaultConfigurationIsVisible = 0; 636 | defaultConfigurationName = Release; 637 | }; 638 | 73A8BFB21C3286AE0082103E /* Build configuration list for PBXNativeTarget "TestGTTests" */ = { 639 | isa = XCConfigurationList; 640 | buildConfigurations = ( 641 | 73A8BFB31C3286AE0082103E /* Debug */, 642 | 73A8BFB41C3286AE0082103E /* Release */, 643 | ); 644 | defaultConfigurationIsVisible = 0; 645 | defaultConfigurationName = Release; 646 | }; 647 | 73E6B74F1C33B5CA00C808E0 /* Build configuration list for PBXNativeTarget "TestGTUITests" */ = { 648 | isa = XCConfigurationList; 649 | buildConfigurations = ( 650 | 73E6B74D1C33B5CA00C808E0 /* Debug */, 651 | 73E6B74E1C33B5CA00C808E0 /* Release */, 652 | ); 653 | defaultConfigurationIsVisible = 0; 654 | defaultConfigurationName = Release; 655 | }; 656 | /* End XCConfigurationList section */ 657 | }; 658 | rootObject = 2967F3591B2D8A060081A66F /* Project object */; 659 | } 660 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TestGT 4 | // 5 | // Created by LYJ on 15/6/14. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TestGT 4 | // 5 | // Created by LYJ on 15/6/14. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface CustomClass : NSObject 12 | 13 | @property (nonatomic, strong) NSString *customClassValue; 14 | @property (nonatomic, strong) NSNumber *customNumber; 15 | 16 | @end 17 | 18 | @implementation CustomClass 19 | 20 | 21 | 22 | @end 23 | 24 | 25 | @interface AppDelegate () 26 | 27 | @end 28 | 29 | @implementation AppDelegate 30 | 31 | 32 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 33 | return YES; 34 | } 35 | 36 | - (void)applicationWillResignActive:(UIApplication *)application { 37 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 38 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 39 | } 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 43 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 44 | } 45 | 46 | - (void)applicationWillEnterForeground:(UIApplication *)application { 47 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 48 | } 49 | 50 | - (void)applicationDidBecomeActive:(UIApplication *)application { 51 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 52 | } 53 | 54 | - (void)applicationWillTerminate:(UIApplication *)application { 55 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon_58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon_87.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "40x40", 17 | "idiom" : "iphone", 18 | "filename" : "icon_80.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon_120.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "60x60", 29 | "idiom" : "iphone", 30 | "filename" : "icon_120.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "icon_180.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "29x29", 41 | "idiom" : "ipad", 42 | "filename" : "icon_29.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "icon_58.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "40x40", 53 | "idiom" : "ipad", 54 | "filename" : "icon_40.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "icon_80.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "76x76", 65 | "idiom" : "ipad", 66 | "filename" : "icon_76.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "icon_152.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "83.5x83.5", 77 | "idiom" : "ipad", 78 | "filename" : "icon_167.png", 79 | "scale" : "2x" 80 | } 81 | ], 82 | "info" : { 83 | "version" : 1, 84 | "author" : "xcode" 85 | }, 86 | "properties" : { 87 | "pre-rendered" : true 88 | } 89 | } -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_120.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_152.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_167.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_180.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_29.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_40.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_58.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_76.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_80.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/AppIcon.appiconset/icon_87.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "LaunchImage12422208.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "LaunchImage22081242.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "LaunchImage7501334.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "extent" : "full-screen", 34 | "minimum-system-version" : "7.0", 35 | "filename" : "LaunchImage640960.png", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "LaunchImage6401136.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "extent" : "full-screen", 51 | "minimum-system-version" : "7.0", 52 | "filename" : "LaunchImage7681024.png", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "extent" : "full-screen", 59 | "minimum-system-version" : "7.0", 60 | "filename" : "LaunchImage1024768.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "extent" : "full-screen", 67 | "minimum-system-version" : "7.0", 68 | "filename" : "LaunchImage15362028.png", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "extent" : "full-screen", 75 | "minimum-system-version" : "7.0", 76 | "filename" : "LaunchImage20281536.png", 77 | "scale" : "2x" 78 | } 79 | ], 80 | "info" : { 81 | "version" : 1, 82 | "author" : "xcode" 83 | } 84 | } -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage1024768.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage1024768.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage12422208.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage12422208.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage15362028.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage15362028.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage20281536.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage20281536.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage22081242.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage22081242.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage6401136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage6401136.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage640960.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage640960.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage7501334.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage7501334.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage7681024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/gt-iOS-sdk-failback -demo/TestGT/Images.xcassets/LaunchImage.launchimage/LaunchImage7681024.png -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.7 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UIRequiresFullScreen 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | UIInterfaceOrientationPortraitUpsideDown 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TestGT 4 | // 5 | // Created by LYJ on 15/6/14. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TestGT 4 | // 5 | // !!! this is a demo app. we just give you a sample in this demo. you can code or change what you need. 6 | // 7 | // Created by LYJ on 15/6/14. 8 | // Copyright (c) 2015年 gt. All rights reserved. 9 | // 10 | 11 | /** 12 | * 将下面用于演示的的两个接口替换成你们服务端配置的 13 | * 切勿在正式版本或者发布版本里使用以下两个api, 我们可能在以后的demo版本里修改此处的两个api 14 | * 并且在标有'TODO'的地方写上你们的处理逻辑 15 | */ 16 | //客户端向网站主服务端请求gt验证的接口(api_1) 17 | #define api_1 @"http://api.apiapp.cc/gtcap/start-mobile-captcha/" 18 | //网站主部署的二次验证链接 (api_2) 19 | #define api_2 @"http://api.apiapp.cc/gtcap/gt-server-validate/" 20 | 21 | 22 | #import "ViewController.h" 23 | #import 24 | 25 | 26 | @interface ViewController () 27 | 28 | @property (nonatomic, strong) GTManager *manager; 29 | 30 | - (IBAction)switchDebugMode:(id)sender; 31 | 32 | - (IBAction)testAction:(id)sender; 33 | 34 | @end 35 | 36 | @implementation ViewController 37 | 38 | - (GTManager *)manager { 39 | if (!_manager) { 40 | _manager = [[GTManager alloc] init]; 41 | [_manager setGTDelegate:self]; 42 | 43 | /** 以下方法按需使用,非必要方法,有默认值 */ 44 | //debug配置 45 | [_manager enableDebugMode:NO]; 46 | //https配置 47 | [_manager useSecurityAuthentication:YES]; 48 | //多语言配置 49 | [_manager languageSwitch:LANGTYPE_AUTO]; 50 | //状态指示器配置 51 | [_manager configureAnimatedAcitvityIndicator:^(CALayer *layer, CGSize size, UIColor *color) { 52 | [self setupIndicatorAnimationSample2:layer withSize:size tintColor:color]; 53 | } withIndicatorType:GTIndicatorCustomType]; 54 | //配置布局方式 55 | [_manager useGTViewWithPresentType:GTPopupCenterType]; 56 | //验证高度约束 57 | [_manager useGTViewWithHeightConstraintType:GTViewHeightConstraintLargeViewWithLogo]; 58 | //使用背景模糊 59 | [_manager useVisualViewWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]]; 60 | //验证背景颜色(例:yellow rgb(255,200,50)) 61 | [_manager setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:0.3]]; 62 | /** 注释在此结束 */ 63 | } 64 | return _manager; 65 | } 66 | 67 | - (void)viewDidLoad { 68 | [super viewDidLoad]; 69 | } 70 | 71 | - (void)didReceiveMemoryWarning { 72 | [super didReceiveMemoryWarning]; 73 | } 74 | 75 | - (IBAction)switchDebugMode:(id)sender { 76 | UISwitch *mSwitch = (UISwitch *)sender; 77 | if (mSwitch.isOn) { 78 | [self.manager enableDebugMode:YES]; 79 | }else{ 80 | [self.manager enableDebugMode:NO]; 81 | } 82 | } 83 | 84 | //验证触发条件, 可以根据业务需求设计 85 | - (IBAction)testAction:(id)sender { 86 | //dismiss keyboard if there is a keyboard. 87 | [self.view endEditing:YES]; 88 | [self requestGTest]; 89 | } 90 | 91 | /** 92 | * 向custom服务器请求gt验证 93 | * 94 | * @discussion 开启验证前需要向网站主的服务器获取相应的验证数据(id,challenge,success),这块根据用户的网络情况需要若干时间来完成,建议在使用异步请求方式时提供状态指示器以告诉用户验证状态。 95 | * 96 | */ 97 | - (void)requestGTest { 98 | 99 | __weak __typeof(self) weakSelf = self; 100 | 101 | /** TODO 在此写入客户端首次向网站主服务端请求gt验证的链接(api_1) (replace demo api_1 with yours)*/ 102 | NSURL *requestGTestURL = [NSURL URLWithString:[NSString stringWithFormat:api_1]]; 103 | 104 | //验证通过时调用 105 | GTCallFinishBlock finishBlock = ^(NSString *code, NSDictionary *result, NSString *message) { 106 | 107 | if ([code isEqualToString:@"1"]) { 108 | //在用户服务器进行二次验证(start Secondery-Validate) 109 | [weakSelf seconderyValidate:code result:result message:message]; 110 | /**UI请在主线程操作*/ 111 | } 112 | else { 113 | NSLog(@"code : %@, message : %@",code,message); 114 | } 115 | 116 | }; 117 | 118 | //用户关闭验证时调用 119 | GTCallCloseBlock closeBlock = ^{ 120 | //用户关闭验证后执行的方法 121 | NSLog(@"close geetest"); 122 | }; 123 | 124 | //默认failback处理, 在此打开验证 125 | GTDefaultCaptchaHandlerBlock defaultCaptchaHandlerBlock = ^(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code) { 126 | 127 | //根据custom server的返回success字段判断是否开启failback 128 | if ([gt_success_code intValue] == 1) { 129 | 130 | if (gt_captcha_id.length == 32) { 131 | //打开极速验证,在此处完成gt验证结果的返回 132 | [weakSelf.manager openGTViewAddFinishHandler:finishBlock closeHandler:closeBlock animated:YES]; 133 | } 134 | else { 135 | NSLog(@"invalid geetest ID, please set right ID"); 136 | } 137 | 138 | } 139 | else { 140 | //TODO 当极验服务器不可用时,将执行此处网站主的自定义验证方法或者其他处理方法(gt-server is not available, add your handler methods in here) 141 | /**请网站主务必考虑这一处的逻辑处理,否者当极验服务不可用的时候会导致用户的业务无法正常执行*/ 142 | UIAlertView *warning = [[UIAlertView alloc] initWithTitle:@"Warning" 143 | message:@"极验验证服务异常不可用,请准备备用验证" 144 | delegate:self 145 | cancelButtonTitle:@"OK" 146 | otherButtonTitles:nil, nil]; 147 | dispatch_async(dispatch_get_main_queue(), ^{ 148 | [warning show]; 149 | }); 150 | NSLog(@"极验验证服务暂时不可用,请网站主在此写入启用备用验证的方法"); 151 | } 152 | }; 153 | 154 | //配置验证, 必须weak, 否则内存泄露 155 | [weakSelf.manager configureGTest:requestGTestURL 156 | timeout:15.0 157 | withCookieName:nil 158 | options:GTDefaultAsynchronousRequest 159 | completionHandler:defaultCaptchaHandlerBlock]; 160 | 161 | } 162 | 163 | /** 164 | * 二次验证是验证的必要环节,此方法的构造供参考,可根据需求自行调整(NSURLSession is just a sample for this demo. You can choose what you want to complete this step.) 165 | * 考虑到nsurlsession的是苹果推荐的网络库,并且希望开发者了解这块的逻辑以及重要性,而没使用使用大家熟悉的AFNetworking 166 | * 使用POST请求将 result 以表单格式发送至网站主服务器进行二次验证, 集成极验提供的server sdk会根据提交的数据作出判断并且返回相应的结果 167 | * 168 | * @param code <#code description#> 169 | * @param result <#result description#> 170 | * @param message <#message description#> 171 | */ 172 | - (void)seconderyValidate:(NSString *)code result:(NSDictionary *)result message:(NSString *)message { 173 | if (code && result) { 174 | @try { 175 | if ([code isEqualToString:@"1"]) { 176 | __block NSMutableString *postResult = [[NSMutableString alloc] init]; 177 | 178 | //TODO 行为判定通过,进行二次验证,替换成你的api_2(replace this demo's api_2 with yours) 179 | //‼️请不要在发行版本里使用我们仅供演示的二次验证API, 此API我们可能修改 180 | /** custom_server_validate_url 网站主部署的二次验证链接 (api_2)*/ 181 | NSString *custom_server_validate_url = api_2; 182 | NSDictionary *headerFields = @{@"Content-Type":@"application/x-www-form-urlencoded;charset=UTF-8"}; 183 | 184 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:custom_server_validate_url]]; 185 | [result enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) { 186 | [postResult appendFormat:@"%@=%@&",key,obj]; 187 | }]; 188 | NSLog(@"postResult: %@",postResult); 189 | if (postResult.length > 0) { 190 | 191 | NSURLSessionConfiguration *configurtion = [NSURLSessionConfiguration defaultSessionConfiguration]; 192 | configurtion.allowsCellularAccess = YES; 193 | configurtion.HTTPAdditionalHeaders = headerFields; 194 | configurtion.timeoutIntervalForRequest = 15.0; 195 | configurtion.timeoutIntervalForResource = 15.0; 196 | 197 | NSURLSession *session = [NSURLSession sessionWithConfiguration:configurtion]; 198 | request.HTTPMethod = @"POST"; 199 | // demo中与仅仅使用表单格式格式化二次验证数据作为演示, 使用其他的格式也是可以的, 但需要与网站主的服务端沟通好以便提交并解析数据 200 | request.HTTPBody = [postResult dataUsingEncoding:NSUTF8StringEncoding]; 201 | 202 | NSURLSessionDataTask *sessionDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { 203 | 204 | NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; 205 | 206 | if (data.length > 0 && !error) { 207 | if (httpResponse.statusCode == 200) { 208 | // TODO 二次验证成功后执行的方法(after finish Secondery-Validate, to do something) 209 | NSError *err = nil; 210 | NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&err]; 211 | 212 | if (!err) { 213 | //Demo配套的使用的是python server sdk, response里的返回的是success/fail表示二次验证结果 214 | if ([[dic objectForKey:@"msg"] isEqualToString:@"success"]) { 215 | 216 | // TODO 验证成功(Secondery-Validate success) 217 | NSLog(@"captcha success"); 218 | [self showSuccessView:YES]; 219 | 220 | } 221 | else { 222 | // TODO 验证失败(Secondery-Validate fail) 223 | [self showSuccessView:NO]; 224 | NSLog(@"secondery captcha failed, server response: %@", dic); 225 | } 226 | } 227 | else { 228 | NSLog(@"JSON Format Error: %@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); 229 | } 230 | } 231 | else { 232 | NSLog(@"statusCode: %ld", (long)httpResponse.statusCode); 233 | } 234 | } 235 | else { 236 | NSLog(@"error: %@", error.localizedDescription); 237 | } 238 | }]; 239 | [sessionDataTask resume]; 240 | 241 | [session finishTasksAndInvalidate]; 242 | } 243 | 244 | } else { 245 | NSLog(@"client captcha failed:\ncode :%@ message:%@ result:%@", code, message, result); 246 | } 247 | } 248 | @catch (NSException *exception) { 249 | NSLog(@"client captcha exception:%@", exception.description); 250 | } 251 | @finally { 252 | 253 | } 254 | } 255 | } 256 | 257 | /** 258 | * custom animation sample 259 | */ 260 | - (void)setupIndicatorAnimationSample2:(CALayer *)layer withSize:(CGSize)size tintColor:(UIColor *)color{ 261 | color = [UIColor colorWithRed:0.7 green:0.7 blue:0.7 alpha:1.0]; 262 | NSTimeInterval beginTime = CACurrentMediaTime(); 263 | 264 | CGFloat oX = (layer.bounds.size.width - size.width) / 2.0f; 265 | CGFloat oY = (layer.bounds.size.height - size.height) / 2.0f; 266 | for (int i = 0; i < 4; i++) { 267 | CALayer *circle = [CALayer layer]; 268 | circle.frame = CGRectMake(oX, oY, size.width, size.height); 269 | [circle setShouldRasterize:NO]; 270 | [circle setMasksToBounds:NO]; 271 | [circle setContentsScale:[UIScreen mainScreen].scale]; 272 | circle.backgroundColor = color.CGColor; 273 | circle.anchorPoint = CGPointMake(0.5f, 0.5f); 274 | circle.opacity = 0.6f; 275 | circle.cornerRadius = circle.bounds.size.height / 2.0f; 276 | circle.transform = CATransform3DMakeScale(0.0f, 0.0f, 0.0f); 277 | 278 | CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath:@"transform"]; 279 | transformAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(0.0f, 0.0f, 0.0f)]; 280 | transformAnimation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0f, 1.0f, 0.0f)]; 281 | 282 | CABasicAnimation *opacityAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; 283 | opacityAnimation.fromValue = @(0.7f); 284 | opacityAnimation.toValue = @(0.0f); 285 | 286 | CAAnimationGroup *animationGroup = [CAAnimationGroup animation]; 287 | animationGroup.removedOnCompletion = NO; 288 | animationGroup.beginTime = beginTime + i * 0.2f; 289 | animationGroup.repeatCount = HUGE_VALF; 290 | animationGroup.duration = 1.2f; 291 | animationGroup.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 292 | animationGroup.animations = @[transformAnimation, opacityAnimation]; 293 | 294 | [layer addSublayer:circle]; 295 | [circle addAnimation:animationGroup forKey:@"animation"]; 296 | } 297 | } 298 | 299 | //you can kick this method out of your projects 300 | - (void)showSuccessView:(BOOL)result{ 301 | 302 | UIAlertView *seconderyResult = [[UIAlertView alloc] initWithTitle:@"二次验证结果" 303 | message:result?@"成功":@"失败" 304 | delegate:self 305 | cancelButtonTitle:@"确定" 306 | otherButtonTitles:nil, nil]; 307 | dispatch_async(dispatch_get_main_queue(), ^{ 308 | [seconderyResult show]; 309 | }); 310 | } 311 | 312 | #pragma --mark GTManageDelegate 313 | 314 | - (void)GTNetworkErrorHandler:(NSError *)error{ 315 | //不推荐直接使用alert将错误弹出, 请对错误做一个判断, 参照开发文档 316 | //使用alert是为了方便用于演示 317 | 318 | if (error.code == -999) { 319 | //忽略此类型错误, 仅打印 320 | //用户在加载请求时, 关闭验证可能导致此错误 321 | NSLog(@"[GTSDK] Error: %@", error.localizedDescription); 322 | } 323 | else { 324 | UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"There's a trouble" 325 | message:error.localizedDescription 326 | delegate:self 327 | cancelButtonTitle:@"Ok" 328 | otherButtonTitles:nil, nil]; 329 | dispatch_async(dispatch_get_main_queue(), ^{ 330 | __weak __typeof(self) weakSelf = self; 331 | [weakSelf.manager closeGTViewIfIsOpen]; 332 | [errorAlert show]; 333 | }); 334 | NSLog(@"[GTSDK] Error: %@", error.localizedDescription); 335 | } 336 | 337 | } 338 | 339 | @end 340 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGT/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TestGT 4 | // 5 | // Created by LYJ on 15/6/14. 6 | // Copyright (c) 2015年 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGTTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGTTests/TestGTTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestGTTests.m 3 | // TestGTTests 4 | // 5 | // Created by NikoXu on 12/29/15. 6 | // Copyright © 2015 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface TestGTTests : XCTestCase 13 | 14 | @property (nonatomic, strong) GTManager *manager; 15 | 16 | @property (nonatomic, strong) NSURL *requestGTestURL; 17 | 18 | @property (nonatomic, strong) XCTestExpectation *customExpectation; 19 | 20 | @end 21 | 22 | @implementation TestGTTests 23 | 24 | - (GTManager *)manager{ 25 | if (!_manager) { 26 | _manager = [GTManager sharedGTManager]; 27 | [_manager enableDebugMode:NO]; 28 | [_manager setGTDelegate:self]; 29 | } 30 | return _manager; 31 | } 32 | 33 | - (NSURL*)requestGTestURL{ 34 | if (!_requestGTestURL) { 35 | _requestGTestURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://webapi.geelao.ren:8011/gtcap/start-mobile-captcha/"]]; 36 | } 37 | return _requestGTestURL; 38 | } 39 | 40 | - (void)setUp { 41 | [super setUp]; 42 | // Put setup code here. This method is called before the invocation of each test method in the class. 43 | } 44 | 45 | - (void)tearDown { 46 | // Put teardown code here. This method is called after the invocation of each test method in the class. 47 | [super tearDown]; 48 | } 49 | 50 | /** 51 | * 测试默认的failback同步请求 52 | */ 53 | - (void)testDefaultSyncRequestCaptchaData { 54 | 55 | XCTestExpectation * expectation = [self expectationWithDescription:@"Check Sync Data"]; 56 | 57 | [self.manager configureGTest:self.requestGTestURL 58 | timeout:15.0 59 | withCookieName:@"msid" 60 | options:GTDefaultSynchronousRequest 61 | completionHandler:^(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code) { 62 | NSLog(@"%@",gt_captcha_id); 63 | XCTAssertTrue(gt_captcha_id.length == 32, @"invalid gt id"); 64 | XCTAssertTrue(gt_challenge.length == 32, @"invalid challenge"); 65 | XCTAssertTrue([gt_success_code intValue] == 1, @"UNEXCEPTED SUCCESS CODE"); 66 | [expectation fulfill]; 67 | }]; 68 | 69 | [self waitForExpectationsWithTimeout:15.0 handler:nil]; 70 | } 71 | 72 | /** 73 | * 测试默认的failback异步请求 74 | */ 75 | - (void)testDefaultAsyncRequestCaptchaData { 76 | 77 | XCTestExpectation * expectation = [self expectationWithDescription:@"Check Async Data"]; 78 | 79 | [self.manager configureGTest:self.requestGTestURL 80 | timeout:15.0 81 | withCookieName:@"msid" 82 | options:GTDefaultAsynchronousRequest 83 | completionHandler:^(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code) { 84 | NSLog(@"%@",gt_captcha_id); 85 | XCTAssertTrue(gt_captcha_id.length == 32, @"invalid gt id"); 86 | XCTAssertTrue(gt_challenge.length == 32, @"invalid challenge"); 87 | XCTAssertTrue([gt_success_code intValue] == 1, @"UNEXCEPTED SUCCESS CODE"); 88 | [expectation fulfill]; 89 | }]; 90 | 91 | [self waitForExpectationsWithTimeout:15.0 handler:nil]; 92 | } 93 | 94 | /** 95 | * 测试自定义的failback验证,因为是验证产品的关系,需要人工操作通过一次验证 96 | */ 97 | - (void)testCustomFailbackCaptcha{ 98 | 99 | self.customExpectation = [self expectationWithDescription:@"Test Custom Captcha"]; 100 | //创建请求 101 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:self.requestGTestURL 102 | cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData 103 | timeoutInterval:15.0]; 104 | NSURLSessionConfiguration *configurtion = [NSURLSessionConfiguration defaultSessionConfiguration]; 105 | configurtion.allowsCellularAccess = YES; 106 | configurtion.timeoutIntervalForRequest = 15.0; 107 | configurtion.timeoutIntervalForResource = 15.0; 108 | NSURLSession *session = [NSURLSession sessionWithConfiguration:configurtion]; 109 | request.HTTPMethod = @"GET"; 110 | NSURLSessionDataTask *sessionDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { 111 | NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; 112 | if (httpResponse.statusCode == 200) { 113 | if (data && !error) { 114 | NSDictionary *customRetDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; 115 | [self performSelectorOnMainThread:@selector(requestGeeTestWithDictionary:) withObject:customRetDict waitUntilDone:YES]; 116 | }else{ 117 | NSLog(@"error: %@",error.localizedDescription); 118 | } 119 | }else{ 120 | NSLog(@"statusCode: %ld",(long)httpResponse.statusCode); 121 | } 122 | }]; 123 | [sessionDataTask resume]; 124 | 125 | [self waitForExpectationsWithTimeout:30.0 handler:^(NSError * _Nullable error) { 126 | NSLog(@"WARNING: You should finish the captcha to complete this test."); 127 | }]; 128 | } 129 | 130 | - (void)testGTCaptchaWithDebugMode { 131 | 132 | self.customExpectation = [self expectationWithDescription:@"Test Captcha With DebugMode"]; 133 | 134 | [self.manager enableDebugMode:YES]; 135 | [self.manager configureGTest:self.requestGTestURL 136 | timeout:15.0 137 | withCookieName:nil 138 | options:GTDefaultSynchronousRequest completionHandler:^(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code) { 139 | if ([self.manager serverStatusWithCaptcha_id:gt_captcha_id]) { 140 | [self.manager openGTViewAddFinishHandler:^(NSString *code, NSDictionary *result, NSString *message) { 141 | [self.customExpectation fulfill]; 142 | } closeHandler:^{ 143 | 144 | } animated:YES]; 145 | } 146 | }]; 147 | 148 | [self waitForExpectationsWithTimeout:30.0 handler:^(NSError * _Nullable error) { 149 | NSLog(@"WARNING: You should finish the captcha to complete this test."); 150 | }]; 151 | } 152 | 153 | /** 154 | * 测试HTTPS,因为是验证产品的关系,需要人工操作通过一次验证 155 | */ 156 | - (void)testHTTPs{ 157 | [self.manager useSecurityAuthentication:YES]; 158 | 159 | self.customExpectation = [self expectationWithDescription:@"Test HTTPs"]; 160 | 161 | [self.manager configureGTest:self.requestGTestURL 162 | timeout:15.0 163 | withCookieName:nil 164 | options:GTDefaultSynchronousRequest 165 | completionHandler:^(NSString *gt_captcha_id, NSString *gt_challenge, NSNumber *gt_success_code) { 166 | [self coreCaptchaMethod:gt_captcha_id withChallenge:gt_challenge succesCode:gt_success_code]; 167 | }]; 168 | [self waitForExpectationsWithTimeout:30.0 handler:^(NSError * _Nullable error) { 169 | NSLog(@"WARNING: You should finish the captcha to complete this test. Or there are some errors with SSL."); 170 | }]; 171 | } 172 | 173 | /** 174 | * 测试错误处理,因为本测试用例中的超时错误提示是很难发生的, 尤其是在网络质量好的情况下多是失败的 175 | */ 176 | - (void)testErrorHandle{ 177 | 178 | [self.manager configureGTest:self.requestGTestURL 179 | timeout:1.0 180 | withCookieName:@"msid" 181 | options:GTDefaultSynchronousRequest 182 | completionHandler:nil]; 183 | } 184 | 185 | 186 | - (void)testPerformanceExample { 187 | // This is an example of a performance test case. 188 | [self measureBlock:^{ 189 | // Put the code you want to measure the time of here. 190 | }]; 191 | } 192 | 193 | /** 194 | * 根据获取的failback验证信息开启验证 195 | * 196 | * @param dic 从服务端解析的数据字典 197 | */ 198 | - (void)requestGeeTestWithDictionary:(NSDictionary *)dic{ 199 | 200 | /** 201 | * 对你们服务器返回的数据进行解析 202 | 必要数据: 203 | 极验验证的服务状态: "success" 表示可用 204 | 极验验证的验证ID: "ad872a4e1a51888967bdb7cb45589605" 205 | 以下依旧以极验的演示用的测试中心提供的数据为举例 206 | */ 207 | 208 | NSString *gt_captcha_id = [dic objectForKey:@"gt"]; 209 | NSString *gt_challenge = [dic objectForKey:@"challenge"]; 210 | NSNumber *gt_success = [dic objectForKey:@"success"]; 211 | NSLog(@"id : %@, challenge : %@",gt_captcha_id,gt_challenge); 212 | 213 | [self coreCaptchaMethod:gt_captcha_id withChallenge:gt_challenge succesCode:gt_success]; 214 | 215 | } 216 | 217 | - (void)coreCaptchaMethod:(NSString *)gt_captcha_id withChallenge:(NSString *)gt_challenge succesCode:(NSNumber *)gt_success{ 218 | //如果failback使用我们的静态验证方式,下面的bool值填入YES/true 219 | if ([gt_success intValue] == 1) { 220 | //根据custom server的返回字段判断是否开启failback 221 | if ([self.manager configureGTest:gt_captcha_id challenge:gt_challenge success: gt_success]) { 222 | //打开极速验证,在此处完成gt验证结果的返回 223 | [self.manager openGTViewAddFinishHandler:^(NSString *code, NSDictionary *result, NSString *message) { 224 | 225 | if ([code isEqualToString:@"1"]) { 226 | //在用户服务器进行二次验证(start Secondery-Validate) 227 | NSLog(@"验证成功"); 228 | } else { 229 | NSLog(@"code : %@, message : %@",code,message); 230 | } 231 | [self.customExpectation fulfill]; 232 | } closeHandler:^{ 233 | //用户关闭验证后执行的方法 234 | NSLog(@"close geetest"); 235 | } animated:YES]; 236 | } else { 237 | // TODO 写上检测网络的方法,或者不做任何处理(network error,check your network) 238 | NSLog(@"连接网站主服务器异常,网络不通畅"); 239 | } 240 | }else{ 241 | //TODO 当极验服务器不可用时,将执行此处网站主的自定义验证方法或者其他处理方法(gt-server is not available, add your hanle methods) 242 | /** 请网站主务必考虑这一处的逻辑处理,否者当极验服务不可用的时候会导致用户的业务无法正常执行*/ 243 | NSLog(@"极验验证服务暂时不可用,请网站主在此写入启用备用验证的方法"); 244 | } 245 | } 246 | 247 | #pragma mark -- GTManageDelegate 248 | 249 | - (void)GTNetworkErrorHandler:(NSError *)error{ 250 | if (error.code == NSURLErrorTimedOut) { 251 | XCTAssertTrue(error.code == -1001, @"it's timeout but show wrong code"); 252 | }else if (error.code == NSURLErrorCannotConnectToHost){ 253 | XCTAssertTrue(error.code == -1004, @"it can't connect to server but show wrong code"); 254 | }else if (error.code == NSURLErrorNotConnectedToInternet){ 255 | XCTAssertTrue(error.code == -1009, @"it can't connect to internet but show wrong code"); 256 | } 257 | } 258 | 259 | @end 260 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGTUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /gt-iOS-sdk-failback -demo/TestGTUITests/TestGTUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestGTUITests.m 3 | // TestGTUITests 4 | // 5 | // Created by NikoXu on 12/30/15. 6 | // Copyright © 2015 gt. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TestGTUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TestGTUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; 39 | [[[XCUIApplication alloc] init].navigationBars[@"View"].buttons[@"\u6d4b\u8bd5"] tap]; 40 | 41 | } 42 | 43 | - (void)testOpenAndClose { 44 | [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; 45 | 46 | XCUIApplication *app = [[XCUIApplication alloc] init]; 47 | [app.navigationBars[@"View"].buttons[@"\u6d4b\u8bd5"] tap]; 48 | [[[[[app childrenMatchingType:XCUIElementTypeWindow] elementBoundByIndex:0] childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:1] tap]; 49 | 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /img/demo_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/demo_0.png -------------------------------------------------------------------------------- /img/demo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/demo_1.png -------------------------------------------------------------------------------- /img/demo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/demo_2.png -------------------------------------------------------------------------------- /img/geetest_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/geetest_flow.png -------------------------------------------------------------------------------- /img/geetest_ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/geetest_ios.png -------------------------------------------------------------------------------- /img/indicator_custom_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/indicator_custom_sample.png -------------------------------------------------------------------------------- /img/indicator_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/indicator_default.png -------------------------------------------------------------------------------- /img/indicator_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/indicator_system.png -------------------------------------------------------------------------------- /img/mobile-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/mobile-info.png -------------------------------------------------------------------------------- /img/question/question01_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question01_00.png -------------------------------------------------------------------------------- /img/question/question02_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question02_00.png -------------------------------------------------------------------------------- /img/question/question03_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question03_00.png -------------------------------------------------------------------------------- /img/question/question04_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question04_00.png -------------------------------------------------------------------------------- /img/question/question05_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question05_00.png -------------------------------------------------------------------------------- /img/question/question05_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question05_01.png -------------------------------------------------------------------------------- /img/question/question05_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question05_02.png -------------------------------------------------------------------------------- /img/question/question06_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question06_00.png -------------------------------------------------------------------------------- /img/question/question07_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/question07_00.png -------------------------------------------------------------------------------- /img/question/solution01_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/solution01_00.png -------------------------------------------------------------------------------- /img/question/solution01_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/solution01_01.png -------------------------------------------------------------------------------- /img/question/solution02_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/question/solution02_00.png -------------------------------------------------------------------------------- /img/unit_test_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeeTeam/gtapp-ios-oc/f342384c788bc5efa22bad3254d956255417082b/img/unit_test_0.png -------------------------------------------------------------------------------- /ios_question_and_answer.rst: -------------------------------------------------------------------------------- 1 | ==================================== 2 | iOS-常见问题Q&A 3 | ==================================== 4 | 5 | .. contents:: 目录 6 | 7 | 运行工程报"Undefined symbols for architecture" 8 | ================================================ 9 | 10 | 问题截图: 11 | 12 | .. image:: img/question/question01_00.png 13 | 14 | 解决方案: 15 | 16 | 在 -TARGETS->Build Phases->Link Binary With Libraries 添加Webkit.framework 17 | 18 | step1: 19 | 20 | .. image:: img/question/solution01_00.png 21 | 22 | step2: 23 | 24 | .. image:: img/question/solution01_01.png 25 | 26 | 27 | 显示的是pc版本的滑动界面 28 | ================================================ 29 | 30 | 问题截图: 31 | 32 | .. image:: img/question/question02_00.png 33 | 34 | 解决方案: 35 | 36 | 如果已经申请移动版本id,请在你们服务器的配置上替换成移动版id; 37 | 如果你没有申请移动版本的id, 请在极验官网控制台申请,再配置。`极验控制台 `__ 38 | 39 | 如图: 40 | 41 | .. image:: img/question/solution02_00.png 42 | 43 | 44 | 验证界面下方出现了大量多余的空白 45 | ================================================ 46 | 47 | 问题截图: 48 | 49 | .. image:: img/question/question03_00.png 50 | 51 | 情形1 52 | ------------------------------------------------------------------- 53 | 54 | 如果你使用的sdk版本是2.15.12.30.1之前的版本 55 | 56 | 解决: 请更新sdk,能解决一部分情况下的该情况的出现。`极验控制台 `__ 57 | 58 | 情形2 59 | ------------------------------------------------------------------- 60 | 61 | 如果你使用的sdk版本是2.15.12.30.1之后版本,该情况只出现在极验控制台使用小图(极验验证的图片分为大小两种尺寸的验证图片)且用户使用的iOS设备的系统是低于iOS 9.0的时候。 62 | 63 | 解决1: 在极验后台上传大尺寸图。我们在移动端推荐使用大尺寸验证图片。`极验控制台 `__ 64 | 65 | 解决2: 更新至最新版sdk, 使用 66 | 67 | .. code:: 68 | 69 | - (void)useGTViewWithHeightConstraintType:(GTViewHeightConstraintType)type; 70 | 71 | 72 | 验证界面完全空白 73 | ================================================ 74 | 75 | 问题截图: 76 | 77 | .. image:: img/question/question04_00.png 78 | 79 | 情形1 80 | ------------------------------------------------------------------- 81 | 82 | 检测传入的challenge是静态的或者因为缓存导致challenge重复使用。 83 | 84 | 原因: 单个challenge对单次验证是唯一的, 不可以重复使用。 85 | 86 | 解决: 检测你们传入challenge是不是从服务器动态获取以及服务器获取challenge的方式。如果没有问题,可能是缓存导致,检查缓存机制。如果依旧没有解决,向极验请求技术支持。 87 | 88 | 情形2 89 | ------------------------------------------------------------------- 90 | 91 | 使用的旧版本id, 但使用了新版本服务端sdk 92 | 93 | 原因: challenge在服务端sdk被md5加密, 而旧版本id不能与加密的challenge匹配使用 94 | 95 | 解决: 联系技术支持更新到新版本id或者使用旧版本服务端sdk, 后者不推荐使用 96 | 97 | 情形3 98 | ------------------------------------------------------------------- 99 | 100 | 使用新版本id, 没有在请求中挂载challenge参数 101 | 102 | 原因: 新版本id必须与challenge匹配使用 103 | 104 | 解决: 更新服务端sdk, 并在客户端传入相应参数 105 | 106 | 情形4 107 | ------------------------------------------------------------------- 108 | 109 | 使用新版本id, 却使用旧版本的服务端sdk 110 | 111 | 原因: 新版本id必须与加密的challenge使用 112 | 113 | 解决: 更新服务端sdk即可解决 114 | 115 | 验证界面锁定在状态指示器 116 | ================================================ 117 | 118 | 问题截图: 119 | 120 | .. image:: img/question/question07_00.png 121 | 122 | 该问题在在2.16.4.12.1版本之后出现, 情形同"验证界面完全空白" 123 | 124 | 打开验证时的内存消耗 125 | ================================================ 126 | 127 | 事例截图(模拟器iPhone 5s环境下, 同等条件下真机内存消耗数值会较模拟器低很多): 128 | 129 | 模拟器下初始加载(未加载验证) 130 | ------------------------------------------------------------------- 131 | 132 | .. image:: img/question/question05_00.png 133 | 134 | 模拟器iOS8以下加载验证 135 | ------------------------------------------------------------------- 136 | 137 | .. image:: img/question/question05_01.png 138 | 139 | 指标: 相较增加38m内存。真机下, 数值会降很多。 140 | 141 | 原因: UIWebview加载js对资源的消耗很严重。 142 | 143 | 模拟器iOS8及以上加载验证 144 | ------------------------------------------------------------------- 145 | 146 | .. image:: img/question/question05_02.png 147 | 148 | 指标: 相较增加3m内存, 真机下, 数值会相应下降一些。 149 | 150 | 验证请求http 被 block 151 | ================================================ 152 | 153 | .. image:: img/question/question06_00.png 154 | 155 | 原因: iOS9 以上默认禁用http协议, 而验证内部使用了http请求验证数据 156 | 157 | 解决: `参考README `__ 158 | 159 | 静态库的体积比较大 160 | ================================================ 161 | 162 | 本framework合成了真机和模拟器的静态库, 所以体积比较大。 其中bitcode版本因为区分了i386、x86_64、armv7、 armv7s、arm64等架构, 所以体积更大。 163 | 164 | 在集成到app后, 大约增量100kb。 165 | 166 | (完) --------------------------------------------------------------------------------