Commit 819e22a4474b4ff3cde001d1f3fa4b830c9abad7
1 parent
203fb214
除去接口的基本功能完成
Showing
19 changed files
with
1317 additions
and
965 deletions
Too many changes to show.
To preserve performance only 19 of 44 files are displayed.
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
| @@ -7,6 +7,66 @@ | @@ -7,6 +7,66 @@ | ||
| 7 | objects = { | 7 | objects = { |
| 8 | 8 | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| 10 | + 4B45CE761EB86A590079AFB7 /* BeingAnchorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE451EB86A590079AFB7 /* BeingAnchorController.m */; }; | ||
| 11 | + 4B45CE771EB86A590079AFB7 /* IDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE471EB86A590079AFB7 /* IDViewController.m */; }; | ||
| 12 | + 4B45CE781EB86A590079AFB7 /* JCMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE491EB86A590079AFB7 /* JCMineViewController.m */; }; | ||
| 13 | + 4B45CE791EB86A590079AFB7 /* MineAboutUsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE4B1EB86A590079AFB7 /* MineAboutUsController.m */; }; | ||
| 14 | + 4B45CE7A1EB86A590079AFB7 /* MineLiveController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE4D1EB86A590079AFB7 /* MineLiveController.m */; }; | ||
| 15 | + 4B45CE7B1EB86A590079AFB7 /* MinePersonalDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE4F1EB86A590079AFB7 /* MinePersonalDataController.m */; }; | ||
| 16 | + 4B45CE7C1EB86A590079AFB7 /* MineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE511EB86A590079AFB7 /* MineSettingViewController.m */; }; | ||
| 17 | + 4B45CE7D1EB86A590079AFB7 /* ModifyInfomationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE531EB86A590079AFB7 /* ModifyInfomationController.m */; }; | ||
| 18 | + 4B45CE7E1EB86A590079AFB7 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE581EB86A590079AFB7 /* LoginViewController.m */; }; | ||
| 19 | + 4B45CE7F1EB86A590079AFB7 /* RegisterCommonController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE5A1EB86A590079AFB7 /* RegisterCommonController.m */; }; | ||
| 20 | + 4B45CE801EB86A590079AFB7 /* idAndPwdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE5D1EB86A590079AFB7 /* idAndPwdView.m */; }; | ||
| 21 | + 4B45CE811EB86A590079AFB7 /* RegistBasicInformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE5F1EB86A590079AFB7 /* RegistBasicInformationView.m */; }; | ||
| 22 | + 4B45CE821EB86A590079AFB7 /* ZXMineCommonModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE621EB86A590079AFB7 /* ZXMineCommonModel.m */; }; | ||
| 23 | + 4B45CE831EB86A590079AFB7 /* ZXMineModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE641EB86A590079AFB7 /* ZXMineModel.m */; }; | ||
| 24 | + 4B45CE841EB86A590079AFB7 /* ModifyCommonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE671EB86A590079AFB7 /* ModifyCommonView.m */; }; | ||
| 25 | + 4B45CE851EB86A590079AFB7 /* ZXClearCachesCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE691EB86A590079AFB7 /* ZXClearCachesCell.m */; }; | ||
| 26 | + 4B45CE861EB86A590079AFB7 /* ZXLoginShowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE6B1EB86A590079AFB7 /* ZXLoginShowView.m */; }; | ||
| 27 | + 4B45CE871EB86A590079AFB7 /* ZXMineCommonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE6D1EB86A590079AFB7 /* ZXMineCommonCell.m */; }; | ||
| 28 | + 4B45CE881EB86A590079AFB7 /* ZXMineShowCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE6F1EB86A590079AFB7 /* ZXMineShowCell.m */; }; | ||
| 29 | + 4B45CE891EB86A590079AFB7 /* ZXPersonalImageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE711EB86A590079AFB7 /* ZXPersonalImageCell.m */; }; | ||
| 30 | + 4B45CE8A1EB86A590079AFB7 /* ZXPersonCommonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE731EB86A590079AFB7 /* ZXPersonCommonCell.m */; }; | ||
| 31 | + 4B45CE8B1EB86A590079AFB7 /* ZXTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE751EB86A590079AFB7 /* ZXTextField.m */; }; | ||
| 32 | + 4B45CE971EB86A760079AFB7 /* UIButton+createButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE8E1EB86A760079AFB7 /* UIButton+createButton.m */; }; | ||
| 33 | + 4B45CE981EB86A760079AFB7 /* UILabel+createLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE901EB86A760079AFB7 /* UILabel+createLabel.m */; }; | ||
| 34 | + 4B45CE991EB86A760079AFB7 /* UITextField+createTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE921EB86A760079AFB7 /* UITextField+createTextField.m */; }; | ||
| 35 | + 4B45CE9A1EB86A760079AFB7 /* ZXLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE941EB86A760079AFB7 /* ZXLabel.m */; }; | ||
| 36 | + 4B45CE9B1EB86A760079AFB7 /* ZXUIKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE961EB86A760079AFB7 /* ZXUIKit.m */; }; | ||
| 37 | + 4B45CEA51EB86B9F0079AFB7 /* CNLiveThirdLoginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CE9E1EB86B9E0079AFB7 /* CNLiveThirdLoginManager.m */; }; | ||
| 38 | + 4B45CEA61EB86B9F0079AFB7 /* NSNumber+ScaleHeight.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CEA01EB86B9E0079AFB7 /* NSNumber+ScaleHeight.m */; }; | ||
| 39 | + 4B45CEA71EB86B9F0079AFB7 /* NSObject+UserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CEA21EB86B9F0079AFB7 /* NSObject+UserModel.m */; }; | ||
| 40 | + 4B45CEA81EB86B9F0079AFB7 /* UserTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CEA41EB86B9F0079AFB7 /* UserTools.m */; }; | ||
| 41 | + 4B45CEAB1EB86BFA0079AFB7 /* NSString+ZXExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CEAA1EB86BFA0079AFB7 /* NSString+ZXExtension.m */; }; | ||
| 42 | + 4B45CEAE1EB873630079AFB7 /* UserInformationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B45CEAD1EB873630079AFB7 /* UserInformationModel.m */; }; | ||
| 43 | + 4BD855CD1EBAC4B70082061D /* CNLiveKeychainWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855CC1EBAC4B70082061D /* CNLiveKeychainWrapper.m */; }; | ||
| 44 | + 4BD855D11EBAC7220082061D /* DESUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855D01EBAC7220082061D /* DESUtility.m */; }; | ||
| 45 | + 4BD855D31EBAC8B20082061D /* CNLiveUserSystemSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BD855D21EBAC8B20082061D /* CNLiveUserSystemSDK.framework */; }; | ||
| 46 | + 4BD855FA1EBACD530082061D /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855D61EBACD530082061D /* AFHTTPRequestOperation.m */; }; | ||
| 47 | + 4BD855FB1EBACD530082061D /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855D81EBACD530082061D /* AFHTTPRequestOperationManager.m */; }; | ||
| 48 | + 4BD855FC1EBACD530082061D /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855DA1EBACD530082061D /* AFHTTPSessionManager.m */; }; | ||
| 49 | + 4BD855FD1EBACD530082061D /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855DD1EBACD530082061D /* AFNetworkReachabilityManager.m */; }; | ||
| 50 | + 4BD855FE1EBACD530082061D /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855DF1EBACD530082061D /* AFSecurityPolicy.m */; }; | ||
| 51 | + 4BD855FF1EBACD530082061D /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855E11EBACD530082061D /* AFURLConnectionOperation.m */; }; | ||
| 52 | + 4BD856001EBACD530082061D /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855E31EBACD530082061D /* AFURLRequestSerialization.m */; }; | ||
| 53 | + 4BD856011EBACD530082061D /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855E51EBACD530082061D /* AFURLResponseSerialization.m */; }; | ||
| 54 | + 4BD856021EBACD530082061D /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855E71EBACD530082061D /* AFURLSessionManager.m */; }; | ||
| 55 | + 4BD856031EBACD530082061D /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855EA1EBACD530082061D /* AFNetworkActivityIndicatorManager.m */; }; | ||
| 56 | + 4BD856041EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855EC1EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m */; }; | ||
| 57 | + 4BD856051EBACD530082061D /* UIAlertView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855EE1EBACD530082061D /* UIAlertView+AFNetworking.m */; }; | ||
| 58 | + 4BD856061EBACD530082061D /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855F01EBACD530082061D /* UIButton+AFNetworking.m */; }; | ||
| 59 | + 4BD856071EBACD530082061D /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855F21EBACD530082061D /* UIImageView+AFNetworking.m */; }; | ||
| 60 | + 4BD856081EBACD530082061D /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855F51EBACD530082061D /* UIProgressView+AFNetworking.m */; }; | ||
| 61 | + 4BD856091EBACD530082061D /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855F71EBACD530082061D /* UIRefreshControl+AFNetworking.m */; }; | ||
| 62 | + 4BD8560A1EBACD530082061D /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD855F91EBACD530082061D /* UIWebView+AFNetworking.m */; }; | ||
| 63 | + 4BD8560F1EBACEF80082061D /* CNLiveWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD8560C1EBACEF80082061D /* CNLiveWebView.m */; }; | ||
| 64 | + 4BD856121EBAD2640082061D /* ProgramModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD856111EBAD2640082061D /* ProgramModel.m */; }; | ||
| 65 | + 4BD856151EBAD31A0082061D /* NSString+UrlEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD856141EBAD31A0082061D /* NSString+UrlEncode.m */; }; | ||
| 66 | + 4BD856181EBAD35C0082061D /* NSDictionary+Safety.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD856171EBAD35C0082061D /* NSDictionary+Safety.m */; }; | ||
| 67 | + 4BD856191EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BD855D21EBAC8B20082061D /* CNLiveUserSystemSDK.framework */; }; | ||
| 68 | + 4BD8561A1EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4BD855D21EBAC8B20082061D /* CNLiveUserSystemSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | ||
| 69 | + 4BD8561D1EBAD6490082061D /* ZXConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD8561C1EBAD6490082061D /* ZXConst.m */; }; | ||
| 10 | 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64DF1E779AE900133E15 /* LVCPlayer.m */; }; | 70 | 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64DF1E779AE900133E15 /* LVCPlayer.m */; }; |
| 11 | 810B64E31E779AFE00133E15 /* LVCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */; }; | 71 | 810B64E31E779AFE00133E15 /* LVCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */; }; |
| 12 | 810B64FE1E779B1F00133E15 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64E61E779B1F00133E15 /* MASCompositeConstraint.m */; }; | 72 | 810B64FE1E779B1F00133E15 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64E61E779B1F00133E15 /* MASCompositeConstraint.m */; }; |
| @@ -60,21 +120,6 @@ | @@ -60,21 +120,6 @@ | ||
| 60 | D2029BCE1E6EADD70027CD92 /* ZXNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BC71E6EADD70027CD92 /* ZXNavigationController.m */; }; | 120 | D2029BCE1E6EADD70027CD92 /* ZXNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BC71E6EADD70027CD92 /* ZXNavigationController.m */; }; |
| 61 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BC91E6EADD70027CD92 /* ZXTabBarController.m */; }; | 121 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BC91E6EADD70027CD92 /* ZXTabBarController.m */; }; |
| 62 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BD31E6EADE10027CD92 /* Tools.m */; }; | 122 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BD31E6EADE10027CD92 /* Tools.m */; }; |
| 63 | - D2029C871E6EADE10027CD92 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BD71E6EADE10027CD92 /* AFHTTPSessionManager.m */; }; | ||
| 64 | - D2029C881E6EADE10027CD92 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BDA1E6EADE10027CD92 /* AFNetworkReachabilityManager.m */; }; | ||
| 65 | - D2029C891E6EADE10027CD92 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BDC1E6EADE10027CD92 /* AFSecurityPolicy.m */; }; | ||
| 66 | - D2029C8A1E6EADE10027CD92 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BDE1E6EADE10027CD92 /* AFURLRequestSerialization.m */; }; | ||
| 67 | - D2029C8B1E6EADE10027CD92 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BE01E6EADE10027CD92 /* AFURLResponseSerialization.m */; }; | ||
| 68 | - D2029C8C1E6EADE10027CD92 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BE21E6EADE10027CD92 /* AFURLSessionManager.m */; }; | ||
| 69 | - D2029C8D1E6EADE10027CD92 /* AFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BE51E6EADE10027CD92 /* AFAutoPurgingImageCache.m */; }; | ||
| 70 | - D2029C8E1E6EADE10027CD92 /* AFImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BE71E6EADE10027CD92 /* AFImageDownloader.m */; }; | ||
| 71 | - D2029C8F1E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BE91E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.m */; }; | ||
| 72 | - D2029C901E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BEB1E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m */; }; | ||
| 73 | - D2029C911E6EADE10027CD92 /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BED1E6EADE10027CD92 /* UIButton+AFNetworking.m */; }; | ||
| 74 | - D2029C921E6EADE10027CD92 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BF01E6EADE10027CD92 /* UIImageView+AFNetworking.m */; }; | ||
| 75 | - D2029C931E6EADE10027CD92 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BF31E6EADE10027CD92 /* UIProgressView+AFNetworking.m */; }; | ||
| 76 | - D2029C941E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BF51E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m */; }; | ||
| 77 | - D2029C951E6EADE10027CD92 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BF71E6EADE10027CD92 /* UIWebView+AFNetworking.m */; }; | ||
| 78 | D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BFA1E6EADE10027CD92 /* MBProgressHUD.m */; }; | 123 | D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BFA1E6EADE10027CD92 /* MBProgressHUD.m */; }; |
| 79 | D2029C971E6EADE10027CD92 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = D2029BFC1E6EADE10027CD92 /* Info.plist */; }; | 124 | D2029C971E6EADE10027CD92 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = D2029BFC1E6EADE10027CD92 /* Info.plist */; }; |
| 80 | D2029C981E6EADE10027CD92 /* MJExtensionConst.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BFF1E6EADE10027CD92 /* MJExtensionConst.m */; }; | 125 | D2029C981E6EADE10027CD92 /* MJExtensionConst.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029BFF1E6EADE10027CD92 /* MJExtensionConst.m */; }; |
| @@ -141,7 +186,6 @@ | @@ -141,7 +186,6 @@ | ||
| 141 | D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CE71E6EAE2E0027CD92 /* UILabel+ContentSize.m */; }; | 186 | D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CE71E6EAE2E0027CD92 /* UILabel+ContentSize.m */; }; |
| 142 | D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */; }; | 187 | D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */; }; |
| 143 | D2029D061E6EAE2E0027CD92 /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */; }; | 188 | D2029D061E6EAE2E0027CD92 /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */; }; |
| 144 | - D2029D071E6EAE2E0027CD92 /* ZXConst.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CEE1E6EAE2E0027CD92 /* ZXConst.m */; }; | ||
| 145 | D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CF11E6EAE2E0027CD92 /* ZXDeviceInfo.m */; }; | 189 | D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CF11E6EAE2E0027CD92 /* ZXDeviceInfo.m */; }; |
| 146 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */; }; | 190 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */; }; |
| 147 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CFE1E6EAE2E0027CD92 /* ZXServerUrl.m */; }; | 191 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CFE1E6EAE2E0027CD92 /* ZXServerUrl.m */; }; |
| @@ -190,7 +234,6 @@ | @@ -190,7 +234,6 @@ | ||
| 190 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */; }; | 234 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */; }; |
| 191 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; }; | 235 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; }; |
| 192 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB31E6EC154003A77C8 /* HomeViewController.m */; }; | 236 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB31E6EC154003A77C8 /* HomeViewController.m */; }; |
| 193 | - D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */; }; | ||
| 194 | D28F5FFF1E8BC7EF00914142 /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */; }; | 237 | D28F5FFF1E8BC7EF00914142 /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */; }; |
| 195 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */; }; | 238 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */; }; |
| 196 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2994BA51E8F48DE00E8D2CC /* CNLiveMsgTools.framework */; }; | 239 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2994BA51E8F48DE00E8D2CC /* CNLiveMsgTools.framework */; }; |
| @@ -236,6 +279,7 @@ | @@ -236,6 +279,7 @@ | ||
| 236 | dstPath = ""; | 279 | dstPath = ""; |
| 237 | dstSubfolderSpec = 10; | 280 | dstSubfolderSpec = 10; |
| 238 | files = ( | 281 | files = ( |
| 282 | + 4BD8561A1EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Embed Frameworks */, | ||
| 239 | 811BB6851E8106AF005C6291 /* CNLivePlayerSDK.framework in Embed Frameworks */, | 283 | 811BB6851E8106AF005C6291 /* CNLivePlayerSDK.framework in Embed Frameworks */, |
| 240 | D2994BA91E8F490400E8D2CC /* CNLiveChatManager.framework in Embed Frameworks */, | 284 | D2994BA91E8F490400E8D2CC /* CNLiveChatManager.framework in Embed Frameworks */, |
| 241 | D2994BAB1E8F490700E8D2CC /* CNLiveMsgTools.framework in Embed Frameworks */, | 285 | D2994BAB1E8F490700E8D2CC /* CNLiveMsgTools.framework in Embed Frameworks */, |
| @@ -246,6 +290,125 @@ | @@ -246,6 +290,125 @@ | ||
| 246 | /* End PBXCopyFilesBuildPhase section */ | 290 | /* End PBXCopyFilesBuildPhase section */ |
| 247 | 291 | ||
| 248 | /* Begin PBXFileReference section */ | 292 | /* Begin PBXFileReference section */ |
| 293 | + 4B45CE441EB86A590079AFB7 /* BeingAnchorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BeingAnchorController.h; sourceTree = "<group>"; }; | ||
| 294 | + 4B45CE451EB86A590079AFB7 /* BeingAnchorController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BeingAnchorController.m; sourceTree = "<group>"; }; | ||
| 295 | + 4B45CE461EB86A590079AFB7 /* IDViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDViewController.h; sourceTree = "<group>"; }; | ||
| 296 | + 4B45CE471EB86A590079AFB7 /* IDViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IDViewController.m; sourceTree = "<group>"; }; | ||
| 297 | + 4B45CE481EB86A590079AFB7 /* JCMineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JCMineViewController.h; sourceTree = "<group>"; }; | ||
| 298 | + 4B45CE491EB86A590079AFB7 /* JCMineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JCMineViewController.m; sourceTree = "<group>"; }; | ||
| 299 | + 4B45CE4A1EB86A590079AFB7 /* MineAboutUsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineAboutUsController.h; sourceTree = "<group>"; }; | ||
| 300 | + 4B45CE4B1EB86A590079AFB7 /* MineAboutUsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineAboutUsController.m; sourceTree = "<group>"; }; | ||
| 301 | + 4B45CE4C1EB86A590079AFB7 /* MineLiveController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineLiveController.h; sourceTree = "<group>"; }; | ||
| 302 | + 4B45CE4D1EB86A590079AFB7 /* MineLiveController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineLiveController.m; sourceTree = "<group>"; }; | ||
| 303 | + 4B45CE4E1EB86A590079AFB7 /* MinePersonalDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinePersonalDataController.h; sourceTree = "<group>"; }; | ||
| 304 | + 4B45CE4F1EB86A590079AFB7 /* MinePersonalDataController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MinePersonalDataController.m; sourceTree = "<group>"; }; | ||
| 305 | + 4B45CE501EB86A590079AFB7 /* MineSettingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineSettingViewController.h; sourceTree = "<group>"; }; | ||
| 306 | + 4B45CE511EB86A590079AFB7 /* MineSettingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineSettingViewController.m; sourceTree = "<group>"; }; | ||
| 307 | + 4B45CE521EB86A590079AFB7 /* ModifyInfomationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyInfomationController.h; sourceTree = "<group>"; }; | ||
| 308 | + 4B45CE531EB86A590079AFB7 /* ModifyInfomationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyInfomationController.m; sourceTree = "<group>"; }; | ||
| 309 | + 4B45CE571EB86A590079AFB7 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; }; | ||
| 310 | + 4B45CE581EB86A590079AFB7 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; }; | ||
| 311 | + 4B45CE591EB86A590079AFB7 /* RegisterCommonController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterCommonController.h; sourceTree = "<group>"; }; | ||
| 312 | + 4B45CE5A1EB86A590079AFB7 /* RegisterCommonController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterCommonController.m; sourceTree = "<group>"; }; | ||
| 313 | + 4B45CE5C1EB86A590079AFB7 /* idAndPwdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = idAndPwdView.h; sourceTree = "<group>"; }; | ||
| 314 | + 4B45CE5D1EB86A590079AFB7 /* idAndPwdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = idAndPwdView.m; sourceTree = "<group>"; }; | ||
| 315 | + 4B45CE5E1EB86A590079AFB7 /* RegistBasicInformationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegistBasicInformationView.h; sourceTree = "<group>"; }; | ||
| 316 | + 4B45CE5F1EB86A590079AFB7 /* RegistBasicInformationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegistBasicInformationView.m; sourceTree = "<group>"; }; | ||
| 317 | + 4B45CE611EB86A590079AFB7 /* ZXMineCommonModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXMineCommonModel.h; sourceTree = "<group>"; }; | ||
| 318 | + 4B45CE621EB86A590079AFB7 /* ZXMineCommonModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXMineCommonModel.m; sourceTree = "<group>"; }; | ||
| 319 | + 4B45CE631EB86A590079AFB7 /* ZXMineModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXMineModel.h; sourceTree = "<group>"; }; | ||
| 320 | + 4B45CE641EB86A590079AFB7 /* ZXMineModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXMineModel.m; sourceTree = "<group>"; }; | ||
| 321 | + 4B45CE661EB86A590079AFB7 /* ModifyCommonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifyCommonView.h; sourceTree = "<group>"; }; | ||
| 322 | + 4B45CE671EB86A590079AFB7 /* ModifyCommonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModifyCommonView.m; sourceTree = "<group>"; }; | ||
| 323 | + 4B45CE681EB86A590079AFB7 /* ZXClearCachesCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXClearCachesCell.h; sourceTree = "<group>"; }; | ||
| 324 | + 4B45CE691EB86A590079AFB7 /* ZXClearCachesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXClearCachesCell.m; sourceTree = "<group>"; }; | ||
| 325 | + 4B45CE6A1EB86A590079AFB7 /* ZXLoginShowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXLoginShowView.h; sourceTree = "<group>"; }; | ||
| 326 | + 4B45CE6B1EB86A590079AFB7 /* ZXLoginShowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXLoginShowView.m; sourceTree = "<group>"; }; | ||
| 327 | + 4B45CE6C1EB86A590079AFB7 /* ZXMineCommonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXMineCommonCell.h; sourceTree = "<group>"; }; | ||
| 328 | + 4B45CE6D1EB86A590079AFB7 /* ZXMineCommonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXMineCommonCell.m; sourceTree = "<group>"; }; | ||
| 329 | + 4B45CE6E1EB86A590079AFB7 /* ZXMineShowCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXMineShowCell.h; sourceTree = "<group>"; }; | ||
| 330 | + 4B45CE6F1EB86A590079AFB7 /* ZXMineShowCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXMineShowCell.m; sourceTree = "<group>"; }; | ||
| 331 | + 4B45CE701EB86A590079AFB7 /* ZXPersonalImageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXPersonalImageCell.h; sourceTree = "<group>"; }; | ||
| 332 | + 4B45CE711EB86A590079AFB7 /* ZXPersonalImageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXPersonalImageCell.m; sourceTree = "<group>"; }; | ||
| 333 | + 4B45CE721EB86A590079AFB7 /* ZXPersonCommonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXPersonCommonCell.h; sourceTree = "<group>"; }; | ||
| 334 | + 4B45CE731EB86A590079AFB7 /* ZXPersonCommonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXPersonCommonCell.m; sourceTree = "<group>"; }; | ||
| 335 | + 4B45CE741EB86A590079AFB7 /* ZXTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXTextField.h; sourceTree = "<group>"; }; | ||
| 336 | + 4B45CE751EB86A590079AFB7 /* ZXTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXTextField.m; sourceTree = "<group>"; }; | ||
| 337 | + 4B45CE8D1EB86A760079AFB7 /* UIButton+createButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+createButton.h"; sourceTree = "<group>"; }; | ||
| 338 | + 4B45CE8E1EB86A760079AFB7 /* UIButton+createButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+createButton.m"; sourceTree = "<group>"; }; | ||
| 339 | + 4B45CE8F1EB86A760079AFB7 /* UILabel+createLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+createLabel.h"; sourceTree = "<group>"; }; | ||
| 340 | + 4B45CE901EB86A760079AFB7 /* UILabel+createLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+createLabel.m"; sourceTree = "<group>"; }; | ||
| 341 | + 4B45CE911EB86A760079AFB7 /* UITextField+createTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextField+createTextField.h"; sourceTree = "<group>"; }; | ||
| 342 | + 4B45CE921EB86A760079AFB7 /* UITextField+createTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITextField+createTextField.m"; sourceTree = "<group>"; }; | ||
| 343 | + 4B45CE931EB86A760079AFB7 /* ZXLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXLabel.h; sourceTree = "<group>"; }; | ||
| 344 | + 4B45CE941EB86A760079AFB7 /* ZXLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXLabel.m; sourceTree = "<group>"; }; | ||
| 345 | + 4B45CE951EB86A760079AFB7 /* ZXUIKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXUIKit.h; sourceTree = "<group>"; }; | ||
| 346 | + 4B45CE961EB86A760079AFB7 /* ZXUIKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXUIKit.m; sourceTree = "<group>"; }; | ||
| 347 | + 4B45CE9D1EB86B9E0079AFB7 /* CNLiveThirdLoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveThirdLoginManager.h; sourceTree = "<group>"; }; | ||
| 348 | + 4B45CE9E1EB86B9E0079AFB7 /* CNLiveThirdLoginManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveThirdLoginManager.m; sourceTree = "<group>"; }; | ||
| 349 | + 4B45CE9F1EB86B9E0079AFB7 /* NSNumber+ScaleHeight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+ScaleHeight.h"; sourceTree = "<group>"; }; | ||
| 350 | + 4B45CEA01EB86B9E0079AFB7 /* NSNumber+ScaleHeight.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+ScaleHeight.m"; sourceTree = "<group>"; }; | ||
| 351 | + 4B45CEA11EB86B9E0079AFB7 /* NSObject+UserModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+UserModel.h"; sourceTree = "<group>"; }; | ||
| 352 | + 4B45CEA21EB86B9F0079AFB7 /* NSObject+UserModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+UserModel.m"; sourceTree = "<group>"; }; | ||
| 353 | + 4B45CEA31EB86B9F0079AFB7 /* UserTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserTools.h; sourceTree = "<group>"; }; | ||
| 354 | + 4B45CEA41EB86B9F0079AFB7 /* UserTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserTools.m; sourceTree = "<group>"; }; | ||
| 355 | + 4B45CEA91EB86BFA0079AFB7 /* NSString+ZXExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+ZXExtension.h"; sourceTree = "<group>"; }; | ||
| 356 | + 4B45CEAA1EB86BFA0079AFB7 /* NSString+ZXExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+ZXExtension.m"; sourceTree = "<group>"; }; | ||
| 357 | + 4B45CEAC1EB873630079AFB7 /* UserInformationModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInformationModel.h; sourceTree = "<group>"; }; | ||
| 358 | + 4B45CEAD1EB873630079AFB7 /* UserInformationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInformationModel.m; sourceTree = "<group>"; }; | ||
| 359 | + 4BD855CB1EBAC4B70082061D /* CNLiveKeychainWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveKeychainWrapper.h; sourceTree = "<group>"; }; | ||
| 360 | + 4BD855CC1EBAC4B70082061D /* CNLiveKeychainWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveKeychainWrapper.m; sourceTree = "<group>"; }; | ||
| 361 | + 4BD855CE1EBAC57A0082061D /* Common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; }; | ||
| 362 | + 4BD855CF1EBAC7220082061D /* DESUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DESUtility.h; sourceTree = "<group>"; }; | ||
| 363 | + 4BD855D01EBAC7220082061D /* DESUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DESUtility.m; sourceTree = "<group>"; }; | ||
| 364 | + 4BD855D21EBAC8B20082061D /* CNLiveUserSystemSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveUserSystemSDK.framework; sourceTree = "<group>"; }; | ||
| 365 | + 4BD855D51EBACD530082061D /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; }; | ||
| 366 | + 4BD855D61EBACD530082061D /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; }; | ||
| 367 | + 4BD855D71EBACD530082061D /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperationManager.h; sourceTree = "<group>"; }; | ||
| 368 | + 4BD855D81EBACD530082061D /* AFHTTPRequestOperationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperationManager.m; sourceTree = "<group>"; }; | ||
| 369 | + 4BD855D91EBACD530082061D /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = "<group>"; }; | ||
| 370 | + 4BD855DA1EBACD530082061D /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPSessionManager.m; sourceTree = "<group>"; }; | ||
| 371 | + 4BD855DB1EBACD530082061D /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; }; | ||
| 372 | + 4BD855DC1EBACD530082061D /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkReachabilityManager.h; sourceTree = "<group>"; }; | ||
| 373 | + 4BD855DD1EBACD530082061D /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkReachabilityManager.m; sourceTree = "<group>"; }; | ||
| 374 | + 4BD855DE1EBACD530082061D /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSecurityPolicy.h; sourceTree = "<group>"; }; | ||
| 375 | + 4BD855DF1EBACD530082061D /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = "<group>"; }; | ||
| 376 | + 4BD855E01EBACD530082061D /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; }; | ||
| 377 | + 4BD855E11EBACD530082061D /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; }; | ||
| 378 | + 4BD855E21EBACD530082061D /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLRequestSerialization.h; sourceTree = "<group>"; }; | ||
| 379 | + 4BD855E31EBACD530082061D /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLRequestSerialization.m; sourceTree = "<group>"; }; | ||
| 380 | + 4BD855E41EBACD530082061D /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLResponseSerialization.h; sourceTree = "<group>"; }; | ||
| 381 | + 4BD855E51EBACD530082061D /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLResponseSerialization.m; sourceTree = "<group>"; }; | ||
| 382 | + 4BD855E61EBACD530082061D /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLSessionManager.h; sourceTree = "<group>"; }; | ||
| 383 | + 4BD855E71EBACD530082061D /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManager.m; sourceTree = "<group>"; }; | ||
| 384 | + 4BD855E91EBACD530082061D /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; }; | ||
| 385 | + 4BD855EA1EBACD530082061D /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; }; | ||
| 386 | + 4BD855EB1EBACD530082061D /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIActivityIndicatorView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 387 | + 4BD855EC1EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIActivityIndicatorView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 388 | + 4BD855ED1EBACD530082061D /* UIAlertView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 389 | + 4BD855EE1EBACD530082061D /* UIAlertView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 390 | + 4BD855EF1EBACD530082061D /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 391 | + 4BD855F01EBACD530082061D /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 392 | + 4BD855F11EBACD530082061D /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 393 | + 4BD855F21EBACD530082061D /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 394 | + 4BD855F31EBACD530082061D /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIKit+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 395 | + 4BD855F41EBACD530082061D /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIProgressView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 396 | + 4BD855F51EBACD530082061D /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIProgressView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 397 | + 4BD855F61EBACD530082061D /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIRefreshControl+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 398 | + 4BD855F71EBACD530082061D /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIRefreshControl+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 399 | + 4BD855F81EBACD530082061D /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 400 | + 4BD855F91EBACD530082061D /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 401 | + 4BD8560B1EBACEF80082061D /* CNLiveWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CNLiveWebView.h; path = ../CNLiveWebView.h; sourceTree = "<group>"; }; | ||
| 402 | + 4BD8560C1EBACEF80082061D /* CNLiveWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CNLiveWebView.m; path = ../CNLiveWebView.m; sourceTree = "<group>"; }; | ||
| 403 | + 4BD8560E1EBACEF80082061D /* CNLiveMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveMacro.h; sourceTree = "<group>"; }; | ||
| 404 | + 4BD856101EBAD2640082061D /* ProgramModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramModel.h; sourceTree = "<group>"; }; | ||
| 405 | + 4BD856111EBAD2640082061D /* ProgramModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProgramModel.m; sourceTree = "<group>"; }; | ||
| 406 | + 4BD856131EBAD31A0082061D /* NSString+UrlEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+UrlEncode.h"; sourceTree = "<group>"; }; | ||
| 407 | + 4BD856141EBAD31A0082061D /* NSString+UrlEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+UrlEncode.m"; sourceTree = "<group>"; }; | ||
| 408 | + 4BD856161EBAD35C0082061D /* NSDictionary+Safety.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+Safety.h"; sourceTree = "<group>"; }; | ||
| 409 | + 4BD856171EBAD35C0082061D /* NSDictionary+Safety.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+Safety.m"; sourceTree = "<group>"; }; | ||
| 410 | + 4BD8561B1EBAD6490082061D /* ZXConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZXConst.h; path = Macros/ZXConst.h; sourceTree = "<group>"; }; | ||
| 411 | + 4BD8561C1EBAD6490082061D /* ZXConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ZXConst.m; path = Macros/ZXConst.m; sourceTree = "<group>"; }; | ||
| 249 | 810B64DE1E779AE900133E15 /* LVCPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayer.h; sourceTree = "<group>"; }; | 412 | 810B64DE1E779AE900133E15 /* LVCPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayer.h; sourceTree = "<group>"; }; |
| 250 | 810B64DF1E779AE900133E15 /* LVCPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayer.m; sourceTree = "<group>"; }; | 413 | 810B64DF1E779AE900133E15 /* LVCPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayer.m; sourceTree = "<group>"; }; |
| 251 | 810B64E11E779AFE00133E15 /* LVCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLivePlayerController.h; sourceTree = "<group>"; }; | 414 | 810B64E11E779AFE00133E15 /* LVCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLivePlayerController.h; sourceTree = "<group>"; }; |
| @@ -356,39 +519,6 @@ | @@ -356,39 +519,6 @@ | ||
| 356 | D2029BC91E6EADD70027CD92 /* ZXTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXTabBarController.m; sourceTree = "<group>"; }; | 519 | D2029BC91E6EADD70027CD92 /* ZXTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXTabBarController.m; sourceTree = "<group>"; }; |
| 357 | D2029BD21E6EADE10027CD92 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; }; | 520 | D2029BD21E6EADE10027CD92 /* Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tools.h; sourceTree = "<group>"; }; |
| 358 | D2029BD31E6EADE10027CD92 /* Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; }; | 521 | D2029BD31E6EADE10027CD92 /* Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tools.m; sourceTree = "<group>"; }; |
| 359 | - D2029BD61E6EADE10027CD92 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = "<group>"; }; | ||
| 360 | - D2029BD71E6EADE10027CD92 /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPSessionManager.m; sourceTree = "<group>"; }; | ||
| 361 | - D2029BD81E6EADE10027CD92 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; }; | ||
| 362 | - D2029BD91E6EADE10027CD92 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkReachabilityManager.h; sourceTree = "<group>"; }; | ||
| 363 | - D2029BDA1E6EADE10027CD92 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkReachabilityManager.m; sourceTree = "<group>"; }; | ||
| 364 | - D2029BDB1E6EADE10027CD92 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSecurityPolicy.h; sourceTree = "<group>"; }; | ||
| 365 | - D2029BDC1E6EADE10027CD92 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = "<group>"; }; | ||
| 366 | - D2029BDD1E6EADE10027CD92 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLRequestSerialization.h; sourceTree = "<group>"; }; | ||
| 367 | - D2029BDE1E6EADE10027CD92 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLRequestSerialization.m; sourceTree = "<group>"; }; | ||
| 368 | - D2029BDF1E6EADE10027CD92 /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLResponseSerialization.h; sourceTree = "<group>"; }; | ||
| 369 | - D2029BE01E6EADE10027CD92 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLResponseSerialization.m; sourceTree = "<group>"; }; | ||
| 370 | - D2029BE11E6EADE10027CD92 /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLSessionManager.h; sourceTree = "<group>"; }; | ||
| 371 | - D2029BE21E6EADE10027CD92 /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManager.m; sourceTree = "<group>"; }; | ||
| 372 | - D2029BE41E6EADE10027CD92 /* AFAutoPurgingImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFAutoPurgingImageCache.h; sourceTree = "<group>"; }; | ||
| 373 | - D2029BE51E6EADE10027CD92 /* AFAutoPurgingImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFAutoPurgingImageCache.m; sourceTree = "<group>"; }; | ||
| 374 | - D2029BE61E6EADE10027CD92 /* AFImageDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageDownloader.h; sourceTree = "<group>"; }; | ||
| 375 | - D2029BE71E6EADE10027CD92 /* AFImageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageDownloader.m; sourceTree = "<group>"; }; | ||
| 376 | - D2029BE81E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; }; | ||
| 377 | - D2029BE91E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; }; | ||
| 378 | - D2029BEA1E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIActivityIndicatorView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 379 | - D2029BEB1E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIActivityIndicatorView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 380 | - D2029BEC1E6EADE10027CD92 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 381 | - D2029BED1E6EADE10027CD92 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 382 | - D2029BEE1E6EADE10027CD92 /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 383 | - D2029BEF1E6EADE10027CD92 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 384 | - D2029BF01E6EADE10027CD92 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 385 | - D2029BF11E6EADE10027CD92 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIKit+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 386 | - D2029BF21E6EADE10027CD92 /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIProgressView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 387 | - D2029BF31E6EADE10027CD92 /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIProgressView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 388 | - D2029BF41E6EADE10027CD92 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIRefreshControl+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 389 | - D2029BF51E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIRefreshControl+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 390 | - D2029BF61E6EADE10027CD92 /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebView+AFNetworking.h"; sourceTree = "<group>"; }; | ||
| 391 | - D2029BF71E6EADE10027CD92 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+AFNetworking.m"; sourceTree = "<group>"; }; | ||
| 392 | D2029BF91E6EADE10027CD92 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; }; | 522 | D2029BF91E6EADE10027CD92 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; }; |
| 393 | D2029BFA1E6EADE10027CD92 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; }; | 523 | D2029BFA1E6EADE10027CD92 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; }; |
| 394 | D2029BFC1E6EADE10027CD92 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | 524 | D2029BFC1E6EADE10027CD92 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
| @@ -525,8 +655,6 @@ | @@ -525,8 +655,6 @@ | ||
| 525 | D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+labelFitSize.m"; sourceTree = "<group>"; }; | 655 | D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+labelFitSize.m"; sourceTree = "<group>"; }; |
| 526 | D2029CEA1E6EAE2E0027CD92 /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; }; | 656 | D2029CEA1E6EAE2E0027CD92 /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; }; |
| 527 | D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; }; | 657 | D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; }; |
| 528 | - D2029CED1E6EAE2E0027CD92 /* ZXConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXConst.h; sourceTree = "<group>"; }; | ||
| 529 | - D2029CEE1E6EAE2E0027CD92 /* ZXConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXConst.m; sourceTree = "<group>"; }; | ||
| 530 | D2029CF01E6EAE2E0027CD92 /* ZXDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXDeviceInfo.h; sourceTree = "<group>"; }; | 658 | D2029CF01E6EAE2E0027CD92 /* ZXDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXDeviceInfo.h; sourceTree = "<group>"; }; |
| 531 | D2029CF11E6EAE2E0027CD92 /* ZXDeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXDeviceInfo.m; sourceTree = "<group>"; }; | 659 | D2029CF11E6EAE2E0027CD92 /* ZXDeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZXDeviceInfo.m; sourceTree = "<group>"; }; |
| 532 | D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Foundation+Log.m"; sourceTree = "<group>"; }; | 660 | D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Foundation+Log.m"; sourceTree = "<group>"; }; |
| @@ -626,8 +754,6 @@ | @@ -626,8 +754,6 @@ | ||
| 626 | D2888DB01E6EC05F003A77C8 /* TempViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TempViewController.m; sourceTree = "<group>"; }; | 754 | D2888DB01E6EC05F003A77C8 /* TempViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TempViewController.m; sourceTree = "<group>"; }; |
| 627 | D2888DB21E6EC154003A77C8 /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; }; | 755 | D2888DB21E6EC154003A77C8 /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; }; |
| 628 | D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; | 756 | D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; |
| 629 | - D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; }; | ||
| 630 | - D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; }; | ||
| 631 | D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCUGCLiveListView.h; path = ../Controller/LVCUGCLiveListView.h; sourceTree = "<group>"; }; | 757 | D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCUGCLiveListView.h; path = ../Controller/LVCUGCLiveListView.h; sourceTree = "<group>"; }; |
| 632 | D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LVCUGCLiveListView.m; path = ../Controller/LVCUGCLiveListView.m; sourceTree = "<group>"; }; | 758 | D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LVCUGCLiveListView.m; path = ../Controller/LVCUGCLiveListView.m; sourceTree = "<group>"; }; |
| 633 | D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | 759 | D2994BA41E8F48DE00E8D2CC /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; |
| @@ -662,10 +788,12 @@ | @@ -662,10 +788,12 @@ | ||
| 662 | isa = PBXFrameworksBuildPhase; | 788 | isa = PBXFrameworksBuildPhase; |
| 663 | buildActionMask = 2147483647; | 789 | buildActionMask = 2147483647; |
| 664 | files = ( | 790 | files = ( |
| 791 | + 4BD855D31EBAC8B20082061D /* CNLiveUserSystemSDK.framework in Frameworks */, | ||
| 665 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, | 792 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, |
| 666 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */, | 793 | D2994BA71E8F48DE00E8D2CC /* CNLiveMsgTools.framework in Frameworks */, |
| 667 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, | 794 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, |
| 668 | D2994BAA1E8F490700E8D2CC /* CNLiveMsgTools.framework in Frameworks */, | 795 | D2994BAA1E8F490700E8D2CC /* CNLiveMsgTools.framework in Frameworks */, |
| 796 | + 4BD856191EBAD4E30082061D /* CNLiveUserSystemSDK.framework in Frameworks */, | ||
| 669 | 811BB6831E8106A2005C6291 /* CNLivePlayerSDK.framework in Frameworks */, | 797 | 811BB6831E8106A2005C6291 /* CNLivePlayerSDK.framework in Frameworks */, |
| 670 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */, | 798 | D2994BA61E8F48DE00E8D2CC /* CNLiveChatManager.framework in Frameworks */, |
| 671 | D2994BA81E8F490400E8D2CC /* CNLiveChatManager.framework in Frameworks */, | 799 | D2994BA81E8F490400E8D2CC /* CNLiveChatManager.framework in Frameworks */, |
| @@ -689,6 +817,208 @@ | @@ -689,6 +817,208 @@ | ||
| 689 | /* End PBXFrameworksBuildPhase section */ | 817 | /* End PBXFrameworksBuildPhase section */ |
| 690 | 818 | ||
| 691 | /* Begin PBXGroup section */ | 819 | /* Begin PBXGroup section */ |
| 820 | + 4B45CE421EB86A590079AFB7 /* Mine */ = { | ||
| 821 | + isa = PBXGroup; | ||
| 822 | + children = ( | ||
| 823 | + 4B45CE431EB86A590079AFB7 /* Controllers */, | ||
| 824 | + 4B45CE541EB86A590079AFB7 /* IAP */, | ||
| 825 | + 4B45CE551EB86A590079AFB7 /* Login */, | ||
| 826 | + 4B45CE601EB86A590079AFB7 /* Model */, | ||
| 827 | + 4B45CE651EB86A590079AFB7 /* Views */, | ||
| 828 | + ); | ||
| 829 | + path = Mine; | ||
| 830 | + sourceTree = "<group>"; | ||
| 831 | + }; | ||
| 832 | + 4B45CE431EB86A590079AFB7 /* Controllers */ = { | ||
| 833 | + isa = PBXGroup; | ||
| 834 | + children = ( | ||
| 835 | + 4B45CE441EB86A590079AFB7 /* BeingAnchorController.h */, | ||
| 836 | + 4B45CE451EB86A590079AFB7 /* BeingAnchorController.m */, | ||
| 837 | + 4B45CE461EB86A590079AFB7 /* IDViewController.h */, | ||
| 838 | + 4B45CE471EB86A590079AFB7 /* IDViewController.m */, | ||
| 839 | + 4B45CE481EB86A590079AFB7 /* JCMineViewController.h */, | ||
| 840 | + 4B45CE491EB86A590079AFB7 /* JCMineViewController.m */, | ||
| 841 | + 4B45CE4A1EB86A590079AFB7 /* MineAboutUsController.h */, | ||
| 842 | + 4B45CE4B1EB86A590079AFB7 /* MineAboutUsController.m */, | ||
| 843 | + 4B45CE4C1EB86A590079AFB7 /* MineLiveController.h */, | ||
| 844 | + 4B45CE4D1EB86A590079AFB7 /* MineLiveController.m */, | ||
| 845 | + 4B45CE4E1EB86A590079AFB7 /* MinePersonalDataController.h */, | ||
| 846 | + 4B45CE4F1EB86A590079AFB7 /* MinePersonalDataController.m */, | ||
| 847 | + 4B45CE501EB86A590079AFB7 /* MineSettingViewController.h */, | ||
| 848 | + 4B45CE511EB86A590079AFB7 /* MineSettingViewController.m */, | ||
| 849 | + 4B45CE521EB86A590079AFB7 /* ModifyInfomationController.h */, | ||
| 850 | + 4B45CE531EB86A590079AFB7 /* ModifyInfomationController.m */, | ||
| 851 | + ); | ||
| 852 | + path = Controllers; | ||
| 853 | + sourceTree = "<group>"; | ||
| 854 | + }; | ||
| 855 | + 4B45CE541EB86A590079AFB7 /* IAP */ = { | ||
| 856 | + isa = PBXGroup; | ||
| 857 | + children = ( | ||
| 858 | + ); | ||
| 859 | + path = IAP; | ||
| 860 | + sourceTree = "<group>"; | ||
| 861 | + }; | ||
| 862 | + 4B45CE551EB86A590079AFB7 /* Login */ = { | ||
| 863 | + isa = PBXGroup; | ||
| 864 | + children = ( | ||
| 865 | + 4B45CE561EB86A590079AFB7 /* Controller */, | ||
| 866 | + 4B45CE5B1EB86A590079AFB7 /* View */, | ||
| 867 | + ); | ||
| 868 | + path = Login; | ||
| 869 | + sourceTree = "<group>"; | ||
| 870 | + }; | ||
| 871 | + 4B45CE561EB86A590079AFB7 /* Controller */ = { | ||
| 872 | + isa = PBXGroup; | ||
| 873 | + children = ( | ||
| 874 | + 4B45CE571EB86A590079AFB7 /* LoginViewController.h */, | ||
| 875 | + 4B45CE581EB86A590079AFB7 /* LoginViewController.m */, | ||
| 876 | + 4B45CE591EB86A590079AFB7 /* RegisterCommonController.h */, | ||
| 877 | + 4B45CE5A1EB86A590079AFB7 /* RegisterCommonController.m */, | ||
| 878 | + ); | ||
| 879 | + path = Controller; | ||
| 880 | + sourceTree = "<group>"; | ||
| 881 | + }; | ||
| 882 | + 4B45CE5B1EB86A590079AFB7 /* View */ = { | ||
| 883 | + isa = PBXGroup; | ||
| 884 | + children = ( | ||
| 885 | + 4B45CE5C1EB86A590079AFB7 /* idAndPwdView.h */, | ||
| 886 | + 4B45CE5D1EB86A590079AFB7 /* idAndPwdView.m */, | ||
| 887 | + 4B45CE5E1EB86A590079AFB7 /* RegistBasicInformationView.h */, | ||
| 888 | + 4B45CE5F1EB86A590079AFB7 /* RegistBasicInformationView.m */, | ||
| 889 | + ); | ||
| 890 | + path = View; | ||
| 891 | + sourceTree = "<group>"; | ||
| 892 | + }; | ||
| 893 | + 4B45CE601EB86A590079AFB7 /* Model */ = { | ||
| 894 | + isa = PBXGroup; | ||
| 895 | + children = ( | ||
| 896 | + 4BD856101EBAD2640082061D /* ProgramModel.h */, | ||
| 897 | + 4BD856111EBAD2640082061D /* ProgramModel.m */, | ||
| 898 | + 4B45CE611EB86A590079AFB7 /* ZXMineCommonModel.h */, | ||
| 899 | + 4B45CE621EB86A590079AFB7 /* ZXMineCommonModel.m */, | ||
| 900 | + 4B45CE631EB86A590079AFB7 /* ZXMineModel.h */, | ||
| 901 | + 4B45CE641EB86A590079AFB7 /* ZXMineModel.m */, | ||
| 902 | + ); | ||
| 903 | + path = Model; | ||
| 904 | + sourceTree = "<group>"; | ||
| 905 | + }; | ||
| 906 | + 4B45CE651EB86A590079AFB7 /* Views */ = { | ||
| 907 | + isa = PBXGroup; | ||
| 908 | + children = ( | ||
| 909 | + 4B45CE661EB86A590079AFB7 /* ModifyCommonView.h */, | ||
| 910 | + 4B45CE671EB86A590079AFB7 /* ModifyCommonView.m */, | ||
| 911 | + 4B45CE681EB86A590079AFB7 /* ZXClearCachesCell.h */, | ||
| 912 | + 4B45CE691EB86A590079AFB7 /* ZXClearCachesCell.m */, | ||
| 913 | + 4B45CE6A1EB86A590079AFB7 /* ZXLoginShowView.h */, | ||
| 914 | + 4B45CE6B1EB86A590079AFB7 /* ZXLoginShowView.m */, | ||
| 915 | + 4B45CE6C1EB86A590079AFB7 /* ZXMineCommonCell.h */, | ||
| 916 | + 4B45CE6D1EB86A590079AFB7 /* ZXMineCommonCell.m */, | ||
| 917 | + 4B45CE6E1EB86A590079AFB7 /* ZXMineShowCell.h */, | ||
| 918 | + 4B45CE6F1EB86A590079AFB7 /* ZXMineShowCell.m */, | ||
| 919 | + 4B45CE701EB86A590079AFB7 /* ZXPersonalImageCell.h */, | ||
| 920 | + 4B45CE711EB86A590079AFB7 /* ZXPersonalImageCell.m */, | ||
| 921 | + 4B45CE721EB86A590079AFB7 /* ZXPersonCommonCell.h */, | ||
| 922 | + 4B45CE731EB86A590079AFB7 /* ZXPersonCommonCell.m */, | ||
| 923 | + 4B45CE741EB86A590079AFB7 /* ZXTextField.h */, | ||
| 924 | + 4B45CE751EB86A590079AFB7 /* ZXTextField.m */, | ||
| 925 | + ); | ||
| 926 | + path = Views; | ||
| 927 | + sourceTree = "<group>"; | ||
| 928 | + }; | ||
| 929 | + 4B45CE8C1EB86A760079AFB7 /* UIKit */ = { | ||
| 930 | + isa = PBXGroup; | ||
| 931 | + children = ( | ||
| 932 | + 4B45CE8D1EB86A760079AFB7 /* UIButton+createButton.h */, | ||
| 933 | + 4B45CE8E1EB86A760079AFB7 /* UIButton+createButton.m */, | ||
| 934 | + 4B45CE8F1EB86A760079AFB7 /* UILabel+createLabel.h */, | ||
| 935 | + 4B45CE901EB86A760079AFB7 /* UILabel+createLabel.m */, | ||
| 936 | + 4B45CE911EB86A760079AFB7 /* UITextField+createTextField.h */, | ||
| 937 | + 4B45CE921EB86A760079AFB7 /* UITextField+createTextField.m */, | ||
| 938 | + 4B45CE931EB86A760079AFB7 /* ZXLabel.h */, | ||
| 939 | + 4B45CE941EB86A760079AFB7 /* ZXLabel.m */, | ||
| 940 | + 4B45CE951EB86A760079AFB7 /* ZXUIKit.h */, | ||
| 941 | + 4B45CE961EB86A760079AFB7 /* ZXUIKit.m */, | ||
| 942 | + ); | ||
| 943 | + path = UIKit; | ||
| 944 | + sourceTree = "<group>"; | ||
| 945 | + }; | ||
| 946 | + 4B45CE9C1EB86B9E0079AFB7 /* UserTools */ = { | ||
| 947 | + isa = PBXGroup; | ||
| 948 | + children = ( | ||
| 949 | + 4B45CE9D1EB86B9E0079AFB7 /* CNLiveThirdLoginManager.h */, | ||
| 950 | + 4B45CE9E1EB86B9E0079AFB7 /* CNLiveThirdLoginManager.m */, | ||
| 951 | + 4B45CE9F1EB86B9E0079AFB7 /* NSNumber+ScaleHeight.h */, | ||
| 952 | + 4B45CEA01EB86B9E0079AFB7 /* NSNumber+ScaleHeight.m */, | ||
| 953 | + 4B45CEA11EB86B9E0079AFB7 /* NSObject+UserModel.h */, | ||
| 954 | + 4B45CEA21EB86B9F0079AFB7 /* NSObject+UserModel.m */, | ||
| 955 | + 4B45CEA31EB86B9F0079AFB7 /* UserTools.h */, | ||
| 956 | + 4B45CEA41EB86B9F0079AFB7 /* UserTools.m */, | ||
| 957 | + ); | ||
| 958 | + path = UserTools; | ||
| 959 | + sourceTree = "<group>"; | ||
| 960 | + }; | ||
| 961 | + 4BD855D41EBACD530082061D /* AFNetworking */ = { | ||
| 962 | + isa = PBXGroup; | ||
| 963 | + children = ( | ||
| 964 | + 4BD855D51EBACD530082061D /* AFHTTPRequestOperation.h */, | ||
| 965 | + 4BD855D61EBACD530082061D /* AFHTTPRequestOperation.m */, | ||
| 966 | + 4BD855D71EBACD530082061D /* AFHTTPRequestOperationManager.h */, | ||
| 967 | + 4BD855D81EBACD530082061D /* AFHTTPRequestOperationManager.m */, | ||
| 968 | + 4BD855D91EBACD530082061D /* AFHTTPSessionManager.h */, | ||
| 969 | + 4BD855DA1EBACD530082061D /* AFHTTPSessionManager.m */, | ||
| 970 | + 4BD855DB1EBACD530082061D /* AFNetworking.h */, | ||
| 971 | + 4BD855DC1EBACD530082061D /* AFNetworkReachabilityManager.h */, | ||
| 972 | + 4BD855DD1EBACD530082061D /* AFNetworkReachabilityManager.m */, | ||
| 973 | + 4BD855DE1EBACD530082061D /* AFSecurityPolicy.h */, | ||
| 974 | + 4BD855DF1EBACD530082061D /* AFSecurityPolicy.m */, | ||
| 975 | + 4BD855E01EBACD530082061D /* AFURLConnectionOperation.h */, | ||
| 976 | + 4BD855E11EBACD530082061D /* AFURLConnectionOperation.m */, | ||
| 977 | + 4BD855E21EBACD530082061D /* AFURLRequestSerialization.h */, | ||
| 978 | + 4BD855E31EBACD530082061D /* AFURLRequestSerialization.m */, | ||
| 979 | + 4BD855E41EBACD530082061D /* AFURLResponseSerialization.h */, | ||
| 980 | + 4BD855E51EBACD530082061D /* AFURLResponseSerialization.m */, | ||
| 981 | + 4BD855E61EBACD530082061D /* AFURLSessionManager.h */, | ||
| 982 | + 4BD855E71EBACD530082061D /* AFURLSessionManager.m */, | ||
| 983 | + 4BD855E81EBACD530082061D /* UIKit+AFNetworking */, | ||
| 984 | + ); | ||
| 985 | + path = AFNetworking; | ||
| 986 | + sourceTree = "<group>"; | ||
| 987 | + }; | ||
| 988 | + 4BD855E81EBACD530082061D /* UIKit+AFNetworking */ = { | ||
| 989 | + isa = PBXGroup; | ||
| 990 | + children = ( | ||
| 991 | + 4BD855E91EBACD530082061D /* AFNetworkActivityIndicatorManager.h */, | ||
| 992 | + 4BD855EA1EBACD530082061D /* AFNetworkActivityIndicatorManager.m */, | ||
| 993 | + 4BD855EB1EBACD530082061D /* UIActivityIndicatorView+AFNetworking.h */, | ||
| 994 | + 4BD855EC1EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m */, | ||
| 995 | + 4BD855ED1EBACD530082061D /* UIAlertView+AFNetworking.h */, | ||
| 996 | + 4BD855EE1EBACD530082061D /* UIAlertView+AFNetworking.m */, | ||
| 997 | + 4BD855EF1EBACD530082061D /* UIButton+AFNetworking.h */, | ||
| 998 | + 4BD855F01EBACD530082061D /* UIButton+AFNetworking.m */, | ||
| 999 | + 4BD855F11EBACD530082061D /* UIImageView+AFNetworking.h */, | ||
| 1000 | + 4BD855F21EBACD530082061D /* UIImageView+AFNetworking.m */, | ||
| 1001 | + 4BD855F31EBACD530082061D /* UIKit+AFNetworking.h */, | ||
| 1002 | + 4BD855F41EBACD530082061D /* UIProgressView+AFNetworking.h */, | ||
| 1003 | + 4BD855F51EBACD530082061D /* UIProgressView+AFNetworking.m */, | ||
| 1004 | + 4BD855F61EBACD530082061D /* UIRefreshControl+AFNetworking.h */, | ||
| 1005 | + 4BD855F71EBACD530082061D /* UIRefreshControl+AFNetworking.m */, | ||
| 1006 | + 4BD855F81EBACD530082061D /* UIWebView+AFNetworking.h */, | ||
| 1007 | + 4BD855F91EBACD530082061D /* UIWebView+AFNetworking.m */, | ||
| 1008 | + ); | ||
| 1009 | + path = "UIKit+AFNetworking"; | ||
| 1010 | + sourceTree = "<group>"; | ||
| 1011 | + }; | ||
| 1012 | + 4BD8560D1EBACEF80082061D /* webView */ = { | ||
| 1013 | + isa = PBXGroup; | ||
| 1014 | + children = ( | ||
| 1015 | + 4BD8560B1EBACEF80082061D /* CNLiveWebView.h */, | ||
| 1016 | + 4BD8560C1EBACEF80082061D /* CNLiveWebView.m */, | ||
| 1017 | + 4BD8560E1EBACEF80082061D /* CNLiveMacro.h */, | ||
| 1018 | + ); | ||
| 1019 | + path = webView; | ||
| 1020 | + sourceTree = "<group>"; | ||
| 1021 | + }; | ||
| 692 | 810B64E41E779B1F00133E15 /* Masonry */ = { | 1022 | 810B64E41E779B1F00133E15 /* Masonry */ = { |
| 693 | isa = PBXGroup; | 1023 | isa = PBXGroup; |
| 694 | children = ( | 1024 | children = ( |
| @@ -930,11 +1260,11 @@ | @@ -930,11 +1260,11 @@ | ||
| 930 | D2029BD41E6EADE10027CD92 /* SDK */ = { | 1260 | D2029BD41E6EADE10027CD92 /* SDK */ = { |
| 931 | isa = PBXGroup; | 1261 | isa = PBXGroup; |
| 932 | children = ( | 1262 | children = ( |
| 1263 | + 4BD855D41EBACD530082061D /* AFNetworking */, | ||
| 933 | 81F1C8391E8BBDE40085C2B8 /* V8HorizontalPickerView */, | 1264 | 81F1C8391E8BBDE40085C2B8 /* V8HorizontalPickerView */, |
| 934 | 81F1C8351E8BBDDA0085C2B8 /* MHPagingScrollView */, | 1265 | 81F1C8351E8BBDDA0085C2B8 /* MHPagingScrollView */, |
| 935 | 81FB5B391E7A6FFC00F98E1D /* SevenSwitch */, | 1266 | 81FB5B391E7A6FFC00F98E1D /* SevenSwitch */, |
| 936 | 810B64E41E779B1F00133E15 /* Masonry */, | 1267 | 810B64E41E779B1F00133E15 /* Masonry */, |
| 937 | - D2029BD51E6EADE10027CD92 /* AFNetworking */, | ||
| 938 | D2029BF81E6EADE10027CD92 /* MBProgressHUD */, | 1268 | D2029BF81E6EADE10027CD92 /* MBProgressHUD */, |
| 939 | D2029BFB1E6EADE10027CD92 /* MJExtension */, | 1269 | D2029BFB1E6EADE10027CD92 /* MJExtension */, |
| 940 | D2029C121E6EADE10027CD92 /* MJRefresh */, | 1270 | D2029C121E6EADE10027CD92 /* MJRefresh */, |
| @@ -946,54 +1276,6 @@ | @@ -946,54 +1276,6 @@ | ||
| 946 | path = SDK; | 1276 | path = SDK; |
| 947 | sourceTree = "<group>"; | 1277 | sourceTree = "<group>"; |
| 948 | }; | 1278 | }; |
| 949 | - D2029BD51E6EADE10027CD92 /* AFNetworking */ = { | ||
| 950 | - isa = PBXGroup; | ||
| 951 | - children = ( | ||
| 952 | - D2029BD61E6EADE10027CD92 /* AFHTTPSessionManager.h */, | ||
| 953 | - D2029BD71E6EADE10027CD92 /* AFHTTPSessionManager.m */, | ||
| 954 | - D2029BD81E6EADE10027CD92 /* AFNetworking.h */, | ||
| 955 | - D2029BD91E6EADE10027CD92 /* AFNetworkReachabilityManager.h */, | ||
| 956 | - D2029BDA1E6EADE10027CD92 /* AFNetworkReachabilityManager.m */, | ||
| 957 | - D2029BDB1E6EADE10027CD92 /* AFSecurityPolicy.h */, | ||
| 958 | - D2029BDC1E6EADE10027CD92 /* AFSecurityPolicy.m */, | ||
| 959 | - D2029BDD1E6EADE10027CD92 /* AFURLRequestSerialization.h */, | ||
| 960 | - D2029BDE1E6EADE10027CD92 /* AFURLRequestSerialization.m */, | ||
| 961 | - D2029BDF1E6EADE10027CD92 /* AFURLResponseSerialization.h */, | ||
| 962 | - D2029BE01E6EADE10027CD92 /* AFURLResponseSerialization.m */, | ||
| 963 | - D2029BE11E6EADE10027CD92 /* AFURLSessionManager.h */, | ||
| 964 | - D2029BE21E6EADE10027CD92 /* AFURLSessionManager.m */, | ||
| 965 | - D2029BE31E6EADE10027CD92 /* UIKit+AFNetworking */, | ||
| 966 | - ); | ||
| 967 | - path = AFNetworking; | ||
| 968 | - sourceTree = "<group>"; | ||
| 969 | - }; | ||
| 970 | - D2029BE31E6EADE10027CD92 /* UIKit+AFNetworking */ = { | ||
| 971 | - isa = PBXGroup; | ||
| 972 | - children = ( | ||
| 973 | - D2029BE41E6EADE10027CD92 /* AFAutoPurgingImageCache.h */, | ||
| 974 | - D2029BE51E6EADE10027CD92 /* AFAutoPurgingImageCache.m */, | ||
| 975 | - D2029BE61E6EADE10027CD92 /* AFImageDownloader.h */, | ||
| 976 | - D2029BE71E6EADE10027CD92 /* AFImageDownloader.m */, | ||
| 977 | - D2029BE81E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.h */, | ||
| 978 | - D2029BE91E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.m */, | ||
| 979 | - D2029BEA1E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.h */, | ||
| 980 | - D2029BEB1E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m */, | ||
| 981 | - D2029BEC1E6EADE10027CD92 /* UIButton+AFNetworking.h */, | ||
| 982 | - D2029BED1E6EADE10027CD92 /* UIButton+AFNetworking.m */, | ||
| 983 | - D2029BEE1E6EADE10027CD92 /* UIImage+AFNetworking.h */, | ||
| 984 | - D2029BEF1E6EADE10027CD92 /* UIImageView+AFNetworking.h */, | ||
| 985 | - D2029BF01E6EADE10027CD92 /* UIImageView+AFNetworking.m */, | ||
| 986 | - D2029BF11E6EADE10027CD92 /* UIKit+AFNetworking.h */, | ||
| 987 | - D2029BF21E6EADE10027CD92 /* UIProgressView+AFNetworking.h */, | ||
| 988 | - D2029BF31E6EADE10027CD92 /* UIProgressView+AFNetworking.m */, | ||
| 989 | - D2029BF41E6EADE10027CD92 /* UIRefreshControl+AFNetworking.h */, | ||
| 990 | - D2029BF51E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m */, | ||
| 991 | - D2029BF61E6EADE10027CD92 /* UIWebView+AFNetworking.h */, | ||
| 992 | - D2029BF71E6EADE10027CD92 /* UIWebView+AFNetworking.m */, | ||
| 993 | - ); | ||
| 994 | - path = "UIKit+AFNetworking"; | ||
| 995 | - sourceTree = "<group>"; | ||
| 996 | - }; | ||
| 997 | D2029BF81E6EADE10027CD92 /* MBProgressHUD */ = { | 1279 | D2029BF81E6EADE10027CD92 /* MBProgressHUD */ = { |
| 998 | isa = PBXGroup; | 1280 | isa = PBXGroup; |
| 999 | children = ( | 1281 | children = ( |
| @@ -1212,9 +1494,9 @@ | @@ -1212,9 +1494,9 @@ | ||
| 1212 | D2029C741E6EADE10027CD92 /* Sections */ = { | 1494 | D2029C741E6EADE10027CD92 /* Sections */ = { |
| 1213 | isa = PBXGroup; | 1495 | isa = PBXGroup; |
| 1214 | children = ( | 1496 | children = ( |
| 1497 | + 4B45CE421EB86A590079AFB7 /* Mine */, | ||
| 1215 | D2888DA71E6EC014003A77C8 /* homeSections */, | 1498 | D2888DA71E6EC014003A77C8 /* homeSections */, |
| 1216 | D2888D951E6EBAA7003A77C8 /* LiveSections */, | 1499 | D2888D951E6EBAA7003A77C8 /* LiveSections */, |
| 1217 | - D2888DAB1E6EC014003A77C8 /* mySections */, | ||
| 1218 | D2575C431E76846900E3A8FC /* InteractionSections */, | 1500 | D2575C431E76846900E3A8FC /* InteractionSections */, |
| 1219 | D2029C751E6EADE10027CD92 /* ZXSections(例子) */, | 1501 | D2029C751E6EADE10027CD92 /* ZXSections(例子) */, |
| 1220 | ); | 1502 | ); |
| @@ -1293,10 +1575,15 @@ | @@ -1293,10 +1575,15 @@ | ||
| 1293 | D2029CDC1E6EAE2E0027CD92 /* UtilKits */ = { | 1575 | D2029CDC1E6EAE2E0027CD92 /* UtilKits */ = { |
| 1294 | isa = PBXGroup; | 1576 | isa = PBXGroup; |
| 1295 | children = ( | 1577 | children = ( |
| 1578 | + 4BD8560D1EBACEF80082061D /* webView */, | ||
| 1579 | + 4BD855CE1EBAC57A0082061D /* Common.h */, | ||
| 1580 | + 4B45CEAC1EB873630079AFB7 /* UserInformationModel.h */, | ||
| 1581 | + 4B45CEAD1EB873630079AFB7 /* UserInformationModel.m */, | ||
| 1582 | + 4B45CE9C1EB86B9E0079AFB7 /* UserTools */, | ||
| 1583 | + 4B45CE8C1EB86A760079AFB7 /* UIKit */, | ||
| 1296 | D2029CFF1E6EAE2E0027CD92 /* UtilKits.h */, | 1584 | D2029CFF1E6EAE2E0027CD92 /* UtilKits.h */, |
| 1297 | D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */, | 1585 | D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */, |
| 1298 | D2029CDD1E6EAE2E0027CD92 /* Category */, | 1586 | D2029CDD1E6EAE2E0027CD92 /* Category */, |
| 1299 | - D2029CEC1E6EAE2E0027CD92 /* Const */, | ||
| 1300 | D2029CEF1E6EAE2E0027CD92 /* DeviceInfo */, | 1587 | D2029CEF1E6EAE2E0027CD92 /* DeviceInfo */, |
| 1301 | D2029CF31E6EAE2E0027CD92 /* Macro */, | 1588 | D2029CF31E6EAE2E0027CD92 /* Macro */, |
| 1302 | D2029CFC1E6EAE2E0027CD92 /* ServerUrl */, | 1589 | D2029CFC1E6EAE2E0027CD92 /* ServerUrl */, |
| @@ -1307,6 +1594,16 @@ | @@ -1307,6 +1594,16 @@ | ||
| 1307 | D2029CDD1E6EAE2E0027CD92 /* Category */ = { | 1594 | D2029CDD1E6EAE2E0027CD92 /* Category */ = { |
| 1308 | isa = PBXGroup; | 1595 | isa = PBXGroup; |
| 1309 | children = ( | 1596 | children = ( |
| 1597 | + 4BD856161EBAD35C0082061D /* NSDictionary+Safety.h */, | ||
| 1598 | + 4BD856171EBAD35C0082061D /* NSDictionary+Safety.m */, | ||
| 1599 | + 4BD856131EBAD31A0082061D /* NSString+UrlEncode.h */, | ||
| 1600 | + 4BD856141EBAD31A0082061D /* NSString+UrlEncode.m */, | ||
| 1601 | + 4BD855CF1EBAC7220082061D /* DESUtility.h */, | ||
| 1602 | + 4BD855D01EBAC7220082061D /* DESUtility.m */, | ||
| 1603 | + 4BD855CB1EBAC4B70082061D /* CNLiveKeychainWrapper.h */, | ||
| 1604 | + 4BD855CC1EBAC4B70082061D /* CNLiveKeychainWrapper.m */, | ||
| 1605 | + 4B45CEA91EB86BFA0079AFB7 /* NSString+ZXExtension.h */, | ||
| 1606 | + 4B45CEAA1EB86BFA0079AFB7 /* NSString+ZXExtension.m */, | ||
| 1310 | 81F1C83E1E8BC5CC0085C2B8 /* NSArray+Safety.h */, | 1607 | 81F1C83E1E8BC5CC0085C2B8 /* NSArray+Safety.h */, |
| 1311 | 81F1C83F1E8BC5CC0085C2B8 /* NSArray+Safety.m */, | 1608 | 81F1C83F1E8BC5CC0085C2B8 /* NSArray+Safety.m */, |
| 1312 | 81A483061E88B6140097A80A /* UIView+ViewController.h */, | 1609 | 81A483061E88B6140097A80A /* UIView+ViewController.h */, |
| @@ -1335,15 +1632,6 @@ | @@ -1335,15 +1632,6 @@ | ||
| 1335 | path = Category; | 1632 | path = Category; |
| 1336 | sourceTree = "<group>"; | 1633 | sourceTree = "<group>"; |
| 1337 | }; | 1634 | }; |
| 1338 | - D2029CEC1E6EAE2E0027CD92 /* Const */ = { | ||
| 1339 | - isa = PBXGroup; | ||
| 1340 | - children = ( | ||
| 1341 | - D2029CED1E6EAE2E0027CD92 /* ZXConst.h */, | ||
| 1342 | - D2029CEE1E6EAE2E0027CD92 /* ZXConst.m */, | ||
| 1343 | - ); | ||
| 1344 | - path = Const; | ||
| 1345 | - sourceTree = "<group>"; | ||
| 1346 | - }; | ||
| 1347 | D2029CEF1E6EAE2E0027CD92 /* DeviceInfo */ = { | 1635 | D2029CEF1E6EAE2E0027CD92 /* DeviceInfo */ = { |
| 1348 | isa = PBXGroup; | 1636 | isa = PBXGroup; |
| 1349 | children = ( | 1637 | children = ( |
| @@ -1357,6 +1645,8 @@ | @@ -1357,6 +1645,8 @@ | ||
| 1357 | isa = PBXGroup; | 1645 | isa = PBXGroup; |
| 1358 | children = ( | 1646 | children = ( |
| 1359 | D2029CF41E6EAE2E0027CD92 /* Macros */, | 1647 | D2029CF41E6EAE2E0027CD92 /* Macros */, |
| 1648 | + 4BD8561B1EBAD6490082061D /* ZXConst.h */, | ||
| 1649 | + 4BD8561C1EBAD6490082061D /* ZXConst.m */, | ||
| 1360 | D2029CFB1E6EAE2E0027CD92 /* Macros.h */, | 1650 | D2029CFB1E6EAE2E0027CD92 /* Macros.h */, |
| 1361 | ); | 1651 | ); |
| 1362 | path = Macro; | 1652 | path = Macro; |
| @@ -1632,6 +1922,7 @@ | @@ -1632,6 +1922,7 @@ | ||
| 1632 | D25BF8A11E80C4FC007FB138 /* Frameworks */ = { | 1922 | D25BF8A11E80C4FC007FB138 /* Frameworks */ = { |
| 1633 | isa = PBXGroup; | 1923 | isa = PBXGroup; |
| 1634 | children = ( | 1924 | children = ( |
| 1925 | + 4BD855D21EBAC8B20082061D /* CNLiveUserSystemSDK.framework */, | ||
| 1635 | D25BF8A21E80C4FC007FB138 /* Accelerate.framework */, | 1926 | D25BF8A21E80C4FC007FB138 /* Accelerate.framework */, |
| 1636 | ); | 1927 | ); |
| 1637 | name = Frameworks; | 1928 | name = Frameworks; |
| @@ -1731,39 +2022,6 @@ | @@ -1731,39 +2022,6 @@ | ||
| 1731 | path = View; | 2022 | path = View; |
| 1732 | sourceTree = "<group>"; | 2023 | sourceTree = "<group>"; |
| 1733 | }; | 2024 | }; |
| 1734 | - D2888DAB1E6EC014003A77C8 /* mySections */ = { | ||
| 1735 | - isa = PBXGroup; | ||
| 1736 | - children = ( | ||
| 1737 | - D2888DAC1E6EC014003A77C8 /* Controller */, | ||
| 1738 | - D2888DAD1E6EC014003A77C8 /* Model */, | ||
| 1739 | - D2888DAE1E6EC014003A77C8 /* View */, | ||
| 1740 | - ); | ||
| 1741 | - path = mySections; | ||
| 1742 | - sourceTree = "<group>"; | ||
| 1743 | - }; | ||
| 1744 | - D2888DAC1E6EC014003A77C8 /* Controller */ = { | ||
| 1745 | - isa = PBXGroup; | ||
| 1746 | - children = ( | ||
| 1747 | - D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */, | ||
| 1748 | - D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */, | ||
| 1749 | - ); | ||
| 1750 | - path = Controller; | ||
| 1751 | - sourceTree = "<group>"; | ||
| 1752 | - }; | ||
| 1753 | - D2888DAD1E6EC014003A77C8 /* Model */ = { | ||
| 1754 | - isa = PBXGroup; | ||
| 1755 | - children = ( | ||
| 1756 | - ); | ||
| 1757 | - path = Model; | ||
| 1758 | - sourceTree = "<group>"; | ||
| 1759 | - }; | ||
| 1760 | - D2888DAE1E6EC014003A77C8 /* View */ = { | ||
| 1761 | - isa = PBXGroup; | ||
| 1762 | - children = ( | ||
| 1763 | - ); | ||
| 1764 | - path = View; | ||
| 1765 | - sourceTree = "<group>"; | ||
| 1766 | - }; | ||
| 1767 | D2B7B24E1E8247B500ED084E /* ChatBarrageManager */ = { | 2025 | D2B7B24E1E8247B500ED084E /* ChatBarrageManager */ = { |
| 1768 | isa = PBXGroup; | 2026 | isa = PBXGroup; |
| 1769 | children = ( | 2027 | children = ( |
| @@ -1848,7 +2106,6 @@ | @@ -1848,7 +2106,6 @@ | ||
| 1848 | TargetAttributes = { | 2106 | TargetAttributes = { |
| 1849 | D2029B801E6EAAA50027CD92 = { | 2107 | D2029B801E6EAAA50027CD92 = { |
| 1850 | CreatedOnToolsVersion = 8.2.1; | 2108 | CreatedOnToolsVersion = 8.2.1; |
| 1851 | - DevelopmentTeam = 94X49GG3ZW; | ||
| 1852 | ProvisioningStyle = Automatic; | 2109 | ProvisioningStyle = Automatic; |
| 1853 | }; | 2110 | }; |
| 1854 | D2029B991E6EAAA50027CD92 = { | 2111 | D2029B991E6EAAA50027CD92 = { |
| @@ -1927,12 +2184,14 @@ | @@ -1927,12 +2184,14 @@ | ||
| 1927 | files = ( | 2184 | files = ( |
| 1928 | D2029CC31E6EADE10027CD92 /* UIImageView+HighlightedWebCache.m in Sources */, | 2185 | D2029CC31E6EADE10027CD92 /* UIImageView+HighlightedWebCache.m in Sources */, |
| 1929 | D22830FF1E77C69E00627701 /* GiftListView.m in Sources */, | 2186 | D22830FF1E77C69E00627701 /* GiftListView.m in Sources */, |
| 2187 | + 4B45CE8A1EB86A590079AFB7 /* ZXPersonCommonCell.m in Sources */, | ||
| 1930 | 81F1C83D1E8BBDE40085C2B8 /* V8HorizontalPickerView.m in Sources */, | 2188 | 81F1C83D1E8BBDE40085C2B8 /* V8HorizontalPickerView.m in Sources */, |
| 1931 | D2029CC01E6EADE10027CD92 /* UIImage+GIF.m in Sources */, | 2189 | D2029CC01E6EADE10027CD92 /* UIImage+GIF.m in Sources */, |
| 2190 | + 4B45CE851EB86A590079AFB7 /* ZXClearCachesCell.m in Sources */, | ||
| 1932 | D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */, | 2191 | D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */, |
| 1933 | 81A4831A1E88E19C0097A80A /* LVCMoreProgramViewController.m in Sources */, | 2192 | 81A4831A1E88E19C0097A80A /* LVCMoreProgramViewController.m in Sources */, |
| 2193 | + 4B45CE9B1EB86A760079AFB7 /* ZXUIKit.m in Sources */, | ||
| 1934 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */, | 2194 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */, |
| 1935 | - D2029D071E6EAE2E0027CD92 /* ZXConst.m in Sources */, | ||
| 1936 | D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */, | 2195 | D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */, |
| 1937 | D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */, | 2196 | D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */, |
| 1938 | D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */, | 2197 | D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */, |
| @@ -1941,37 +2200,43 @@ | @@ -1941,37 +2200,43 @@ | ||
| 1941 | D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */, | 2200 | D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */, |
| 1942 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */, | 2201 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */, |
| 1943 | D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */, | 2202 | D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */, |
| 2203 | + 4B45CE861EB86A590079AFB7 /* ZXLoginShowView.m in Sources */, | ||
| 1944 | D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */, | 2204 | D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */, |
| 2205 | + 4BD855FE1EBACD530082061D /* AFSecurityPolicy.m in Sources */, | ||
| 1945 | D2029CB51E6EADE10027CD92 /* SDiOSVersion.m in Sources */, | 2206 | D2029CB51E6EADE10027CD92 /* SDiOSVersion.m in Sources */, |
| 2207 | + 4B45CE981EB86A760079AFB7 /* UILabel+createLabel.m in Sources */, | ||
| 1946 | D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */, | 2208 | D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */, |
| 1947 | 81A4830E1E88B8300097A80A /* LVCChannelsModel.m in Sources */, | 2209 | 81A4830E1E88B8300097A80A /* LVCChannelsModel.m in Sources */, |
| 1948 | D22831091E77D8D500627701 /* GiftModel.m in Sources */, | 2210 | D22831091E77D8D500627701 /* GiftModel.m in Sources */, |
| 1949 | D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */, | 2211 | D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */, |
| 2212 | + 4BD8560F1EBACEF80082061D /* CNLiveWebView.m in Sources */, | ||
| 1950 | 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, | 2213 | 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, |
| 1951 | D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */, | 2214 | D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */, |
| 1952 | 8130911E1E84C0F0005F0BFF /* LVCMessage.m in Sources */, | 2215 | 8130911E1E84C0F0005F0BFF /* LVCMessage.m in Sources */, |
| 1953 | D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */, | 2216 | D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */, |
| 2217 | + 4B45CE7B1EB86A590079AFB7 /* MinePersonalDataController.m in Sources */, | ||
| 1954 | D2029CAF1E6EADE10027CD92 /* MJRefreshStateHeader.m in Sources */, | 2218 | D2029CAF1E6EADE10027CD92 /* MJRefreshStateHeader.m in Sources */, |
| 2219 | + 4BD856091EBACD530082061D /* UIRefreshControl+AFNetworking.m in Sources */, | ||
| 1955 | 81F1C8401E8BC5CC0085C2B8 /* NSArray+Safety.m in Sources */, | 2220 | 81F1C8401E8BC5CC0085C2B8 /* NSArray+Safety.m in Sources */, |
| 1956 | D2A089EE1E8A336A0071412C /* LiveLIstService.m in Sources */, | 2221 | D2A089EE1E8A336A0071412C /* LiveLIstService.m in Sources */, |
| 1957 | - D2029C941E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m in Sources */, | ||
| 1958 | - D2029C911E6EADE10027CD92 /* UIButton+AFNetworking.m in Sources */, | ||
| 1959 | - D2029C931E6EADE10027CD92 /* UIProgressView+AFNetworking.m in Sources */, | ||
| 1960 | D2A089E81E89FA720071412C /* LVCUGCLivePlayerCell.m in Sources */, | 2222 | D2A089E81E89FA720071412C /* LVCUGCLivePlayerCell.m in Sources */, |
| 1961 | - D2029C8D1E6EADE10027CD92 /* AFAutoPurgingImageCache.m in Sources */, | ||
| 1962 | 81A483111E88B8630097A80A /* LVCChannelDetailsModel.m in Sources */, | 2223 | 81A483111E88B8630097A80A /* LVCChannelDetailsModel.m in Sources */, |
| 1963 | D2029D011E6EAE2E0027CD92 /* UIColor+HexString.m in Sources */, | 2224 | D2029D011E6EAE2E0027CD92 /* UIColor+HexString.m in Sources */, |
| 2225 | + 4B45CE7D1EB86A590079AFB7 /* ModifyInfomationController.m in Sources */, | ||
| 1964 | D2029CA41E6EADE10027CD92 /* MJRefreshComponent.m in Sources */, | 2226 | D2029CA41E6EADE10027CD92 /* MJRefreshComponent.m in Sources */, |
| 1965 | D2575C7A1E76A4F300E3A8FC /* NHCarViews.m in Sources */, | 2227 | D2575C7A1E76A4F300E3A8FC /* NHCarViews.m in Sources */, |
| 1966 | D2029CBC1E6EADE10027CD92 /* SDWebImageDownloaderOperation.m in Sources */, | 2228 | D2029CBC1E6EADE10027CD92 /* SDWebImageDownloaderOperation.m in Sources */, |
| 1967 | D2029CA51E6EADE10027CD92 /* MJRefreshFooter.m in Sources */, | 2229 | D2029CA51E6EADE10027CD92 /* MJRefreshFooter.m in Sources */, |
| 1968 | D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */, | 2230 | D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */, |
| 2231 | + 4BD856021EBACD530082061D /* AFURLSessionManager.m in Sources */, | ||
| 2232 | + 4BD855FD1EBACD530082061D /* AFNetworkReachabilityManager.m in Sources */, | ||
| 1969 | 810B65061E779B1F00133E15 /* View+MASAdditions.m in Sources */, | 2233 | 810B65061E779B1F00133E15 /* View+MASAdditions.m in Sources */, |
| 1970 | D2029D161E6EB00D0027CD92 /* AppDelegate.m in Sources */, | 2234 | D2029D161E6EB00D0027CD92 /* AppDelegate.m in Sources */, |
| 2235 | + 4B45CEA51EB86B9F0079AFB7 /* CNLiveThirdLoginManager.m in Sources */, | ||
| 2236 | + 4BD8561D1EBAD6490082061D /* ZXConst.m in Sources */, | ||
| 1971 | D2029CB71E6EADE10027CD92 /* NSData+ImageContentType.m in Sources */, | 2237 | D2029CB71E6EADE10027CD92 /* NSData+ImageContentType.m in Sources */, |
| 1972 | D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */, | 2238 | D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */, |
| 1973 | D2029CD01E6EADE10027CD92 /* SearchPresenter.m in Sources */, | 2239 | D2029CD01E6EADE10027CD92 /* SearchPresenter.m in Sources */, |
| 1974 | - D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */, | ||
| 1975 | D2029CBE1E6EADE10027CD92 /* SDWebImagePrefetcher.m in Sources */, | 2240 | D2029CBE1E6EADE10027CD92 /* SDWebImagePrefetcher.m in Sources */, |
| 1976 | 8128E2891E8A6A3600B40E75 /* CNBarrageView.m in Sources */, | 2241 | 8128E2891E8A6A3600B40E75 /* CNBarrageView.m in Sources */, |
| 1977 | D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */, | 2242 | D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */, |
| @@ -1979,37 +2244,52 @@ | @@ -1979,37 +2244,52 @@ | ||
| 1979 | 810B65011E779B1F00133E15 /* MASLayoutConstraint.m in Sources */, | 2244 | 810B65011E779B1F00133E15 /* MASLayoutConstraint.m in Sources */, |
| 1980 | D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */, | 2245 | D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */, |
| 1981 | D2029CA11E6EADE10027CD92 /* NSString+MJExtension.m in Sources */, | 2246 | D2029CA11E6EADE10027CD92 /* NSString+MJExtension.m in Sources */, |
| 2247 | + 4B45CE7A1EB86A590079AFB7 /* MineLiveController.m in Sources */, | ||
| 1982 | D2029BCB1E6EADD70027CD92 /* BaseTableViewCell.m in Sources */, | 2248 | D2029BCB1E6EADD70027CD92 /* BaseTableViewCell.m in Sources */, |
| 1983 | 81F1C8381E8BBDDA0085C2B8 /* MHPagingScrollView.m in Sources */, | 2249 | 81F1C8381E8BBDDA0085C2B8 /* MHPagingScrollView.m in Sources */, |
| 1984 | D2029CAA1E6EADE10027CD92 /* MJRefreshBackGifFooter.m in Sources */, | 2250 | D2029CAA1E6EADE10027CD92 /* MJRefreshBackGifFooter.m in Sources */, |
| 2251 | + 4BD855FB1EBACD530082061D /* AFHTTPRequestOperationManager.m in Sources */, | ||
| 1985 | D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */, | 2252 | D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */, |
| 1986 | D2029C9B1E6EADE10027CD92 /* MJPropertyKey.m in Sources */, | 2253 | D2029C9B1E6EADE10027CD92 /* MJPropertyKey.m in Sources */, |
| 2254 | + 4B45CE821EB86A590079AFB7 /* ZXMineCommonModel.m in Sources */, | ||
| 1987 | D2029CBF1E6EADE10027CD92 /* UIButton+WebCache.m in Sources */, | 2255 | D2029CBF1E6EADE10027CD92 /* UIButton+WebCache.m in Sources */, |
| 1988 | 810B64E31E779AFE00133E15 /* LVCLivePlayerController.m in Sources */, | 2256 | 810B64E31E779AFE00133E15 /* LVCLivePlayerController.m in Sources */, |
| 1989 | D2575C7E1E76A4F300E3A8FC /* NHPlaneViews.m in Sources */, | 2257 | D2575C7E1E76A4F300E3A8FC /* NHPlaneViews.m in Sources */, |
| 2258 | + 4B45CE761EB86A590079AFB7 /* BeingAnchorController.m in Sources */, | ||
| 1990 | D2029CC51E6EADE10027CD92 /* UIView+WebCacheOperation.m in Sources */, | 2259 | D2029CC51E6EADE10027CD92 /* UIView+WebCacheOperation.m in Sources */, |
| 1991 | D2029CAB1E6EADE10027CD92 /* MJRefreshBackNormalFooter.m in Sources */, | 2260 | D2029CAB1E6EADE10027CD92 /* MJRefreshBackNormalFooter.m in Sources */, |
| 1992 | - D2029C8F1E6EADE10027CD92 /* AFNetworkActivityIndicatorManager.m in Sources */, | 2261 | + 4B45CEA61EB86B9F0079AFB7 /* NSNumber+ScaleHeight.m in Sources */, |
| 1993 | 810B65031E779B1F00133E15 /* MASViewConstraint.m in Sources */, | 2262 | 810B65031E779B1F00133E15 /* MASViewConstraint.m in Sources */, |
| 1994 | D2029BCE1E6EADD70027CD92 /* ZXNavigationController.m in Sources */, | 2263 | D2029BCE1E6EADD70027CD92 /* ZXNavigationController.m in Sources */, |
| 1995 | 81A482F51E88ACC80097A80A /* LVCTelevisionView.m in Sources */, | 2264 | 81A482F51E88ACC80097A80A /* LVCTelevisionView.m in Sources */, |
| 1996 | D2029CA21E6EADE10027CD92 /* MJRefreshAutoFooter.m in Sources */, | 2265 | D2029CA21E6EADE10027CD92 /* MJRefreshAutoFooter.m in Sources */, |
| 1997 | D2029CC71E6EADE10027CD92 /* SVIndefiniteAnimatedView.m in Sources */, | 2266 | D2029CC71E6EADE10027CD92 /* SVIndefiniteAnimatedView.m in Sources */, |
| 1998 | D2029CA31E6EADE10027CD92 /* MJRefreshBackFooter.m in Sources */, | 2267 | D2029CA31E6EADE10027CD92 /* MJRefreshBackFooter.m in Sources */, |
| 2268 | + 4B45CE7E1EB86A590079AFB7 /* LoginViewController.m in Sources */, | ||
| 1999 | D255300C1E793F8200DF38A5 /* NHFighterView+animDelegagte.m in Sources */, | 2269 | D255300C1E793F8200DF38A5 /* NHFighterView+animDelegagte.m in Sources */, |
| 2000 | 81A4831D1E88E1EB0097A80A /* LVCMoreSortTableViewCell.m in Sources */, | 2270 | 81A4831D1E88E1EB0097A80A /* LVCMoreSortTableViewCell.m in Sources */, |
| 2271 | + 4BD856181EBAD35C0082061D /* NSDictionary+Safety.m in Sources */, | ||
| 2272 | + 4BD856011EBACD530082061D /* AFURLResponseSerialization.m in Sources */, | ||
| 2001 | D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */, | 2273 | D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */, |
| 2002 | D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */, | 2274 | D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */, |
| 2003 | D2029CC41E6EADE10027CD92 /* UIImageView+WebCache.m in Sources */, | 2275 | D2029CC41E6EADE10027CD92 /* UIImageView+WebCache.m in Sources */, |
| 2276 | + 4B45CE801EB86A590079AFB7 /* idAndPwdView.m in Sources */, | ||
| 2004 | D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */, | 2277 | D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */, |
| 2278 | + 4BD8560A1EBACD530082061D /* UIWebView+AFNetworking.m in Sources */, | ||
| 2279 | + 4B45CE831EB86A590079AFB7 /* ZXMineModel.m in Sources */, | ||
| 2280 | + 4B45CE791EB86A590079AFB7 /* MineAboutUsController.m in Sources */, | ||
| 2005 | 81A483081E88B6140097A80A /* UIView+ViewController.m in Sources */, | 2281 | 81A483081E88B6140097A80A /* UIView+ViewController.m in Sources */, |
| 2006 | D2A089EB1E8A09CB0071412C /* LVCUGCLivePlayerModel.m in Sources */, | 2282 | D2A089EB1E8A09CB0071412C /* LVCUGCLivePlayerModel.m in Sources */, |
| 2007 | D2029CC81E6EADE10027CD92 /* SVProgressAnimatedView.m in Sources */, | 2283 | D2029CC81E6EADE10027CD92 /* SVProgressAnimatedView.m in Sources */, |
| 2284 | + 4B45CE891EB86A590079AFB7 /* ZXPersonalImageCell.m in Sources */, | ||
| 2008 | D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */, | 2285 | D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */, |
| 2009 | 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */, | 2286 | 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */, |
| 2010 | D2029C9A1E6EADE10027CD92 /* MJProperty.m in Sources */, | 2287 | D2029C9A1E6EADE10027CD92 /* MJProperty.m in Sources */, |
| 2288 | + 4BD856031EBACD530082061D /* AFNetworkActivityIndicatorManager.m in Sources */, | ||
| 2289 | + 4BD855CD1EBAC4B70082061D /* CNLiveKeychainWrapper.m in Sources */, | ||
| 2011 | D2029CB91E6EADE10027CD92 /* SDWebImageCompat.m in Sources */, | 2290 | D2029CB91E6EADE10027CD92 /* SDWebImageCompat.m in Sources */, |
| 2012 | D2029CB61E6EADE10027CD92 /* MKAnnotationView+WebCache.m in Sources */, | 2291 | D2029CB61E6EADE10027CD92 /* MKAnnotationView+WebCache.m in Sources */, |
| 2292 | + 4BD856121EBAD2640082061D /* ProgramModel.m in Sources */, | ||
| 2013 | D2B2ED801E88FC5200F7538A /* LVCUGCLiveEndView.m in Sources */, | 2293 | D2B2ED801E88FC5200F7538A /* LVCUGCLiveEndView.m in Sources */, |
| 2014 | 810B64FE1E779B1F00133E15 /* MASCompositeConstraint.m in Sources */, | 2294 | 810B64FE1E779B1F00133E15 /* MASCompositeConstraint.m in Sources */, |
| 2015 | 8128E2881E8A6A3600B40E75 /* CNBarrageManager.m in Sources */, | 2295 | 8128E2881E8A6A3600B40E75 /* CNBarrageManager.m in Sources */, |
| @@ -2017,24 +2297,26 @@ | @@ -2017,24 +2297,26 @@ | ||
| 2017 | D2575C671E76A25400E3A8FC /* LVCInteractionController.m in Sources */, | 2297 | D2575C671E76A25400E3A8FC /* LVCInteractionController.m in Sources */, |
| 2018 | D2029CAE1E6EADE10027CD92 /* MJRefreshNormalHeader.m in Sources */, | 2298 | D2029CAE1E6EADE10027CD92 /* MJRefreshNormalHeader.m in Sources */, |
| 2019 | D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */, | 2299 | D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */, |
| 2020 | - D2029C901E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m in Sources */, | 2300 | + 4BD856071EBACD530082061D /* UIImageView+AFNetworking.m in Sources */, |
| 2021 | D2029CC61E6EADE10027CD92 /* SSKeychain.m in Sources */, | 2301 | D2029CC61E6EADE10027CD92 /* SSKeychain.m in Sources */, |
| 2302 | + 4B45CE871EB86A590079AFB7 /* ZXMineCommonCell.m in Sources */, | ||
| 2022 | 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */, | 2303 | 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */, |
| 2023 | - D2029C8B1E6EADE10027CD92 /* AFURLResponseSerialization.m in Sources */, | ||
| 2024 | - D2029C921E6EADE10027CD92 /* UIImageView+AFNetworking.m in Sources */, | 2304 | + 4BD856051EBACD530082061D /* UIAlertView+AFNetworking.m in Sources */, |
| 2025 | D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */, | 2305 | D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */, |
| 2026 | D2029C9E1E6EADE10027CD92 /* NSObject+MJCoding.m in Sources */, | 2306 | D2029C9E1E6EADE10027CD92 /* NSObject+MJCoding.m in Sources */, |
| 2027 | 81A483021E88B0130097A80A /* LVCChatRoomModel.m in Sources */, | 2307 | 81A483021E88B0130097A80A /* LVCChatRoomModel.m in Sources */, |
| 2028 | D2029C991E6EADE10027CD92 /* MJFoundation.m in Sources */, | 2308 | D2029C991E6EADE10027CD92 /* MJFoundation.m in Sources */, |
| 2309 | + 4B45CE8B1EB86A590079AFB7 /* ZXTextField.m in Sources */, | ||
| 2029 | D2575C461E76857100E3A8FC /* LVCAnimationManager.m in Sources */, | 2310 | D2575C461E76857100E3A8FC /* LVCAnimationManager.m in Sources */, |
| 2030 | - D2029C8A1E6EADE10027CD92 /* AFURLRequestSerialization.m in Sources */, | ||
| 2031 | D2A089F11E8A41120071412C /* LVCUGCLiveListModel.m in Sources */, | 2311 | D2A089F11E8A41120071412C /* LVCUGCLiveListModel.m in Sources */, |
| 2032 | D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */, | 2312 | D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */, |
| 2313 | + 4B45CE7C1EB86A590079AFB7 /* MineSettingViewController.m in Sources */, | ||
| 2314 | + 4BD855D11EBAC7220082061D /* DESUtility.m in Sources */, | ||
| 2033 | D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */, | 2315 | D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */, |
| 2034 | - D2029C871E6EADE10027CD92 /* AFHTTPSessionManager.m in Sources */, | ||
| 2035 | 81A482F81E88AFA20097A80A /* LVCFirstHeaderReusableView.m in Sources */, | 2316 | 81A482F81E88AFA20097A80A /* LVCFirstHeaderReusableView.m in Sources */, |
| 2036 | D2029B861E6EAAA50027CD92 /* main.m in Sources */, | 2317 | D2029B861E6EAAA50027CD92 /* main.m in Sources */, |
| 2037 | - D2029C8C1E6EADE10027CD92 /* AFURLSessionManager.m in Sources */, | 2318 | + 4B45CEA71EB86B9F0079AFB7 /* NSObject+UserModel.m in Sources */, |
| 2319 | + 4BD856061EBACD530082061D /* UIButton+AFNetworking.m in Sources */, | ||
| 2038 | D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */, | 2320 | D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */, |
| 2039 | D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */, | 2321 | D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */, |
| 2040 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */, | 2322 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */, |
| @@ -2045,11 +2327,14 @@ | @@ -2045,11 +2327,14 @@ | ||
| 2045 | D2029CAD1E6EADE10027CD92 /* MJRefreshGifHeader.m in Sources */, | 2327 | D2029CAD1E6EADE10027CD92 /* MJRefreshGifHeader.m in Sources */, |
| 2046 | 81A483141E88BA420097A80A /* LVCLiveListCollectionViewCell.m in Sources */, | 2328 | 81A483141E88BA420097A80A /* LVCLiveListCollectionViewCell.m in Sources */, |
| 2047 | D2029CB31E6EADE10027CD92 /* UIScrollView+MJRefresh.m in Sources */, | 2329 | D2029CB31E6EADE10027CD92 /* UIScrollView+MJRefresh.m in Sources */, |
| 2330 | + 4BD856151EBAD31A0082061D /* NSString+UrlEncode.m in Sources */, | ||
| 2331 | + 4B45CE7F1EB86A590079AFB7 /* RegisterCommonController.m in Sources */, | ||
| 2332 | + 4BD855FA1EBACD530082061D /* AFHTTPRequestOperation.m in Sources */, | ||
| 2048 | D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */, | 2333 | D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */, |
| 2049 | D2029CB21E6EADE10027CD92 /* UIScrollView+MJExtension.m in Sources */, | 2334 | D2029CB21E6EADE10027CD92 /* UIScrollView+MJExtension.m in Sources */, |
| 2050 | D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */, | 2335 | D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */, |
| 2051 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */, | 2336 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */, |
| 2052 | - D2029C8E1E6EADE10027CD92 /* AFImageDownloader.m in Sources */, | 2337 | + 4B45CEAB1EB86BFA0079AFB7 /* NSString+ZXExtension.m in Sources */, |
| 2053 | 81A483201E88F4BF0097A80A /* LVCProgramModel.m in Sources */, | 2338 | 81A483201E88F4BF0097A80A /* LVCProgramModel.m in Sources */, |
| 2054 | D2029BCA1E6EADD70027CD92 /* BaseModel.m in Sources */, | 2339 | D2029BCA1E6EADD70027CD92 /* BaseModel.m in Sources */, |
| 2055 | D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */, | 2340 | D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */, |
| @@ -2057,28 +2342,38 @@ | @@ -2057,28 +2342,38 @@ | ||
| 2057 | 81A4830B1E88B7EE0097A80A /* LVCOtherHeaderReusableView.m in Sources */, | 2342 | 81A4830B1E88B7EE0097A80A /* LVCOtherHeaderReusableView.m in Sources */, |
| 2058 | D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */, | 2343 | D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */, |
| 2059 | D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */, | 2344 | D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */, |
| 2345 | + 4BD855FC1EBACD530082061D /* AFHTTPSessionManager.m in Sources */, | ||
| 2346 | + 4B45CE841EB86A590079AFB7 /* ModifyCommonView.m in Sources */, | ||
| 2347 | + 4BD856081EBACD530082061D /* UIProgressView+AFNetworking.m in Sources */, | ||
| 2060 | D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */, | 2348 | D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */, |
| 2061 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */, | 2349 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */, |
| 2062 | D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */, | 2350 | D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */, |
| 2063 | 81A483051E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m in Sources */, | 2351 | 81A483051E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m in Sources */, |
| 2064 | D2029CA81E6EADE10027CD92 /* MJRefreshAutoNormalFooter.m in Sources */, | 2352 | D2029CA81E6EADE10027CD92 /* MJRefreshAutoNormalFooter.m in Sources */, |
| 2065 | - D2029C891E6EADE10027CD92 /* AFSecurityPolicy.m in Sources */, | 2353 | + 4B45CE991EB86A760079AFB7 /* UITextField+createTextField.m in Sources */, |
| 2354 | + 4B45CEA81EB86B9F0079AFB7 /* UserTools.m in Sources */, | ||
| 2066 | D217A24A1E7B76C7003B44CB /* PresentView.m in Sources */, | 2355 | D217A24A1E7B76C7003B44CB /* PresentView.m in Sources */, |
| 2067 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */, | 2356 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */, |
| 2357 | + 4B45CEAE1EB873630079AFB7 /* UserInformationModel.m in Sources */, | ||
| 2068 | D2029CBA1E6EADE10027CD92 /* SDWebImageDecoder.m in Sources */, | 2358 | D2029CBA1E6EADE10027CD92 /* SDWebImageDecoder.m in Sources */, |
| 2069 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */, | 2359 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */, |
| 2360 | + 4B45CE9A1EB86A760079AFB7 /* ZXLabel.m in Sources */, | ||
| 2070 | D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */, | 2361 | D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */, |
| 2071 | D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */, | 2362 | D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */, |
| 2072 | D2029CC21E6EADE10027CD92 /* UIImage+WebP.m in Sources */, | 2363 | D2029CC21E6EADE10027CD92 /* UIImage+WebP.m in Sources */, |
| 2364 | + 4BD856001EBACD530082061D /* AFURLRequestSerialization.m in Sources */, | ||
| 2073 | D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */, | 2365 | D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */, |
| 2074 | 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */, | 2366 | 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */, |
| 2367 | + 4B45CE811EB86A590079AFB7 /* RegistBasicInformationView.m in Sources */, | ||
| 2075 | 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */, | 2368 | 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */, |
| 2076 | D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */, | 2369 | D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */, |
| 2077 | D207BEA11E84C1EC006A0CE8 /* AnimationBaseView.m in Sources */, | 2370 | D207BEA11E84C1EC006A0CE8 /* AnimationBaseView.m in Sources */, |
| 2371 | + 4B45CE971EB86A760079AFB7 /* UIButton+createButton.m in Sources */, | ||
| 2078 | D2029D001E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m in Sources */, | 2372 | D2029D001E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m in Sources */, |
| 2373 | + 4BD856041EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m in Sources */, | ||
| 2374 | + 4B45CE781EB86A590079AFB7 /* JCMineViewController.m in Sources */, | ||
| 2079 | 81CE9E1B1E8CF567000F8F6B /* LVCRequestFailedView.m in Sources */, | 2375 | 81CE9E1B1E8CF567000F8F6B /* LVCRequestFailedView.m in Sources */, |
| 2080 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */, | 2376 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */, |
| 2081 | - D2029C951E6EADE10027CD92 /* UIWebView+AFNetworking.m in Sources */, | ||
| 2082 | 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */, | 2377 | 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */, |
| 2083 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */, | 2378 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */, |
| 2084 | D2029CBD1E6EADE10027CD92 /* SDWebImageManager.m in Sources */, | 2379 | D2029CBD1E6EADE10027CD92 /* SDWebImageManager.m in Sources */, |
| @@ -2092,16 +2387,18 @@ | @@ -2092,16 +2387,18 @@ | ||
| 2092 | D2029C9D1E6EADE10027CD92 /* NSObject+MJClass.m in Sources */, | 2387 | D2029C9D1E6EADE10027CD92 /* NSObject+MJClass.m in Sources */, |
| 2093 | D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */, | 2388 | D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */, |
| 2094 | 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */, | 2389 | 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */, |
| 2095 | - D2029C881E6EADE10027CD92 /* AFNetworkReachabilityManager.m in Sources */, | ||
| 2096 | D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */, | 2390 | D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */, |
| 2097 | D2029D021E6EAE2E0027CD92 /* UIImage+ScaleImageSize.m in Sources */, | 2391 | D2029D021E6EAE2E0027CD92 /* UIImage+ScaleImageSize.m in Sources */, |
| 2098 | D2029BCC1E6EADD70027CD92 /* BaseView.m in Sources */, | 2392 | D2029BCC1E6EADD70027CD92 /* BaseView.m in Sources */, |
| 2099 | D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */, | 2393 | D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */, |
| 2394 | + 4B45CE771EB86A590079AFB7 /* IDViewController.m in Sources */, | ||
| 2395 | + 4BD855FF1EBACD530082061D /* AFURLConnectionOperation.m in Sources */, | ||
| 2100 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */, | 2396 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */, |
| 2101 | D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */, | 2397 | D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */, |
| 2102 | D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */, | 2398 | D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */, |
| 2103 | 81A483171E88BED00097A80A /* LVCTVLiveViewController.m in Sources */, | 2399 | 81A483171E88BED00097A80A /* LVCTVLiveViewController.m in Sources */, |
| 2104 | 81A1B9A91E8277410079FF5F /* LVCInputView.m in Sources */, | 2400 | 81A1B9A91E8277410079FF5F /* LVCInputView.m in Sources */, |
| 2401 | + 4B45CE881EB86A590079AFB7 /* ZXMineShowCell.m in Sources */, | ||
| 2105 | D2029CD41E6EADE70027CD92 /* HttpService.m in Sources */, | 2402 | D2029CD41E6EADE70027CD92 /* HttpService.m in Sources */, |
| 2106 | ); | 2403 | ); |
| 2107 | runOnlyForDeploymentPostprocessing = 0; | 2404 | runOnlyForDeploymentPostprocessing = 0; |
| @@ -2245,10 +2542,11 @@ | @@ -2245,10 +2542,11 @@ | ||
| 2245 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 2542 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 2246 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 2543 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
| 2247 | CLANG_ENABLE_OBJC_WEAK = YES; | 2544 | CLANG_ENABLE_OBJC_WEAK = YES; |
| 2248 | - DEVELOPMENT_TEAM = 94X49GG3ZW; | 2545 | + DEVELOPMENT_TEAM = ""; |
| 2249 | FRAMEWORK_SEARCH_PATHS = ( | 2546 | FRAMEWORK_SEARCH_PATHS = ( |
| 2250 | "$(inherited)", | 2547 | "$(inherited)", |
| 2251 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/CNLiveSDK", | 2548 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/CNLiveSDK", |
| 2549 | + "$(PROJECT_DIR)", | ||
| 2252 | ); | 2550 | ); |
| 2253 | GCC_PREFIX_HEADER = "$(SRCROOT)/LiveVideoCloud/PrefixHeader.pch"; | 2551 | GCC_PREFIX_HEADER = "$(SRCROOT)/LiveVideoCloud/PrefixHeader.pch"; |
| 2254 | INFOPLIST_FILE = LiveVideoCloud/Info.plist; | 2552 | INFOPLIST_FILE = LiveVideoCloud/Info.plist; |
| @@ -2259,7 +2557,7 @@ | @@ -2259,7 +2557,7 @@ | ||
| 2259 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource", | 2557 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource", |
| 2260 | ); | 2558 | ); |
| 2261 | OTHER_LDFLAGS = ""; | 2559 | OTHER_LDFLAGS = ""; |
| 2262 | - PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.shixunyun; | 2560 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.shipinzhongguo; |
| 2263 | PRODUCT_NAME = "$(TARGET_NAME)"; | 2561 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 2264 | }; | 2562 | }; |
| 2265 | name = Debug; | 2563 | name = Debug; |
| @@ -2270,10 +2568,11 @@ | @@ -2270,10 +2568,11 @@ | ||
| 2270 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 2568 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 2271 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 2569 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
| 2272 | CLANG_ENABLE_OBJC_WEAK = YES; | 2570 | CLANG_ENABLE_OBJC_WEAK = YES; |
| 2273 | - DEVELOPMENT_TEAM = 94X49GG3ZW; | 2571 | + DEVELOPMENT_TEAM = ""; |
| 2274 | FRAMEWORK_SEARCH_PATHS = ( | 2572 | FRAMEWORK_SEARCH_PATHS = ( |
| 2275 | "$(inherited)", | 2573 | "$(inherited)", |
| 2276 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/CNLiveSDK", | 2574 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/CNLiveSDK", |
| 2575 | + "$(PROJECT_DIR)", | ||
| 2277 | ); | 2576 | ); |
| 2278 | GCC_PREFIX_HEADER = "$(SRCROOT)/LiveVideoCloud/PrefixHeader.pch"; | 2577 | GCC_PREFIX_HEADER = "$(SRCROOT)/LiveVideoCloud/PrefixHeader.pch"; |
| 2279 | INFOPLIST_FILE = LiveVideoCloud/Info.plist; | 2578 | INFOPLIST_FILE = LiveVideoCloud/Info.plist; |
| @@ -2284,7 +2583,7 @@ | @@ -2284,7 +2583,7 @@ | ||
| 2284 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource", | 2583 | "$(PROJECT_DIR)/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource", |
| 2285 | ); | 2584 | ); |
| 2286 | OTHER_LDFLAGS = ""; | 2585 | OTHER_LDFLAGS = ""; |
| 2287 | - PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.shixunyun; | 2586 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.shipinzhongguo; |
| 2288 | PRODUCT_NAME = "$(TARGET_NAME)"; | 2587 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 2289 | }; | 2588 | }; |
| 2290 | name = Release; | 2589 | name = Release; |
LiveVideoCloud/LiveVideoCloud/AppCustoms/Base/BaseViewController.m
| @@ -57,14 +57,18 @@ | @@ -57,14 +57,18 @@ | ||
| 57 | [_btnLeft setFrame:CGRectMake(0, 0, 30, 30)]; | 57 | [_btnLeft setFrame:CGRectMake(0, 0, 30, 30)]; |
| 58 | [_btnLeft addTarget:self action:@selector(onBackAction) forControlEvents:UIControlEventTouchUpInside]; | 58 | [_btnLeft addTarget:self action:@selector(onBackAction) forControlEvents:UIControlEventTouchUpInside]; |
| 59 | 59 | ||
| 60 | - [_btnLeft setBackgroundImage:[UIImage imageNamed:@"返回按钮"] forState:UIControlStateNormal]; | ||
| 61 | - [_btnLeft setBackgroundImage:[UIImage imageNamed:@"返回按钮_p"] forState:UIControlStateHighlighted]; | 60 | + [_btnLeft setBackgroundImage:[UIImage imageNamed:@"fanhui_default"] forState:UIControlStateNormal]; |
| 61 | + [_btnLeft setBackgroundImage:[UIImage imageNamed:@"fanhui_focused"] forState:UIControlStateHighlighted]; | ||
| 62 | _btnLeft.highlighted = NO; | 62 | _btnLeft.highlighted = NO; |
| 63 | UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:_btnLeft]; | 63 | UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:_btnLeft]; |
| 64 | 64 | ||
| 65 | UIBarButtonItem * negativeSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; | 65 | UIBarButtonItem * negativeSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; |
| 66 | negativeSpacer.width = -8;//默认leftItemX == 18,要求距左边10 | 66 | negativeSpacer.width = -8;//默认leftItemX == 18,要求距左边10 |
| 67 | [self.navigationItem setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer,backItem, nil]]; | 67 | [self.navigationItem setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer,backItem, nil]]; |
| 68 | + | ||
| 69 | + if (self.navigationController.viewControllers[0] == self) { | ||
| 70 | + _btnLeft.hidden = YES; | ||
| 71 | + } | ||
| 68 | } | 72 | } |
| 69 | 73 | ||
| 70 | /** | 74 | /** |
LiveVideoCloud/LiveVideoCloud/AppCustoms/Main/ZXNavigationController.m
| @@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
| 23 | self.interactivePopGestureRecognizer.enabled = YES; | 23 | self.interactivePopGestureRecognizer.enabled = YES; |
| 24 | 24 | ||
| 25 | [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]]; | 25 | [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]]; |
| 26 | + | ||
| 26 | } | 27 | } |
| 27 | 28 | ||
| 28 | /** | 29 | /** |
LiveVideoCloud/LiveVideoCloud/AppCustoms/Main/ZXTabBarController.m
| @@ -13,6 +13,8 @@ | @@ -13,6 +13,8 @@ | ||
| 13 | #import "LVCMyViewController.h" | 13 | #import "LVCMyViewController.h" |
| 14 | #import "LVCTabBar.h" | 14 | #import "LVCTabBar.h" |
| 15 | 15 | ||
| 16 | +#import "JCMineViewController.h" | ||
| 17 | + | ||
| 16 | @interface ZXTabBarController ()<LVCTabBarDelegate> | 18 | @interface ZXTabBarController ()<LVCTabBarDelegate> |
| 17 | 19 | ||
| 18 | @end | 20 | @end |
| @@ -49,7 +51,8 @@ | @@ -49,7 +51,8 @@ | ||
| 49 | - (void)createUI | 51 | - (void)createUI |
| 50 | { | 52 | { |
| 51 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[HomeViewController alloc]init]] title:@"" image:@"home page" selectedImage:@"home page-click on"]; | 53 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[HomeViewController alloc]init]] title:@"" image:@"home page" selectedImage:@"home page-click on"]; |
| 52 | - [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCMyViewController alloc]init]] title:@"" image:@"my" selectedImage:@"my-click on"]; | 54 | +// [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCMyViewController alloc]init]] title:@"" image:@"my" selectedImage:@"my-click on"]; |
| 55 | + [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[JCMineViewController alloc]init]] title:@"" image:@"my" selectedImage:@"my-click on"]; | ||
| 53 | } | 56 | } |
| 54 | 57 | ||
| 55 | - (void)setupOneChildViewController:(UIViewController *)vc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage | 58 | - (void)setupOneChildViewController:(UIViewController *)vc title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage |
LiveVideoCloud/LiveVideoCloud/AppDelegate/AppDelegate.m
| @@ -26,10 +26,12 @@ | @@ -26,10 +26,12 @@ | ||
| 26 | self.window.rootViewController = [[ZXTabBarController alloc] init]; | 26 | self.window.rootViewController = [[ZXTabBarController alloc] init]; |
| 27 | 27 | ||
| 28 | //初始化直播SDK | 28 | //初始化直播SDK |
| 29 | - [[CNLiveWebcastManager manager] initWithAppId:AppId appKey:AppKey]; | 29 | + [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey]; |
| 30 | 30 | ||
| 31 | //初始化聊天SDK并连接服务器 | 31 | //初始化聊天SDK并连接服务器 |
| 32 | - [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:AppKey appId:AppId]; | 32 | + [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId]; |
| 33 | + | ||
| 34 | + [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret]; | ||
| 33 | 35 | ||
| 34 | /* | 36 | /* |
| 35 | [[CNLiveChatManager sharedCNLiveChatManager] connectServerSuccess:^{ | 37 | [[CNLiveChatManager sharedCNLiveChatManager] connectServerSuccess:^{ |
LiveVideoCloud/LiveVideoCloud/Classes/Helpers/Tools.h
| @@ -7,10 +7,20 @@ | @@ -7,10 +7,20 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import "MBProgressHUD.h" | ||
| 10 | 11 | ||
| 11 | @class userInfoModel; | 12 | @class userInfoModel; |
| 12 | 13 | ||
| 13 | @interface Tools : NSObject | 14 | @interface Tools : NSObject |
| 15 | +typedef enum { | ||
| 16 | + | ||
| 17 | + SeparatorColorWhite = 0, //背景为白色 | ||
| 18 | + SeparatorColorBlack = 1, //背景为黑色 | ||
| 19 | + SeparatorColorBlackTranslucent = 2, //背景为黑色半透明 | ||
| 20 | + SeparatorColorGray = 3, | ||
| 21 | + SeparatorTableViewCell = 4 | ||
| 22 | + | ||
| 23 | +} SeparatorColorType; //分割线颜色 | ||
| 14 | 24 | ||
| 15 | 25 | ||
| 16 | typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 | 26 | typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 |
| @@ -18,6 +28,11 @@ typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 | @@ -18,6 +28,11 @@ typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 | ||
| 18 | ShowMessageTypeBlack ,//半透明背景 | 28 | ShowMessageTypeBlack ,//半透明背景 |
| 19 | }; | 29 | }; |
| 20 | 30 | ||
| 31 | + | ||
| 32 | ++ (nullable MBProgressHUD *)showHUDInView:(nullable UIView *)view withString:(nullable NSString *)string autoHide:(BOOL)hide; | ||
| 33 | + | ||
| 34 | ++ (nullable MBProgressHUD *)showActivityHudInView:(nullable UIView *)view withString:(nullable NSString *)string; | ||
| 35 | + | ||
| 21 | /** | 36 | /** |
| 22 | 弹出页 | 37 | 弹出页 |
| 23 | 38 | ||
| @@ -33,5 +48,26 @@ typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 | @@ -33,5 +48,26 @@ typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 | ||
| 33 | 48 | ||
| 34 | + (NSDictionary *_Nullable)dictionaryWithJsonString:(NSString *_Nullable)jsonString; | 49 | + (NSDictionary *_Nullable)dictionaryWithJsonString:(NSString *_Nullable)jsonString; |
| 35 | 50 | ||
| 51 | ++ (nullable UIImage *)getImageFromColor:(nullable UIColor *)color; | ||
| 52 | + | ||
| 53 | + | ||
| 54 | ++ (BOOL)isArray:(nullable NSArray *)array; | ||
| 55 | + | ||
| 56 | ++ (BOOL)isDictionary:(nullable NSDictionary *)dic; | ||
| 57 | + | ||
| 58 | ++ (BOOL)isEmptyString:(nullable NSString *)string; | ||
| 59 | + | ||
| 60 | ++ (BOOL)isValidMobileNum:(nullable NSString *)number; | ||
| 61 | + | ||
| 62 | ++ (nullable NSString *)timestamp; | ||
| 63 | + | ||
| 64 | ++ (nullable UIView *)addLineToView:(nullable UIView *)view separatorColorType:(SeparatorColorType)type lineFrame:(CGRect)frame; | ||
| 65 | + | ||
| 66 | +#pragma mark 正则表达式验证手机号 | ||
| 67 | ++ (BOOL)isMobileNumber:( NSString * _Nullable )mobileNum; | ||
| 68 | + | ||
| 69 | + | ||
| 70 | ++ (nullable NSString *)stringByDictionary:(nullable NSDictionary *)dic; | ||
| 36 | 71 | ||
| 72 | ++ (NSString *_Nonnull)uuid; | ||
| 37 | @end | 73 | @end |
LiveVideoCloud/LiveVideoCloud/Classes/Helpers/Tools.m
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | #import "Tools.h" | 9 | #import "Tools.h" |
| 10 | #import "BounceView.h" | 10 | #import "BounceView.h" |
| 11 | #import "userInfoModel.h" | 11 | #import "userInfoModel.h" |
| 12 | +#import "CNLiveKeychainWrapper.h" | ||
| 12 | 13 | ||
| 13 | @interface Tools () | 14 | @interface Tools () |
| 14 | 15 | ||
| @@ -17,6 +18,31 @@ | @@ -17,6 +18,31 @@ | ||
| 17 | 18 | ||
| 18 | @implementation Tools | 19 | @implementation Tools |
| 19 | 20 | ||
| 21 | + | ||
| 22 | + | ||
| 23 | ++ (nullable MBProgressHUD *)showHUDInView:(nullable UIView *)view withString:(nullable NSString *)string autoHide:(BOOL)hide | ||
| 24 | +{ | ||
| 25 | + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; | ||
| 26 | + hud.mode = MBProgressHUDModeText; | ||
| 27 | + hud.detailsLabelText = string; | ||
| 28 | + hud.detailsLabelFont = [UIFont systemFontOfSize:13]; | ||
| 29 | + hud.margin = 10.f; | ||
| 30 | + hud.removeFromSuperViewOnHide = YES; | ||
| 31 | + if (hide) { | ||
| 32 | + [hud hide:NO afterDelay:2.5]; | ||
| 33 | + } | ||
| 34 | + return hud; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | + | ||
| 38 | ++ (nullable MBProgressHUD *)showActivityHudInView:(nullable UIView *)view withString:(nullable NSString *)string | ||
| 39 | +{ | ||
| 40 | + MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; | ||
| 41 | + hud.labelText = string; | ||
| 42 | + hud.removeFromSuperViewOnHide = YES; | ||
| 43 | + return hud; | ||
| 44 | +} | ||
| 45 | + | ||
| 20 | /** | 46 | /** |
| 21 | 弹出页 | 47 | 弹出页 |
| 22 | 48 | ||
| @@ -145,5 +171,145 @@ | @@ -145,5 +171,145 @@ | ||
| 145 | return dic; | 171 | return dic; |
| 146 | } | 172 | } |
| 147 | 173 | ||
| 174 | ++ (nullable UIImage *)getImageFromColor:(nullable UIColor *)color | ||
| 175 | +{ | ||
| 176 | + CGRect rect = CGRectMake(0, 0, 1, 1); | ||
| 177 | + UIGraphicsBeginImageContext(rect.size); | ||
| 178 | + CGContextRef context = UIGraphicsGetCurrentContext(); | ||
| 179 | + CGContextSetFillColorWithColor(context, [color CGColor]); | ||
| 180 | + CGContextFillRect(context, rect); | ||
| 181 | + UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); | ||
| 182 | + UIGraphicsEndImageContext(); | ||
| 183 | + return img; | ||
| 184 | +} | ||
| 185 | + | ||
| 186 | + | ||
| 187 | ++ (BOOL)isArray:(NSArray *)array | ||
| 188 | +{ | ||
| 189 | + if (array && [array isKindOfClass:[NSArray class]] && [array count]>0) { | ||
| 190 | + return YES; | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + return NO; | ||
| 194 | +} | ||
| 195 | + | ||
| 196 | ++ (BOOL)isDictionary:(NSDictionary *)dic | ||
| 197 | +{ | ||
| 198 | + if (dic && [dic isKindOfClass:[NSDictionary class]] && [dic count]>0) { | ||
| 199 | + return YES; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + return NO; | ||
| 203 | +} | ||
| 204 | + | ||
| 205 | ++ (BOOL)isEmptyString:(NSString *)string | ||
| 206 | +{ | ||
| 207 | + if (!string || ![string isKindOfClass:[NSString class]] || string.length == 0 || [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length == 0) { | ||
| 208 | + return YES; | ||
| 209 | + } | ||
| 210 | + return NO; | ||
| 211 | +} | ||
| 212 | + | ||
| 213 | ++ (BOOL)isValidMobileNum:(nullable NSString *)number { | ||
| 214 | + | ||
| 215 | + NSString *validMobileNum = @"^1(3[0-9]|4[5-7]|5[0-35-9]|7[0-9]|8[0-9])+[0-9]{8}"; | ||
| 216 | + NSPredicate *regexTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", validMobileNum]; | ||
| 217 | + return [regexTest evaluateWithObject:number]; | ||
| 218 | +} | ||
| 219 | + | ||
| 220 | ++ (NSString *)timestamp { | ||
| 221 | + | ||
| 222 | + NSString *stamp = @""; | ||
| 223 | + | ||
| 224 | + stamp = [NSString stringWithFormat:@"%.3f", [[NSDate date] timeIntervalSince1970]]; | ||
| 225 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | ||
| 226 | + | ||
| 227 | + return stamp; | ||
| 228 | +} | ||
| 229 | + | ||
| 230 | ++ (nullable UIView *)addLineToView:(nullable UIView *)view separatorColorType:(SeparatorColorType)type lineFrame:(CGRect)frame | ||
| 231 | +{ | ||
| 232 | + UIView *line = [[UIView alloc] initWithFrame:frame]; | ||
| 233 | + switch (type) { | ||
| 234 | + case SeparatorColorWhite: | ||
| 235 | + line.backgroundColor = [UIColor colorWithHexString:@"#eeeeee"]; | ||
| 236 | + break; | ||
| 237 | + case SeparatorColorBlack: | ||
| 238 | + | ||
| 239 | + break; | ||
| 240 | + case SeparatorColorBlackTranslucent: | ||
| 241 | + | ||
| 242 | + break; | ||
| 243 | + case SeparatorColorGray: | ||
| 244 | + line.backgroundColor = [UIColor colorWithHexString:@"#dcdcdc"]; | ||
| 245 | + break; | ||
| 246 | + case SeparatorTableViewCell: | ||
| 247 | + line.backgroundColor = [UIColor colorWithHexString:@"#cfcfd0"]; | ||
| 248 | + break; | ||
| 249 | + | ||
| 250 | + default: | ||
| 251 | + break; | ||
| 252 | + } | ||
| 253 | + [view addSubview:line]; | ||
| 254 | + return line; | ||
| 255 | +} | ||
| 256 | + | ||
| 257 | +#pragma mark 正则表达式验证手机号 | ||
| 258 | ++ (BOOL)isMobileNumber:(NSString *)mobileNum | ||
| 259 | +{ | ||
| 260 | + // NSString * MOBILE = @"^0?(13[0-9]|15[012356789]|18[02356789]|14[57])[0-9]{8}$"; | ||
| 261 | + NSString * MOBILE = @"^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8]))[0-9]{8}$"; | ||
| 262 | + NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", MOBILE]; | ||
| 263 | + | ||
| 264 | + if ([regextestmobile evaluateWithObject:mobileNum]) | ||
| 265 | + { | ||
| 266 | + return YES; | ||
| 267 | + } | ||
| 268 | + else | ||
| 269 | + { | ||
| 270 | + return NO; | ||
| 271 | + } | ||
| 272 | + | ||
| 273 | +} | ||
| 274 | + | ||
| 275 | ++ (UIView *)addLineToView:(UIView *)view separatorColorHex:(NSString *)hex lineFrame:(CGRect)frame | ||
| 276 | +{ | ||
| 277 | + UIView *line = [[UIView alloc] initWithFrame:frame]; | ||
| 278 | + line.backgroundColor = [UIColor colorWithHexString:hex]; | ||
| 279 | + [view addSubview:line]; | ||
| 280 | + return line; | ||
| 281 | +} | ||
| 282 | + | ||
| 283 | + | ||
| 284 | ++ (nullable NSString *)stringByDictionary:(nullable NSDictionary *)dic | ||
| 285 | +{ | ||
| 286 | + if (![Tools isDictionary:dic]) { | ||
| 287 | + return nil; | ||
| 288 | + } | ||
| 289 | + NSMutableString *string = [[NSMutableString alloc] init]; | ||
| 290 | + for (NSString *key in dic) { | ||
| 291 | + [string appendFormat:@"%@=%@&", key, [dic objectForKey:key]]; | ||
| 292 | + } | ||
| 293 | + | ||
| 294 | + [string deleteCharactersInRange:NSMakeRange(string.length-1, 1)]; | ||
| 295 | + return string; | ||
| 296 | +} | ||
| 297 | + | ||
| 298 | ++ (NSString *)uuid { | ||
| 299 | + | ||
| 300 | + NSString *uuid = [CNLiveKeychainWrapper load:@"idfv_stat"]; | ||
| 301 | + | ||
| 302 | + if (!uuid) { | ||
| 303 | + | ||
| 304 | + NSString *idfv = [[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; | ||
| 305 | + | ||
| 306 | + [CNLiveKeychainWrapper save:@"idfv_stat" data:idfv]; | ||
| 307 | + | ||
| 308 | + return idfv; | ||
| 309 | + } | ||
| 310 | + | ||
| 311 | + | ||
| 312 | + return uuid; | ||
| 313 | +} | ||
| 148 | 314 | ||
| 149 | @end | 315 | @end |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFHTTPSessionManager.h
| 1 | // AFHTTPSessionManager.h | 1 | // AFHTTPSessionManager.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -20,12 +20,10 @@ | @@ -20,12 +20,10 @@ | ||
| 20 | // THE SOFTWARE. | 20 | // THE SOFTWARE. |
| 21 | 21 | ||
| 22 | #import <Foundation/Foundation.h> | 22 | #import <Foundation/Foundation.h> |
| 23 | -#if !TARGET_OS_WATCH | ||
| 24 | #import <SystemConfiguration/SystemConfiguration.h> | 23 | #import <SystemConfiguration/SystemConfiguration.h> |
| 25 | -#endif | ||
| 26 | -#import <TargetConditionals.h> | 24 | +#import <Availability.h> |
| 27 | 25 | ||
| 28 | -#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV | 26 | +#if __IPHONE_OS_VERSION_MIN_REQUIRED |
| 29 | #import <MobileCoreServices/MobileCoreServices.h> | 27 | #import <MobileCoreServices/MobileCoreServices.h> |
| 30 | #else | 28 | #else |
| 31 | #import <CoreServices/CoreServices.h> | 29 | #import <CoreServices/CoreServices.h> |
| @@ -33,6 +31,14 @@ | @@ -33,6 +31,14 @@ | ||
| 33 | 31 | ||
| 34 | #import "AFURLSessionManager.h" | 32 | #import "AFURLSessionManager.h" |
| 35 | 33 | ||
| 34 | +#ifndef NS_DESIGNATED_INITIALIZER | ||
| 35 | +#if __has_attribute(objc_designated_initializer) | ||
| 36 | +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 37 | +#else | ||
| 38 | +#define NS_DESIGNATED_INITIALIZER | ||
| 39 | +#endif | ||
| 40 | +#endif | ||
| 41 | + | ||
| 36 | /** | 42 | /** |
| 37 | `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. | 43 | `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. |
| 38 | 44 | ||
| @@ -44,7 +50,7 @@ | @@ -44,7 +50,7 @@ | ||
| 44 | 50 | ||
| 45 | ## Methods to Override | 51 | ## Methods to Override |
| 46 | 52 | ||
| 47 | - To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:`. | 53 | + To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`. |
| 48 | 54 | ||
| 49 | ## Serialization | 55 | ## Serialization |
| 50 | 56 | ||
| @@ -71,14 +77,14 @@ | @@ -71,14 +77,14 @@ | ||
| 71 | @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. | 77 | @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. |
| 72 | */ | 78 | */ |
| 73 | 79 | ||
| 74 | -NS_ASSUME_NONNULL_BEGIN | 80 | +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) |
| 75 | 81 | ||
| 76 | @interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying> | 82 | @interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying> |
| 77 | 83 | ||
| 78 | /** | 84 | /** |
| 79 | - The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. | 85 | + The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. |
| 80 | */ | 86 | */ |
| 81 | -@property (readonly, nonatomic, strong, nullable) NSURL *baseURL; | 87 | +@property (readonly, nonatomic, strong) NSURL *baseURL; |
| 82 | 88 | ||
| 83 | /** | 89 | /** |
| 84 | Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. | 90 | Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. |
| @@ -94,15 +100,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -94,15 +100,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 94 | */ | 100 | */ |
| 95 | @property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer; | 101 | @property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer; |
| 96 | 102 | ||
| 97 | -///------------------------------- | ||
| 98 | -/// @name Managing Security Policy | ||
| 99 | -///------------------------------- | ||
| 100 | - | ||
| 101 | -/** | ||
| 102 | - The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. A security policy configured with `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate` can only be applied on a session manager initialized with a secure base URL (i.e. https). Applying a security policy with pinning enabled on an insecure session manager throws an `Invalid Security Policy` exception. | ||
| 103 | - */ | ||
| 104 | -@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; | ||
| 105 | - | ||
| 106 | ///--------------------- | 103 | ///--------------------- |
| 107 | /// @name Initialization | 104 | /// @name Initialization |
| 108 | ///--------------------- | 105 | ///--------------------- |
| @@ -119,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -119,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 119 | 116 | ||
| 120 | @return The newly-initialized HTTP client | 117 | @return The newly-initialized HTTP client |
| 121 | */ | 118 | */ |
| 122 | -- (instancetype)initWithBaseURL:(nullable NSURL *)url; | 119 | +- (instancetype)initWithBaseURL:(NSURL *)url; |
| 123 | 120 | ||
| 124 | /** | 121 | /** |
| 125 | Initializes an `AFHTTPSessionManager` object with the specified base URL. | 122 | Initializes an `AFHTTPSessionManager` object with the specified base URL. |
| @@ -131,8 +128,8 @@ NS_ASSUME_NONNULL_BEGIN | @@ -131,8 +128,8 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 131 | 128 | ||
| 132 | @return The newly-initialized HTTP client | 129 | @return The newly-initialized HTTP client |
| 133 | */ | 130 | */ |
| 134 | -- (instancetype)initWithBaseURL:(nullable NSURL *)url | ||
| 135 | - sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; | 131 | +- (instancetype)initWithBaseURL:(NSURL *)url |
| 132 | + sessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; | ||
| 136 | 133 | ||
| 137 | ///--------------------------- | 134 | ///--------------------------- |
| 138 | /// @name Making HTTP Requests | 135 | /// @name Making HTTP Requests |
| @@ -148,28 +145,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -148,28 +145,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 148 | 145 | ||
| 149 | @see -dataTaskWithRequest:completionHandler: | 146 | @see -dataTaskWithRequest:completionHandler: |
| 150 | */ | 147 | */ |
| 151 | -- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString | ||
| 152 | - parameters:(nullable id)parameters | ||
| 153 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 154 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; | ||
| 155 | - | ||
| 156 | - | ||
| 157 | -/** | ||
| 158 | - Creates and runs an `NSURLSessionDataTask` with a `GET` request. | ||
| 159 | - | ||
| 160 | - @param URLString The URL string used to create the request URL. | ||
| 161 | - @param parameters The parameters to be encoded according to the client request serializer. | ||
| 162 | - @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. | ||
| 163 | - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. | ||
| 164 | - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. | ||
| 165 | - | ||
| 166 | - @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: | ||
| 167 | - */ | ||
| 168 | -- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString | ||
| 169 | - parameters:(nullable id)parameters | ||
| 170 | - progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress | ||
| 171 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 172 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 148 | +- (NSURLSessionDataTask *)GET:(NSString *)URLString |
| 149 | + parameters:(id)parameters | ||
| 150 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 151 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 173 | 152 | ||
| 174 | /** | 153 | /** |
| 175 | Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. | 154 | Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. |
| @@ -181,10 +160,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -181,10 +160,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 181 | 160 | ||
| 182 | @see -dataTaskWithRequest:completionHandler: | 161 | @see -dataTaskWithRequest:completionHandler: |
| 183 | */ | 162 | */ |
| 184 | -- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString | ||
| 185 | - parameters:(nullable id)parameters | ||
| 186 | - success:(nullable void (^)(NSURLSessionDataTask *task))success | ||
| 187 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 163 | +- (NSURLSessionDataTask *)HEAD:(NSString *)URLString |
| 164 | + parameters:(id)parameters | ||
| 165 | + success:(void (^)(NSURLSessionDataTask *task))success | ||
| 166 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 188 | 167 | ||
| 189 | /** | 168 | /** |
| 190 | Creates and runs an `NSURLSessionDataTask` with a `POST` request. | 169 | Creates and runs an `NSURLSessionDataTask` with a `POST` request. |
| @@ -196,27 +175,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -196,27 +175,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 196 | 175 | ||
| 197 | @see -dataTaskWithRequest:completionHandler: | 176 | @see -dataTaskWithRequest:completionHandler: |
| 198 | */ | 177 | */ |
| 199 | -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 200 | - parameters:(nullable id)parameters | ||
| 201 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 202 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; | ||
| 203 | - | ||
| 204 | -/** | ||
| 205 | - Creates and runs an `NSURLSessionDataTask` with a `POST` request. | ||
| 206 | - | ||
| 207 | - @param URLString The URL string used to create the request URL. | ||
| 208 | - @param parameters The parameters to be encoded according to the client request serializer. | ||
| 209 | - @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | ||
| 210 | - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. | ||
| 211 | - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. | ||
| 212 | - | ||
| 213 | - @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: | ||
| 214 | - */ | ||
| 215 | -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 216 | - parameters:(nullable id)parameters | ||
| 217 | - progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress | ||
| 218 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 219 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 178 | +- (NSURLSessionDataTask *)POST:(NSString *)URLString |
| 179 | + parameters:(id)parameters | ||
| 180 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 181 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 220 | 182 | ||
| 221 | /** | 183 | /** |
| 222 | Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. | 184 | Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. |
| @@ -229,30 +191,11 @@ NS_ASSUME_NONNULL_BEGIN | @@ -229,30 +191,11 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 229 | 191 | ||
| 230 | @see -dataTaskWithRequest:completionHandler: | 192 | @see -dataTaskWithRequest:completionHandler: |
| 231 | */ | 193 | */ |
| 232 | -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 233 | - parameters:(nullable id)parameters | ||
| 234 | - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block | ||
| 235 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 236 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE; | ||
| 237 | - | ||
| 238 | -/** | ||
| 239 | - Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. | ||
| 240 | - | ||
| 241 | - @param URLString The URL string used to create the request URL. | ||
| 242 | - @param parameters The parameters to be encoded according to the client request serializer. | ||
| 243 | - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. | ||
| 244 | - @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | ||
| 245 | - @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. | ||
| 246 | - @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. | ||
| 247 | - | ||
| 248 | - @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: | ||
| 249 | - */ | ||
| 250 | -- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 251 | - parameters:(nullable id)parameters | ||
| 252 | - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block | ||
| 253 | - progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress | ||
| 254 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 255 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 194 | +- (NSURLSessionDataTask *)POST:(NSString *)URLString |
| 195 | + parameters:(id)parameters | ||
| 196 | + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block | ||
| 197 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 198 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 256 | 199 | ||
| 257 | /** | 200 | /** |
| 258 | Creates and runs an `NSURLSessionDataTask` with a `PUT` request. | 201 | Creates and runs an `NSURLSessionDataTask` with a `PUT` request. |
| @@ -264,10 +207,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -264,10 +207,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 264 | 207 | ||
| 265 | @see -dataTaskWithRequest:completionHandler: | 208 | @see -dataTaskWithRequest:completionHandler: |
| 266 | */ | 209 | */ |
| 267 | -- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString | ||
| 268 | - parameters:(nullable id)parameters | ||
| 269 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 270 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 210 | +- (NSURLSessionDataTask *)PUT:(NSString *)URLString |
| 211 | + parameters:(id)parameters | ||
| 212 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 213 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 271 | 214 | ||
| 272 | /** | 215 | /** |
| 273 | Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. | 216 | Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. |
| @@ -279,10 +222,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -279,10 +222,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 279 | 222 | ||
| 280 | @see -dataTaskWithRequest:completionHandler: | 223 | @see -dataTaskWithRequest:completionHandler: |
| 281 | */ | 224 | */ |
| 282 | -- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString | ||
| 283 | - parameters:(nullable id)parameters | ||
| 284 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 285 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 225 | +- (NSURLSessionDataTask *)PATCH:(NSString *)URLString |
| 226 | + parameters:(id)parameters | ||
| 227 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 228 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 286 | 229 | ||
| 287 | /** | 230 | /** |
| 288 | Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. | 231 | Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. |
| @@ -294,11 +237,11 @@ NS_ASSUME_NONNULL_BEGIN | @@ -294,11 +237,11 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 294 | 237 | ||
| 295 | @see -dataTaskWithRequest:completionHandler: | 238 | @see -dataTaskWithRequest:completionHandler: |
| 296 | */ | 239 | */ |
| 297 | -- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString | ||
| 298 | - parameters:(nullable id)parameters | ||
| 299 | - success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success | ||
| 300 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; | 240 | +- (NSURLSessionDataTask *)DELETE:(NSString *)URLString |
| 241 | + parameters:(id)parameters | ||
| 242 | + success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
| 243 | + failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
| 301 | 244 | ||
| 302 | @end | 245 | @end |
| 303 | 246 | ||
| 304 | -NS_ASSUME_NONNULL_END | 247 | +#endif |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFHTTPSessionManager.m
| 1 | // AFHTTPSessionManager.m | 1 | // AFHTTPSessionManager.m |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -21,23 +21,24 @@ | @@ -21,23 +21,24 @@ | ||
| 21 | 21 | ||
| 22 | #import "AFHTTPSessionManager.h" | 22 | #import "AFHTTPSessionManager.h" |
| 23 | 23 | ||
| 24 | +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) | ||
| 25 | + | ||
| 24 | #import "AFURLRequestSerialization.h" | 26 | #import "AFURLRequestSerialization.h" |
| 25 | #import "AFURLResponseSerialization.h" | 27 | #import "AFURLResponseSerialization.h" |
| 26 | 28 | ||
| 27 | #import <Availability.h> | 29 | #import <Availability.h> |
| 28 | -#import <TargetConditionals.h> | ||
| 29 | #import <Security/Security.h> | 30 | #import <Security/Security.h> |
| 30 | 31 | ||
| 32 | +#ifdef _SYSTEMCONFIGURATION_H | ||
| 31 | #import <netinet/in.h> | 33 | #import <netinet/in.h> |
| 32 | #import <netinet6/in6.h> | 34 | #import <netinet6/in6.h> |
| 33 | #import <arpa/inet.h> | 35 | #import <arpa/inet.h> |
| 34 | #import <ifaddrs.h> | 36 | #import <ifaddrs.h> |
| 35 | #import <netdb.h> | 37 | #import <netdb.h> |
| 38 | +#endif | ||
| 36 | 39 | ||
| 37 | -#if TARGET_OS_IOS || TARGET_OS_TV | 40 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 38 | #import <UIKit/UIKit.h> | 41 | #import <UIKit/UIKit.h> |
| 39 | -#elif TARGET_OS_WATCH | ||
| 40 | -#import <WatchKit/WatchKit.h> | ||
| 41 | #endif | 42 | #endif |
| 42 | 43 | ||
| 43 | @interface AFHTTPSessionManager () | 44 | @interface AFHTTPSessionManager () |
| @@ -86,6 +87,9 @@ | @@ -86,6 +87,9 @@ | ||
| 86 | 87 | ||
| 87 | #pragma mark - | 88 | #pragma mark - |
| 88 | 89 | ||
| 90 | +#ifdef _SYSTEMCONFIGURATION_H | ||
| 91 | +#endif | ||
| 92 | + | ||
| 89 | - (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer { | 93 | - (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer { |
| 90 | NSParameterAssert(requestSerializer); | 94 | NSParameterAssert(requestSerializer); |
| 91 | 95 | ||
| @@ -98,23 +102,6 @@ | @@ -98,23 +102,6 @@ | ||
| 98 | [super setResponseSerializer:responseSerializer]; | 102 | [super setResponseSerializer:responseSerializer]; |
| 99 | } | 103 | } |
| 100 | 104 | ||
| 101 | -@dynamic securityPolicy; | ||
| 102 | - | ||
| 103 | -- (void)setSecurityPolicy:(AFSecurityPolicy *)securityPolicy { | ||
| 104 | - if (securityPolicy.SSLPinningMode != AFSSLPinningModeNone && ![self.baseURL.scheme isEqualToString:@"https"]) { | ||
| 105 | - NSString *pinningMode = @"Unknown Pinning Mode"; | ||
| 106 | - switch (securityPolicy.SSLPinningMode) { | ||
| 107 | - case AFSSLPinningModeNone: pinningMode = @"AFSSLPinningModeNone"; break; | ||
| 108 | - case AFSSLPinningModeCertificate: pinningMode = @"AFSSLPinningModeCertificate"; break; | ||
| 109 | - case AFSSLPinningModePublicKey: pinningMode = @"AFSSLPinningModePublicKey"; break; | ||
| 110 | - } | ||
| 111 | - NSString *reason = [NSString stringWithFormat:@"A security policy configured with `%@` can only be applied on a manager with a secure base URL (i.e. https)", pinningMode]; | ||
| 112 | - @throw [NSException exceptionWithName:@"Invalid Security Policy" reason:reason userInfo:nil]; | ||
| 113 | - } | ||
| 114 | - | ||
| 115 | - [super setSecurityPolicy:securityPolicy]; | ||
| 116 | -} | ||
| 117 | - | ||
| 118 | #pragma mark - | 105 | #pragma mark - |
| 119 | 106 | ||
| 120 | - (NSURLSessionDataTask *)GET:(NSString *)URLString | 107 | - (NSURLSessionDataTask *)GET:(NSString *)URLString |
| @@ -122,24 +109,7 @@ | @@ -122,24 +109,7 @@ | ||
| 122 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 109 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 123 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 110 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 124 | { | 111 | { |
| 125 | - | ||
| 126 | - return [self GET:URLString parameters:parameters progress:nil success:success failure:failure]; | ||
| 127 | -} | ||
| 128 | - | ||
| 129 | -- (NSURLSessionDataTask *)GET:(NSString *)URLString | ||
| 130 | - parameters:(id)parameters | ||
| 131 | - progress:(void (^)(NSProgress * _Nonnull))downloadProgress | ||
| 132 | - success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success | ||
| 133 | - failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure | ||
| 134 | -{ | ||
| 135 | - | ||
| 136 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" | ||
| 137 | - URLString:URLString | ||
| 138 | - parameters:parameters | ||
| 139 | - uploadProgress:nil | ||
| 140 | - downloadProgress:downloadProgress | ||
| 141 | - success:success | ||
| 142 | - failure:failure]; | 112 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" URLString:URLString parameters:parameters success:success failure:failure]; |
| 143 | 113 | ||
| 144 | [dataTask resume]; | 114 | [dataTask resume]; |
| 145 | 115 | ||
| @@ -151,7 +121,7 @@ | @@ -151,7 +121,7 @@ | ||
| 151 | success:(void (^)(NSURLSessionDataTask *task))success | 121 | success:(void (^)(NSURLSessionDataTask *task))success |
| 152 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 122 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 153 | { | 123 | { |
| 154 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) { | 124 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters success:^(NSURLSessionDataTask *task, __unused id responseObject) { |
| 155 | if (success) { | 125 | if (success) { |
| 156 | success(task); | 126 | success(task); |
| 157 | } | 127 | } |
| @@ -167,16 +137,7 @@ | @@ -167,16 +137,7 @@ | ||
| 167 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 137 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 168 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 138 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 169 | { | 139 | { |
| 170 | - return [self POST:URLString parameters:parameters progress:nil success:success failure:failure]; | ||
| 171 | -} | ||
| 172 | - | ||
| 173 | -- (NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 174 | - parameters:(id)parameters | ||
| 175 | - progress:(void (^)(NSProgress * _Nonnull))uploadProgress | ||
| 176 | - success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success | ||
| 177 | - failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure | ||
| 178 | -{ | ||
| 179 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure]; | 140 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters success:success failure:failure]; |
| 180 | 141 | ||
| 181 | [dataTask resume]; | 142 | [dataTask resume]; |
| 182 | 143 | ||
| @@ -184,18 +145,8 @@ | @@ -184,18 +145,8 @@ | ||
| 184 | } | 145 | } |
| 185 | 146 | ||
| 186 | - (NSURLSessionDataTask *)POST:(NSString *)URLString | 147 | - (NSURLSessionDataTask *)POST:(NSString *)URLString |
| 187 | - parameters:(nullable id)parameters | ||
| 188 | - constructingBodyWithBlock:(nullable void (^)(id<AFMultipartFormData> _Nonnull))block | ||
| 189 | - success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success | ||
| 190 | - failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure | ||
| 191 | -{ | ||
| 192 | - return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure]; | ||
| 193 | -} | ||
| 194 | - | ||
| 195 | -- (NSURLSessionDataTask *)POST:(NSString *)URLString | ||
| 196 | parameters:(id)parameters | 148 | parameters:(id)parameters |
| 197 | constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block | 149 | constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block |
| 198 | - progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress | ||
| 199 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 150 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 200 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 151 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 201 | { | 152 | { |
| @@ -203,15 +154,18 @@ | @@ -203,15 +154,18 @@ | ||
| 203 | NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; | 154 | NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; |
| 204 | if (serializationError) { | 155 | if (serializationError) { |
| 205 | if (failure) { | 156 | if (failure) { |
| 157 | +#pragma clang diagnostic push | ||
| 158 | +#pragma clang diagnostic ignored "-Wgnu" | ||
| 206 | dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ | 159 | dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ |
| 207 | failure(nil, serializationError); | 160 | failure(nil, serializationError); |
| 208 | }); | 161 | }); |
| 162 | +#pragma clang diagnostic pop | ||
| 209 | } | 163 | } |
| 210 | 164 | ||
| 211 | return nil; | 165 | return nil; |
| 212 | } | 166 | } |
| 213 | 167 | ||
| 214 | - __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { | 168 | + __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { |
| 215 | if (error) { | 169 | if (error) { |
| 216 | if (failure) { | 170 | if (failure) { |
| 217 | failure(task, error); | 171 | failure(task, error); |
| @@ -233,7 +187,7 @@ | @@ -233,7 +187,7 @@ | ||
| 233 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 187 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 234 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 188 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 235 | { | 189 | { |
| 236 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; | 190 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters success:success failure:failure]; |
| 237 | 191 | ||
| 238 | [dataTask resume]; | 192 | [dataTask resume]; |
| 239 | 193 | ||
| @@ -245,7 +199,7 @@ | @@ -245,7 +199,7 @@ | ||
| 245 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 199 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 246 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 200 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 247 | { | 201 | { |
| 248 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; | 202 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters success:success failure:failure]; |
| 249 | 203 | ||
| 250 | [dataTask resume]; | 204 | [dataTask resume]; |
| 251 | 205 | ||
| @@ -257,7 +211,7 @@ | @@ -257,7 +211,7 @@ | ||
| 257 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | 211 | success:(void (^)(NSURLSessionDataTask *task, id responseObject))success |
| 258 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure | 212 | failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure |
| 259 | { | 213 | { |
| 260 | - NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure]; | 214 | + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters success:success failure:failure]; |
| 261 | 215 | ||
| 262 | [dataTask resume]; | 216 | [dataTask resume]; |
| 263 | 217 | ||
| @@ -267,8 +221,6 @@ | @@ -267,8 +221,6 @@ | ||
| 267 | - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method | 221 | - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method |
| 268 | URLString:(NSString *)URLString | 222 | URLString:(NSString *)URLString |
| 269 | parameters:(id)parameters | 223 | parameters:(id)parameters |
| 270 | - uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress | ||
| 271 | - downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress | ||
| 272 | success:(void (^)(NSURLSessionDataTask *, id))success | 224 | success:(void (^)(NSURLSessionDataTask *, id))success |
| 273 | failure:(void (^)(NSURLSessionDataTask *, NSError *))failure | 225 | failure:(void (^)(NSURLSessionDataTask *, NSError *))failure |
| 274 | { | 226 | { |
| @@ -276,19 +228,19 @@ | @@ -276,19 +228,19 @@ | ||
| 276 | NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; | 228 | NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; |
| 277 | if (serializationError) { | 229 | if (serializationError) { |
| 278 | if (failure) { | 230 | if (failure) { |
| 231 | +#pragma clang diagnostic push | ||
| 232 | +#pragma clang diagnostic ignored "-Wgnu" | ||
| 279 | dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ | 233 | dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ |
| 280 | failure(nil, serializationError); | 234 | failure(nil, serializationError); |
| 281 | }); | 235 | }); |
| 236 | +#pragma clang diagnostic pop | ||
| 282 | } | 237 | } |
| 283 | 238 | ||
| 284 | return nil; | 239 | return nil; |
| 285 | } | 240 | } |
| 286 | 241 | ||
| 287 | __block NSURLSessionDataTask *dataTask = nil; | 242 | __block NSURLSessionDataTask *dataTask = nil; |
| 288 | - dataTask = [self dataTaskWithRequest:request | ||
| 289 | - uploadProgress:uploadProgress | ||
| 290 | - downloadProgress:downloadProgress | ||
| 291 | - completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { | 243 | + dataTask = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { |
| 292 | if (error) { | 244 | if (error) { |
| 293 | if (failure) { | 245 | if (failure) { |
| 294 | failure(dataTask, error); | 246 | failure(dataTask, error); |
| @@ -315,7 +267,7 @@ | @@ -315,7 +267,7 @@ | ||
| 315 | return YES; | 267 | return YES; |
| 316 | } | 268 | } |
| 317 | 269 | ||
| 318 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 270 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 319 | NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; | 271 | NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; |
| 320 | NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; | 272 | NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; |
| 321 | if (!configuration) { | 273 | if (!configuration) { |
| @@ -336,10 +288,6 @@ | @@ -336,10 +288,6 @@ | ||
| 336 | 288 | ||
| 337 | self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; | 289 | self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; |
| 338 | self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; | 290 | self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; |
| 339 | - AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))]; | ||
| 340 | - if (decodedPolicy) { | ||
| 341 | - self.securityPolicy = decodedPolicy; | ||
| 342 | - } | ||
| 343 | 291 | ||
| 344 | return self; | 292 | return self; |
| 345 | } | 293 | } |
| @@ -355,18 +303,19 @@ | @@ -355,18 +303,19 @@ | ||
| 355 | } | 303 | } |
| 356 | [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; | 304 | [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; |
| 357 | [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; | 305 | [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; |
| 358 | - [coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))]; | ||
| 359 | } | 306 | } |
| 360 | 307 | ||
| 361 | #pragma mark - NSCopying | 308 | #pragma mark - NSCopying |
| 362 | 309 | ||
| 363 | -- (instancetype)copyWithZone:(NSZone *)zone { | 310 | +- (id)copyWithZone:(NSZone *)zone { |
| 364 | AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; | 311 | AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; |
| 365 | 312 | ||
| 366 | HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; | 313 | HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; |
| 367 | HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; | 314 | HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; |
| 368 | - HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone]; | 315 | + |
| 369 | return HTTPClient; | 316 | return HTTPClient; |
| 370 | } | 317 | } |
| 371 | 318 | ||
| 372 | @end | 319 | @end |
| 320 | + | ||
| 321 | +#endif |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFNetworkReachabilityManager.h
| 1 | // AFNetworkReachabilityManager.h | 1 | // AFNetworkReachabilityManager.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -20,10 +20,16 @@ | @@ -20,10 +20,16 @@ | ||
| 20 | // THE SOFTWARE. | 20 | // THE SOFTWARE. |
| 21 | 21 | ||
| 22 | #import <Foundation/Foundation.h> | 22 | #import <Foundation/Foundation.h> |
| 23 | - | ||
| 24 | -#if !TARGET_OS_WATCH | ||
| 25 | #import <SystemConfiguration/SystemConfiguration.h> | 23 | #import <SystemConfiguration/SystemConfiguration.h> |
| 26 | 24 | ||
| 25 | +#ifndef NS_DESIGNATED_INITIALIZER | ||
| 26 | +#if __has_attribute(objc_designated_initializer) | ||
| 27 | +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 28 | +#else | ||
| 29 | +#define NS_DESIGNATED_INITIALIZER | ||
| 30 | +#endif | ||
| 31 | +#endif | ||
| 32 | + | ||
| 27 | typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { | 33 | typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { |
| 28 | AFNetworkReachabilityStatusUnknown = -1, | 34 | AFNetworkReachabilityStatusUnknown = -1, |
| 29 | AFNetworkReachabilityStatusNotReachable = 0, | 35 | AFNetworkReachabilityStatusNotReachable = 0, |
| @@ -31,14 +37,12 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { | @@ -31,14 +37,12 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { | ||
| 31 | AFNetworkReachabilityStatusReachableViaWiFi = 2, | 37 | AFNetworkReachabilityStatusReachableViaWiFi = 2, |
| 32 | }; | 38 | }; |
| 33 | 39 | ||
| 34 | -NS_ASSUME_NONNULL_BEGIN | ||
| 35 | - | ||
| 36 | /** | 40 | /** |
| 37 | `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. | 41 | `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. |
| 38 | 42 | ||
| 39 | Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. | 43 | Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. |
| 40 | 44 | ||
| 41 | - See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ ) | 45 | + See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/) |
| 42 | 46 | ||
| 43 | @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. | 47 | @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. |
| 44 | */ | 48 | */ |
| @@ -74,13 +78,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -74,13 +78,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 74 | + (instancetype)sharedManager; | 78 | + (instancetype)sharedManager; |
| 75 | 79 | ||
| 76 | /** | 80 | /** |
| 77 | - Creates and returns a network reachability manager with the default socket address. | ||
| 78 | - | ||
| 79 | - @return An initialized network reachability manager, actively monitoring the default socket address. | ||
| 80 | - */ | ||
| 81 | -+ (instancetype)manager; | ||
| 82 | - | ||
| 83 | -/** | ||
| 84 | Creates and returns a network reachability manager for the specified domain. | 81 | Creates and returns a network reachability manager for the specified domain. |
| 85 | 82 | ||
| 86 | @param domain The domain used to evaluate network reachability. | 83 | @param domain The domain used to evaluate network reachability. |
| @@ -92,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -92,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 92 | /** | 89 | /** |
| 93 | Creates and returns a network reachability manager for the socket address. | 90 | Creates and returns a network reachability manager for the socket address. |
| 94 | 91 | ||
| 95 | - @param address The socket address (`sockaddr_in6`) used to evaluate network reachability. | 92 | + @param address The socket address (`sockaddr_in`) used to evaluate network reachability. |
| 96 | 93 | ||
| 97 | @return An initialized network reachability manager, actively monitoring the specified socket address. | 94 | @return An initialized network reachability manager, actively monitoring the specified socket address. |
| 98 | */ | 95 | */ |
| @@ -107,13 +104,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -107,13 +104,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 107 | */ | 104 | */ |
| 108 | - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER; | 105 | - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER; |
| 109 | 106 | ||
| 110 | -/** | ||
| 111 | - * Initializes an instance of a network reachability manager | ||
| 112 | - * | ||
| 113 | - * @return nil as this method is unavailable | ||
| 114 | - */ | ||
| 115 | -- (nullable instancetype)init NS_UNAVAILABLE; | ||
| 116 | - | ||
| 117 | ///-------------------------------------------------- | 107 | ///-------------------------------------------------- |
| 118 | /// @name Starting & Stopping Reachability Monitoring | 108 | /// @name Starting & Stopping Reachability Monitoring |
| 119 | ///-------------------------------------------------- | 109 | ///-------------------------------------------------- |
| @@ -146,7 +136,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -146,7 +136,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 146 | 136 | ||
| 147 | @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. | 137 | @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. |
| 148 | */ | 138 | */ |
| 149 | -- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block; | 139 | +- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block; |
| 150 | 140 | ||
| 151 | @end | 141 | @end |
| 152 | 142 | ||
| @@ -197,8 +187,8 @@ NS_ASSUME_NONNULL_BEGIN | @@ -197,8 +187,8 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 197 | 187 | ||
| 198 | @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`). | 188 | @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`). |
| 199 | */ | 189 | */ |
| 200 | -FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification; | ||
| 201 | -FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem; | 190 | +extern NSString * const AFNetworkingReachabilityDidChangeNotification; |
| 191 | +extern NSString * const AFNetworkingReachabilityNotificationStatusItem; | ||
| 202 | 192 | ||
| 203 | ///-------------------- | 193 | ///-------------------- |
| 204 | /// @name Functions | 194 | /// @name Functions |
| @@ -207,7 +197,4 @@ FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusIte | @@ -207,7 +197,4 @@ FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusIte | ||
| 207 | /** | 197 | /** |
| 208 | Returns a localized string representation of an `AFNetworkReachabilityStatus` value. | 198 | Returns a localized string representation of an `AFNetworkReachabilityStatus` value. |
| 209 | */ | 199 | */ |
| 210 | -FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); | ||
| 211 | - | ||
| 212 | -NS_ASSUME_NONNULL_END | ||
| 213 | -#endif | 200 | +extern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFNetworkReachabilityManager.m
| 1 | // AFNetworkReachabilityManager.m | 1 | // AFNetworkReachabilityManager.m |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -20,7 +20,6 @@ | @@ -20,7 +20,6 @@ | ||
| 20 | // THE SOFTWARE. | 20 | // THE SOFTWARE. |
| 21 | 21 | ||
| 22 | #import "AFNetworkReachabilityManager.h" | 22 | #import "AFNetworkReachabilityManager.h" |
| 23 | -#if !TARGET_OS_WATCH | ||
| 24 | 23 | ||
| 25 | #import <netinet/in.h> | 24 | #import <netinet/in.h> |
| 26 | #import <netinet6/in6.h> | 25 | #import <netinet6/in6.h> |
| @@ -33,6 +32,12 @@ NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworking | @@ -33,6 +32,12 @@ NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworking | ||
| 33 | 32 | ||
| 34 | typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); | 33 | typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); |
| 35 | 34 | ||
| 35 | +typedef NS_ENUM(NSUInteger, AFNetworkReachabilityAssociation) { | ||
| 36 | + AFNetworkReachabilityForAddress = 1, | ||
| 37 | + AFNetworkReachabilityForAddressPair = 2, | ||
| 38 | + AFNetworkReachabilityForName = 3, | ||
| 39 | +}; | ||
| 40 | + | ||
| 36 | NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { | 41 | NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { |
| 37 | switch (status) { | 42 | switch (status) { |
| 38 | case AFNetworkReachabilityStatusNotReachable: | 43 | case AFNetworkReachabilityStatusNotReachable: |
| @@ -70,31 +75,22 @@ static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetwork | @@ -70,31 +75,22 @@ static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetwork | ||
| 70 | return status; | 75 | return status; |
| 71 | } | 76 | } |
| 72 | 77 | ||
| 73 | -/** | ||
| 74 | - * Queue a status change notification for the main thread. | ||
| 75 | - * | ||
| 76 | - * This is done to ensure that the notifications are received in the same order | ||
| 77 | - * as they are sent. If notifications are sent directly, it is possible that | ||
| 78 | - * a queued notification (for an earlier status condition) is processed after | ||
| 79 | - * the later update, resulting in the listener being left in the wrong state. | ||
| 80 | - */ | ||
| 81 | -static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusBlock block) { | 78 | +static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { |
| 82 | AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); | 79 | AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); |
| 80 | + AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info; | ||
| 81 | + if (block) { | ||
| 82 | + block(status); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + | ||
| 83 | dispatch_async(dispatch_get_main_queue(), ^{ | 86 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 84 | - if (block) { | ||
| 85 | - block(status); | ||
| 86 | - } | ||
| 87 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; | 87 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; |
| 88 | NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) }; | 88 | NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) }; |
| 89 | [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo]; | 89 | [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo]; |
| 90 | }); | 90 | }); |
| 91 | -} | ||
| 92 | 91 | ||
| 93 | -static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { | ||
| 94 | - AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusBlock)info); | ||
| 95 | } | 92 | } |
| 96 | 93 | ||
| 97 | - | ||
| 98 | static const void * AFNetworkReachabilityRetainCallback(const void *info) { | 94 | static const void * AFNetworkReachabilityRetainCallback(const void *info) { |
| 99 | return Block_copy(info); | 95 | return Block_copy(info); |
| 100 | } | 96 | } |
| @@ -106,7 +102,8 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | @@ -106,7 +102,8 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | ||
| 106 | } | 102 | } |
| 107 | 103 | ||
| 108 | @interface AFNetworkReachabilityManager () | 104 | @interface AFNetworkReachabilityManager () |
| 109 | -@property (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability; | 105 | +@property (readwrite, nonatomic, assign) SCNetworkReachabilityRef networkReachability; |
| 106 | +@property (readwrite, nonatomic, assign) AFNetworkReachabilityAssociation networkReachabilityAssociation; | ||
| 110 | @property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; | 107 | @property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; |
| 111 | @property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; | 108 | @property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; |
| 112 | @end | 109 | @end |
| @@ -117,7 +114,12 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | @@ -117,7 +114,12 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | ||
| 117 | static AFNetworkReachabilityManager *_sharedManager = nil; | 114 | static AFNetworkReachabilityManager *_sharedManager = nil; |
| 118 | static dispatch_once_t onceToken; | 115 | static dispatch_once_t onceToken; |
| 119 | dispatch_once(&onceToken, ^{ | 116 | dispatch_once(&onceToken, ^{ |
| 120 | - _sharedManager = [self manager]; | 117 | + struct sockaddr_in address; |
| 118 | + bzero(&address, sizeof(address)); | ||
| 119 | + address.sin_len = sizeof(address); | ||
| 120 | + address.sin_family = AF_INET; | ||
| 121 | + | ||
| 122 | + _sharedManager = [self managerForAddress:&address]; | ||
| 121 | }); | 123 | }); |
| 122 | 124 | ||
| 123 | return _sharedManager; | 125 | return _sharedManager; |
| @@ -127,59 +129,38 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | @@ -127,59 +129,38 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | ||
| 127 | SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); | 129 | SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); |
| 128 | 130 | ||
| 129 | AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; | 131 | AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; |
| 130 | - | ||
| 131 | - CFRelease(reachability); | 132 | + manager.networkReachabilityAssociation = AFNetworkReachabilityForName; |
| 132 | 133 | ||
| 133 | return manager; | 134 | return manager; |
| 134 | } | 135 | } |
| 135 | 136 | ||
| 136 | + (instancetype)managerForAddress:(const void *)address { | 137 | + (instancetype)managerForAddress:(const void *)address { |
| 137 | SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); | 138 | SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); |
| 139 | + | ||
| 138 | AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; | 140 | AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; |
| 141 | + manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress; | ||
| 139 | 142 | ||
| 140 | - CFRelease(reachability); | ||
| 141 | - | ||
| 142 | return manager; | 143 | return manager; |
| 143 | } | 144 | } |
| 144 | 145 | ||
| 145 | -+ (instancetype)manager | ||
| 146 | -{ | ||
| 147 | -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | ||
| 148 | - struct sockaddr_in6 address; | ||
| 149 | - bzero(&address, sizeof(address)); | ||
| 150 | - address.sin6_len = sizeof(address); | ||
| 151 | - address.sin6_family = AF_INET6; | ||
| 152 | -#else | ||
| 153 | - struct sockaddr_in address; | ||
| 154 | - bzero(&address, sizeof(address)); | ||
| 155 | - address.sin_len = sizeof(address); | ||
| 156 | - address.sin_family = AF_INET; | ||
| 157 | -#endif | ||
| 158 | - return [self managerForAddress:&address]; | ||
| 159 | -} | ||
| 160 | - | ||
| 161 | - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { | 146 | - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { |
| 162 | self = [super init]; | 147 | self = [super init]; |
| 163 | if (!self) { | 148 | if (!self) { |
| 164 | return nil; | 149 | return nil; |
| 165 | } | 150 | } |
| 166 | 151 | ||
| 167 | - _networkReachability = CFRetain(reachability); | 152 | + self.networkReachability = reachability; |
| 168 | self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; | 153 | self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; |
| 169 | 154 | ||
| 170 | return self; | 155 | return self; |
| 171 | } | 156 | } |
| 172 | 157 | ||
| 173 | -- (instancetype)init NS_UNAVAILABLE | ||
| 174 | -{ | ||
| 175 | - return nil; | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | - (void)dealloc { | 158 | - (void)dealloc { |
| 179 | [self stopMonitoring]; | 159 | [self stopMonitoring]; |
| 180 | - | ||
| 181 | - if (_networkReachability != NULL) { | 160 | + |
| 161 | + if (_networkReachability) { | ||
| 182 | CFRelease(_networkReachability); | 162 | CFRelease(_networkReachability); |
| 163 | + _networkReachability = NULL; | ||
| 183 | } | 164 | } |
| 184 | } | 165 | } |
| 185 | 166 | ||
| @@ -221,12 +202,28 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | @@ -221,12 +202,28 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | ||
| 221 | SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); | 202 | SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); |
| 222 | SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); | 203 | SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); |
| 223 | 204 | ||
| 224 | - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ | ||
| 225 | - SCNetworkReachabilityFlags flags; | ||
| 226 | - if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) { | ||
| 227 | - AFPostReachabilityStatusChange(flags, callback); | 205 | + switch (self.networkReachabilityAssociation) { |
| 206 | + case AFNetworkReachabilityForName: | ||
| 207 | + break; | ||
| 208 | + case AFNetworkReachabilityForAddress: | ||
| 209 | + case AFNetworkReachabilityForAddressPair: | ||
| 210 | + default: { | ||
| 211 | + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ | ||
| 212 | + SCNetworkReachabilityFlags flags; | ||
| 213 | + SCNetworkReachabilityGetFlags(self.networkReachability, &flags); | ||
| 214 | + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); | ||
| 215 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 216 | + callback(status); | ||
| 217 | + | ||
| 218 | + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; | ||
| 219 | + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }]; | ||
| 220 | + | ||
| 221 | + | ||
| 222 | + }); | ||
| 223 | + }); | ||
| 228 | } | 224 | } |
| 229 | - }); | 225 | + break; |
| 226 | + } | ||
| 230 | } | 227 | } |
| 231 | 228 | ||
| 232 | - (void)stopMonitoring { | 229 | - (void)stopMonitoring { |
| @@ -260,4 +257,3 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | @@ -260,4 +257,3 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { | ||
| 260 | } | 257 | } |
| 261 | 258 | ||
| 262 | @end | 259 | @end |
| 263 | -#endif |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFNetworking.h
| @@ -22,7 +22,6 @@ | @@ -22,7 +22,6 @@ | ||
| 22 | 22 | ||
| 23 | #import <Foundation/Foundation.h> | 23 | #import <Foundation/Foundation.h> |
| 24 | #import <Availability.h> | 24 | #import <Availability.h> |
| 25 | -#import <TargetConditionals.h> | ||
| 26 | 25 | ||
| 27 | #ifndef _AFNETWORKING_ | 26 | #ifndef _AFNETWORKING_ |
| 28 | #define _AFNETWORKING_ | 27 | #define _AFNETWORKING_ |
| @@ -30,12 +29,16 @@ | @@ -30,12 +29,16 @@ | ||
| 30 | #import "AFURLRequestSerialization.h" | 29 | #import "AFURLRequestSerialization.h" |
| 31 | #import "AFURLResponseSerialization.h" | 30 | #import "AFURLResponseSerialization.h" |
| 32 | #import "AFSecurityPolicy.h" | 31 | #import "AFSecurityPolicy.h" |
| 33 | - | ||
| 34 | -#if !TARGET_OS_WATCH | ||
| 35 | #import "AFNetworkReachabilityManager.h" | 32 | #import "AFNetworkReachabilityManager.h" |
| 36 | -#endif | ||
| 37 | 33 | ||
| 34 | + #import "AFURLConnectionOperation.h" | ||
| 35 | + #import "AFHTTPRequestOperation.h" | ||
| 36 | + #import "AFHTTPRequestOperationManager.h" | ||
| 37 | + | ||
| 38 | +#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ | ||
| 39 | + ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) | ||
| 38 | #import "AFURLSessionManager.h" | 40 | #import "AFURLSessionManager.h" |
| 39 | #import "AFHTTPSessionManager.h" | 41 | #import "AFHTTPSessionManager.h" |
| 42 | +#endif | ||
| 40 | 43 | ||
| 41 | #endif /* _AFNETWORKING_ */ | 44 | #endif /* _AFNETWORKING_ */ |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFSecurityPolicy.h
| 1 | // AFSecurityPolicy.h | 1 | // AFSecurityPolicy.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -33,10 +33,7 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { | @@ -33,10 +33,7 @@ typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { | ||
| 33 | 33 | ||
| 34 | Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. | 34 | Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. |
| 35 | */ | 35 | */ |
| 36 | - | ||
| 37 | -NS_ASSUME_NONNULL_BEGIN | ||
| 38 | - | ||
| 39 | -@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying> | 36 | +@interface AFSecurityPolicy : NSObject |
| 40 | 37 | ||
| 41 | /** | 38 | /** |
| 42 | The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. | 39 | The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. |
| @@ -44,13 +41,14 @@ NS_ASSUME_NONNULL_BEGIN | @@ -44,13 +41,14 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 44 | @property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode; | 41 | @property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode; |
| 45 | 42 | ||
| 46 | /** | 43 | /** |
| 47 | - The certificates used to evaluate server trust according to the SSL pinning mode. | 44 | + Whether to evaluate an entire SSL certificate chain, or just the leaf certificate. Defaults to `YES`. |
| 45 | + */ | ||
| 46 | +@property (nonatomic, assign) BOOL validatesCertificateChain; | ||
| 48 | 47 | ||
| 49 | - By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`. | ||
| 50 | - | ||
| 51 | - Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches. | 48 | +/** |
| 49 | + The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle. | ||
| 52 | */ | 50 | */ |
| 53 | -@property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates; | 51 | +@property (nonatomic, strong) NSArray *pinnedCertificates; |
| 54 | 52 | ||
| 55 | /** | 53 | /** |
| 56 | Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. | 54 | Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. |
| @@ -63,17 +61,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -63,17 +61,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 63 | @property (nonatomic, assign) BOOL validatesDomainName; | 61 | @property (nonatomic, assign) BOOL validatesDomainName; |
| 64 | 62 | ||
| 65 | ///----------------------------------------- | 63 | ///----------------------------------------- |
| 66 | -/// @name Getting Certificates from the Bundle | ||
| 67 | -///----------------------------------------- | ||
| 68 | - | ||
| 69 | -/** | ||
| 70 | - Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`. | ||
| 71 | - | ||
| 72 | - @return The certificates included in the given bundle. | ||
| 73 | - */ | ||
| 74 | -+ (NSSet <NSData *> *)certificatesInBundle:(NSBundle *)bundle; | ||
| 75 | - | ||
| 76 | -///----------------------------------------- | ||
| 77 | /// @name Getting Specific Security Policies | 64 | /// @name Getting Specific Security Policies |
| 78 | ///----------------------------------------- | 65 | ///----------------------------------------- |
| 79 | 66 | ||
| @@ -97,19 +84,22 @@ NS_ASSUME_NONNULL_BEGIN | @@ -97,19 +84,22 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 97 | */ | 84 | */ |
| 98 | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; | 85 | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; |
| 99 | 86 | ||
| 87 | +///------------------------------ | ||
| 88 | +/// @name Evaluating Server Trust | ||
| 89 | +///------------------------------ | ||
| 90 | + | ||
| 100 | /** | 91 | /** |
| 101 | - Creates and returns a security policy with the specified pinning mode. | 92 | + Whether or not the specified server trust should be accepted, based on the security policy. |
| 102 | 93 | ||
| 103 | - @param pinningMode The SSL pinning mode. | ||
| 104 | - @param pinnedCertificates The certificates to pin against. | 94 | + This method should be used when responding to an authentication challenge from a server. |
| 105 | 95 | ||
| 106 | - @return A new security policy. | ||
| 107 | - */ | ||
| 108 | -+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates; | 96 | + @param serverTrust The X.509 certificate trust of the server. |
| 109 | 97 | ||
| 110 | -///------------------------------ | ||
| 111 | -/// @name Evaluating Server Trust | ||
| 112 | -///------------------------------ | 98 | + @return Whether or not to trust the server. |
| 99 | + | ||
| 100 | + @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`. | ||
| 101 | + */ | ||
| 102 | +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE; | ||
| 113 | 103 | ||
| 114 | /** | 104 | /** |
| 115 | Whether or not the specified server trust should be accepted, based on the security policy. | 105 | Whether or not the specified server trust should be accepted, based on the security policy. |
| @@ -122,12 +112,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -122,12 +112,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 122 | @return Whether or not to trust the server. | 112 | @return Whether or not to trust the server. |
| 123 | */ | 113 | */ |
| 124 | - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust | 114 | - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust |
| 125 | - forDomain:(nullable NSString *)domain; | 115 | + forDomain:(NSString *)domain; |
| 126 | 116 | ||
| 127 | @end | 117 | @end |
| 128 | 118 | ||
| 129 | -NS_ASSUME_NONNULL_END | ||
| 130 | - | ||
| 131 | ///---------------- | 119 | ///---------------- |
| 132 | /// @name Constants | 120 | /// @name Constants |
| 133 | ///---------------- | 121 | ///---------------- |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFSecurityPolicy.m
| 1 | // AFSecurityPolicy.m | 1 | // AFSecurityPolicy.m |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
| 23 | 23 | ||
| 24 | #import <AssertMacros.h> | 24 | #import <AssertMacros.h> |
| 25 | 25 | ||
| 26 | -#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV | 26 | +#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 27 | static NSData * AFSecKeyGetData(SecKeyRef key) { | 27 | static NSData * AFSecKeyGetData(SecKeyRef key) { |
| 28 | CFDataRef data = NULL; | 28 | CFDataRef data = NULL; |
| 29 | 29 | ||
| @@ -41,7 +41,7 @@ _out: | @@ -41,7 +41,7 @@ _out: | ||
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { | 43 | static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { |
| 44 | -#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV | 44 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 45 | return [(__bridge id)key1 isEqual:(__bridge id)key2]; | 45 | return [(__bridge id)key1 isEqual:(__bridge id)key2]; |
| 46 | #else | 46 | #else |
| 47 | return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; | 47 | return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; |
| @@ -51,6 +51,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { | @@ -51,6 +51,8 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { | ||
| 51 | static id AFPublicKeyForCertificate(NSData *certificate) { | 51 | static id AFPublicKeyForCertificate(NSData *certificate) { |
| 52 | id allowedPublicKey = nil; | 52 | id allowedPublicKey = nil; |
| 53 | SecCertificateRef allowedCertificate; | 53 | SecCertificateRef allowedCertificate; |
| 54 | + SecCertificateRef allowedCertificates[1]; | ||
| 55 | + CFArrayRef tempCertificates = nil; | ||
| 54 | SecPolicyRef policy = nil; | 56 | SecPolicyRef policy = nil; |
| 55 | SecTrustRef allowedTrust = nil; | 57 | SecTrustRef allowedTrust = nil; |
| 56 | SecTrustResultType result; | 58 | SecTrustResultType result; |
| @@ -58,8 +60,11 @@ static id AFPublicKeyForCertificate(NSData *certificate) { | @@ -58,8 +60,11 @@ static id AFPublicKeyForCertificate(NSData *certificate) { | ||
| 58 | allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate); | 60 | allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate); |
| 59 | __Require_Quiet(allowedCertificate != NULL, _out); | 61 | __Require_Quiet(allowedCertificate != NULL, _out); |
| 60 | 62 | ||
| 63 | + allowedCertificates[0] = allowedCertificate; | ||
| 64 | + tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL); | ||
| 65 | + | ||
| 61 | policy = SecPolicyCreateBasicX509(); | 66 | policy = SecPolicyCreateBasicX509(); |
| 62 | - __Require_noErr_Quiet(SecTrustCreateWithCertificates(allowedCertificate, policy, &allowedTrust), _out); | 67 | + __Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out); |
| 63 | __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out); | 68 | __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out); |
| 64 | 69 | ||
| 65 | allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust); | 70 | allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust); |
| @@ -73,6 +78,10 @@ _out: | @@ -73,6 +78,10 @@ _out: | ||
| 73 | CFRelease(policy); | 78 | CFRelease(policy); |
| 74 | } | 79 | } |
| 75 | 80 | ||
| 81 | + if (tempCertificates) { | ||
| 82 | + CFRelease(tempCertificates); | ||
| 83 | + } | ||
| 84 | + | ||
| 76 | if (allowedCertificate) { | 85 | if (allowedCertificate) { |
| 77 | CFRelease(allowedCertificate); | 86 | CFRelease(allowedCertificate); |
| 78 | } | 87 | } |
| @@ -141,29 +150,25 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -141,29 +150,25 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 141 | 150 | ||
| 142 | @interface AFSecurityPolicy() | 151 | @interface AFSecurityPolicy() |
| 143 | @property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode; | 152 | @property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode; |
| 144 | -@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys; | 153 | +@property (readwrite, nonatomic, strong) NSArray *pinnedPublicKeys; |
| 145 | @end | 154 | @end |
| 146 | 155 | ||
| 147 | @implementation AFSecurityPolicy | 156 | @implementation AFSecurityPolicy |
| 148 | 157 | ||
| 149 | -+ (NSSet *)certificatesInBundle:(NSBundle *)bundle { | ||
| 150 | - NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; | ||
| 151 | - | ||
| 152 | - NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]]; | ||
| 153 | - for (NSString *path in paths) { | ||
| 154 | - NSData *certificateData = [NSData dataWithContentsOfFile:path]; | ||
| 155 | - [certificates addObject:certificateData]; | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - return [NSSet setWithSet:certificates]; | ||
| 159 | -} | ||
| 160 | - | ||
| 161 | -+ (NSSet *)defaultPinnedCertificates { | ||
| 162 | - static NSSet *_defaultPinnedCertificates = nil; | 158 | ++ (NSArray *)defaultPinnedCertificates { |
| 159 | + static NSArray *_defaultPinnedCertificates = nil; | ||
| 163 | static dispatch_once_t onceToken; | 160 | static dispatch_once_t onceToken; |
| 164 | dispatch_once(&onceToken, ^{ | 161 | dispatch_once(&onceToken, ^{ |
| 165 | NSBundle *bundle = [NSBundle bundleForClass:[self class]]; | 162 | NSBundle *bundle = [NSBundle bundleForClass:[self class]]; |
| 166 | - _defaultPinnedCertificates = [self certificatesInBundle:bundle]; | 163 | + NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; |
| 164 | + | ||
| 165 | + NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]]; | ||
| 166 | + for (NSString *path in paths) { | ||
| 167 | + NSData *certificateData = [NSData dataWithContentsOfFile:path]; | ||
| 168 | + [certificates addObject:certificateData]; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + _defaultPinnedCertificates = [[NSArray alloc] initWithArray:certificates]; | ||
| 167 | }); | 172 | }); |
| 168 | 173 | ||
| 169 | return _defaultPinnedCertificates; | 174 | return _defaultPinnedCertificates; |
| @@ -177,34 +182,31 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -177,34 +182,31 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 177 | } | 182 | } |
| 178 | 183 | ||
| 179 | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { | 184 | + (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { |
| 180 | - return [self policyWithPinningMode:pinningMode withPinnedCertificates:[self defaultPinnedCertificates]]; | ||
| 181 | -} | ||
| 182 | - | ||
| 183 | -+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates { | ||
| 184 | AFSecurityPolicy *securityPolicy = [[self alloc] init]; | 185 | AFSecurityPolicy *securityPolicy = [[self alloc] init]; |
| 185 | securityPolicy.SSLPinningMode = pinningMode; | 186 | securityPolicy.SSLPinningMode = pinningMode; |
| 186 | 187 | ||
| 187 | - [securityPolicy setPinnedCertificates:pinnedCertificates]; | 188 | + [securityPolicy setPinnedCertificates:[self defaultPinnedCertificates]]; |
| 188 | 189 | ||
| 189 | return securityPolicy; | 190 | return securityPolicy; |
| 190 | } | 191 | } |
| 191 | 192 | ||
| 192 | -- (instancetype)init { | 193 | +- (id)init { |
| 193 | self = [super init]; | 194 | self = [super init]; |
| 194 | if (!self) { | 195 | if (!self) { |
| 195 | return nil; | 196 | return nil; |
| 196 | } | 197 | } |
| 197 | 198 | ||
| 199 | + self.validatesCertificateChain = YES; | ||
| 198 | self.validatesDomainName = YES; | 200 | self.validatesDomainName = YES; |
| 199 | 201 | ||
| 200 | return self; | 202 | return self; |
| 201 | } | 203 | } |
| 202 | 204 | ||
| 203 | -- (void)setPinnedCertificates:(NSSet *)pinnedCertificates { | 205 | +- (void)setPinnedCertificates:(NSArray *)pinnedCertificates { |
| 204 | _pinnedCertificates = pinnedCertificates; | 206 | _pinnedCertificates = pinnedCertificates; |
| 205 | 207 | ||
| 206 | if (self.pinnedCertificates) { | 208 | if (self.pinnedCertificates) { |
| 207 | - NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]]; | 209 | + NSMutableArray *mutablePinnedPublicKeys = [NSMutableArray arrayWithCapacity:[self.pinnedCertificates count]]; |
| 208 | for (NSData *certificate in self.pinnedCertificates) { | 210 | for (NSData *certificate in self.pinnedCertificates) { |
| 209 | id publicKey = AFPublicKeyForCertificate(certificate); | 211 | id publicKey = AFPublicKeyForCertificate(certificate); |
| 210 | if (!publicKey) { | 212 | if (!publicKey) { |
| @@ -212,7 +214,7 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -212,7 +214,7 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 212 | } | 214 | } |
| 213 | [mutablePinnedPublicKeys addObject:publicKey]; | 215 | [mutablePinnedPublicKeys addObject:publicKey]; |
| 214 | } | 216 | } |
| 215 | - self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys]; | 217 | + self.pinnedPublicKeys = [NSArray arrayWithArray:mutablePinnedPublicKeys]; |
| 216 | } else { | 218 | } else { |
| 217 | self.pinnedPublicKeys = nil; | 219 | self.pinnedPublicKeys = nil; |
| 218 | } | 220 | } |
| @@ -220,22 +222,13 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -220,22 +222,13 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 220 | 222 | ||
| 221 | #pragma mark - | 223 | #pragma mark - |
| 222 | 224 | ||
| 225 | +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust { | ||
| 226 | + return [self evaluateServerTrust:serverTrust forDomain:nil]; | ||
| 227 | +} | ||
| 228 | + | ||
| 223 | - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust | 229 | - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust |
| 224 | forDomain:(NSString *)domain | 230 | forDomain:(NSString *)domain |
| 225 | { | 231 | { |
| 226 | - if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) { | ||
| 227 | - // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html | ||
| 228 | - // According to the docs, you should only trust your provided certs for evaluation. | ||
| 229 | - // Pinned certificates are added to the trust. Without pinned certificates, | ||
| 230 | - // there is nothing to evaluate against. | ||
| 231 | - // | ||
| 232 | - // From Apple Docs: | ||
| 233 | - // "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors). | ||
| 234 | - // Instead, add your own (self-signed) CA certificate to the list of trusted anchors." | ||
| 235 | - NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning."); | ||
| 236 | - return NO; | ||
| 237 | - } | ||
| 238 | - | ||
| 239 | NSMutableArray *policies = [NSMutableArray array]; | 232 | NSMutableArray *policies = [NSMutableArray array]; |
| 240 | if (self.validatesDomainName) { | 233 | if (self.validatesDomainName) { |
| 241 | [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; | 234 | [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; |
| @@ -246,11 +239,16 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -246,11 +239,16 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 246 | SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); | 239 | SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); |
| 247 | 240 | ||
| 248 | if (self.SSLPinningMode == AFSSLPinningModeNone) { | 241 | if (self.SSLPinningMode == AFSSLPinningModeNone) { |
| 249 | - return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust); | 242 | + if (self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust)){ |
| 243 | + return YES; | ||
| 244 | + } else { | ||
| 245 | + return NO; | ||
| 246 | + } | ||
| 250 | } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) { | 247 | } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) { |
| 251 | return NO; | 248 | return NO; |
| 252 | } | 249 | } |
| 253 | 250 | ||
| 251 | + NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); | ||
| 254 | switch (self.SSLPinningMode) { | 252 | switch (self.SSLPinningMode) { |
| 255 | case AFSSLPinningModeNone: | 253 | case AFSSLPinningModeNone: |
| 256 | default: | 254 | default: |
| @@ -266,20 +264,25 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -266,20 +264,25 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 266 | return NO; | 264 | return NO; |
| 267 | } | 265 | } |
| 268 | 266 | ||
| 269 | - // obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA) | ||
| 270 | - NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); | ||
| 271 | - | ||
| 272 | - for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) { | 267 | + if (!self.validatesCertificateChain) { |
| 268 | + return YES; | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + NSUInteger trustedCertificateCount = 0; | ||
| 272 | + for (NSData *trustChainCertificate in serverCertificates) { | ||
| 273 | if ([self.pinnedCertificates containsObject:trustChainCertificate]) { | 273 | if ([self.pinnedCertificates containsObject:trustChainCertificate]) { |
| 274 | - return YES; | 274 | + trustedCertificateCount++; |
| 275 | } | 275 | } |
| 276 | } | 276 | } |
| 277 | - | ||
| 278 | - return NO; | 277 | + |
| 278 | + return trustedCertificateCount == [serverCertificates count]; | ||
| 279 | } | 279 | } |
| 280 | case AFSSLPinningModePublicKey: { | 280 | case AFSSLPinningModePublicKey: { |
| 281 | NSUInteger trustedPublicKeyCount = 0; | 281 | NSUInteger trustedPublicKeyCount = 0; |
| 282 | NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); | 282 | NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); |
| 283 | + if (!self.validatesCertificateChain && [publicKeys count] > 0) { | ||
| 284 | + publicKeys = @[[publicKeys firstObject]]; | ||
| 285 | + } | ||
| 283 | 286 | ||
| 284 | for (id trustChainPublicKey in publicKeys) { | 287 | for (id trustChainPublicKey in publicKeys) { |
| 285 | for (id pinnedPublicKey in self.pinnedPublicKeys) { | 288 | for (id pinnedPublicKey in self.pinnedPublicKeys) { |
| @@ -288,10 +291,11 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -288,10 +291,11 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 288 | } | 291 | } |
| 289 | } | 292 | } |
| 290 | } | 293 | } |
| 291 | - return trustedPublicKeyCount > 0; | 294 | + |
| 295 | + return trustedPublicKeyCount > 0 && ((self.validatesCertificateChain && trustedPublicKeyCount == [serverCertificates count]) || (!self.validatesCertificateChain && trustedPublicKeyCount >= 1)); | ||
| 292 | } | 296 | } |
| 293 | } | 297 | } |
| 294 | - | 298 | + |
| 295 | return NO; | 299 | return NO; |
| 296 | } | 300 | } |
| 297 | 301 | ||
| @@ -301,44 +305,4 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | @@ -301,44 +305,4 @@ static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { | ||
| 301 | return [NSSet setWithObject:@"pinnedCertificates"]; | 305 | return [NSSet setWithObject:@"pinnedCertificates"]; |
| 302 | } | 306 | } |
| 303 | 307 | ||
| 304 | -#pragma mark - NSSecureCoding | ||
| 305 | - | ||
| 306 | -+ (BOOL)supportsSecureCoding { | ||
| 307 | - return YES; | ||
| 308 | -} | ||
| 309 | - | ||
| 310 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | ||
| 311 | - | ||
| 312 | - self = [self init]; | ||
| 313 | - if (!self) { | ||
| 314 | - return nil; | ||
| 315 | - } | ||
| 316 | - | ||
| 317 | - self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue]; | ||
| 318 | - self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; | ||
| 319 | - self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))]; | ||
| 320 | - self.pinnedCertificates = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(pinnedCertificates))]; | ||
| 321 | - | ||
| 322 | - return self; | ||
| 323 | -} | ||
| 324 | - | ||
| 325 | -- (void)encodeWithCoder:(NSCoder *)coder { | ||
| 326 | - [coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))]; | ||
| 327 | - [coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; | ||
| 328 | - [coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))]; | ||
| 329 | - [coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))]; | ||
| 330 | -} | ||
| 331 | - | ||
| 332 | -#pragma mark - NSCopying | ||
| 333 | - | ||
| 334 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 335 | - AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init]; | ||
| 336 | - securityPolicy.SSLPinningMode = self.SSLPinningMode; | ||
| 337 | - securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates; | ||
| 338 | - securityPolicy.validatesDomainName = self.validatesDomainName; | ||
| 339 | - securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone]; | ||
| 340 | - | ||
| 341 | - return securityPolicy; | ||
| 342 | -} | ||
| 343 | - | ||
| 344 | @end | 308 | @end |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFURLRequestSerialization.h
| 1 | // AFURLRequestSerialization.h | 1 | // AFURLRequestSerialization.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -20,41 +20,10 @@ | @@ -20,41 +20,10 @@ | ||
| 20 | // THE SOFTWARE. | 20 | // THE SOFTWARE. |
| 21 | 21 | ||
| 22 | #import <Foundation/Foundation.h> | 22 | #import <Foundation/Foundation.h> |
| 23 | -#import <TargetConditionals.h> | ||
| 24 | - | ||
| 25 | -#if TARGET_OS_IOS || TARGET_OS_TV | 23 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 26 | #import <UIKit/UIKit.h> | 24 | #import <UIKit/UIKit.h> |
| 27 | -#elif TARGET_OS_WATCH | ||
| 28 | -#import <WatchKit/WatchKit.h> | ||
| 29 | #endif | 25 | #endif |
| 30 | 26 | ||
| 31 | -NS_ASSUME_NONNULL_BEGIN | ||
| 32 | - | ||
| 33 | -/** | ||
| 34 | - Returns a percent-escaped string following RFC 3986 for a query string key or value. | ||
| 35 | - RFC 3986 states that the following characters are "reserved" characters. | ||
| 36 | - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" | ||
| 37 | - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" | ||
| 38 | - | ||
| 39 | - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow | ||
| 40 | - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" | ||
| 41 | - should be percent-escaped in the query string. | ||
| 42 | - | ||
| 43 | - @param string The string to be percent-escaped. | ||
| 44 | - | ||
| 45 | - @return The percent-escaped string. | ||
| 46 | - */ | ||
| 47 | -FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string); | ||
| 48 | - | ||
| 49 | -/** | ||
| 50 | - A helper method to generate encoded url query parameters for appending to the end of a URL. | ||
| 51 | - | ||
| 52 | - @param parameters A dictionary of key/values to be encoded. | ||
| 53 | - | ||
| 54 | - @return A url encoded query string | ||
| 55 | - */ | ||
| 56 | -FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters); | ||
| 57 | - | ||
| 58 | /** | 27 | /** |
| 59 | The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. | 28 | The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. |
| 60 | 29 | ||
| @@ -71,9 +40,9 @@ FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameter | @@ -71,9 +40,9 @@ FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameter | ||
| 71 | 40 | ||
| 72 | @return A serialized request. | 41 | @return A serialized request. |
| 73 | */ | 42 | */ |
| 74 | -- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request | ||
| 75 | - withParameters:(nullable id)parameters | ||
| 76 | - error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; | 43 | +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request |
| 44 | + withParameters:(id)parameters | ||
| 45 | + error:(NSError * __autoreleasing *)error; | ||
| 77 | 46 | ||
| 78 | @end | 47 | @end |
| 79 | 48 | ||
| @@ -154,7 +123,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { | @@ -154,7 +123,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { | ||
| 154 | 123 | ||
| 155 | @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`. | 124 | @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`. |
| 156 | */ | 125 | */ |
| 157 | -@property (readonly, nonatomic, strong) NSDictionary <NSString *, NSString *> *HTTPRequestHeaders; | 126 | +@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; |
| 158 | 127 | ||
| 159 | /** | 128 | /** |
| 160 | Creates and returns a serializer with default configuration. | 129 | Creates and returns a serializer with default configuration. |
| @@ -167,7 +136,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { | @@ -167,7 +136,7 @@ typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { | ||
| 167 | @param field The HTTP header to set a default value for | 136 | @param field The HTTP header to set a default value for |
| 168 | @param value The value set as default for the specified header, or `nil` | 137 | @param value The value set as default for the specified header, or `nil` |
| 169 | */ | 138 | */ |
| 170 | -- (void)setValue:(nullable NSString *)value | 139 | +- (void)setValue:(NSString *)value |
| 171 | forHTTPHeaderField:(NSString *)field; | 140 | forHTTPHeaderField:(NSString *)field; |
| 172 | 141 | ||
| 173 | /** | 142 | /** |
| @@ -177,7 +146,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -177,7 +146,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 177 | 146 | ||
| 178 | @return The value set as default for the specified header, or `nil` | 147 | @return The value set as default for the specified header, or `nil` |
| 179 | */ | 148 | */ |
| 180 | -- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; | 149 | +- (NSString *)valueForHTTPHeaderField:(NSString *)field; |
| 181 | 150 | ||
| 182 | /** | 151 | /** |
| 183 | Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. | 152 | Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. |
| @@ -189,6 +158,12 @@ forHTTPHeaderField:(NSString *)field; | @@ -189,6 +158,12 @@ forHTTPHeaderField:(NSString *)field; | ||
| 189 | password:(NSString *)password; | 158 | password:(NSString *)password; |
| 190 | 159 | ||
| 191 | /** | 160 | /** |
| 161 | + @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead. | ||
| 162 | + */ | ||
| 163 | +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE; | ||
| 164 | + | ||
| 165 | + | ||
| 166 | +/** | ||
| 192 | Clears any existing value for the "Authorization" HTTP header. | 167 | Clears any existing value for the "Authorization" HTTP header. |
| 193 | */ | 168 | */ |
| 194 | - (void)clearAuthorizationHeader; | 169 | - (void)clearAuthorizationHeader; |
| @@ -200,7 +175,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -200,7 +175,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 200 | /** | 175 | /** |
| 201 | HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. | 176 | HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. |
| 202 | */ | 177 | */ |
| 203 | -@property (nonatomic, strong) NSSet <NSString *> *HTTPMethodsEncodingParametersInURI; | 178 | +@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; |
| 204 | 179 | ||
| 205 | /** | 180 | /** |
| 206 | Set the method of query string serialization according to one of the pre-defined styles. | 181 | Set the method of query string serialization according to one of the pre-defined styles. |
| @@ -216,13 +191,20 @@ forHTTPHeaderField:(NSString *)field; | @@ -216,13 +191,20 @@ forHTTPHeaderField:(NSString *)field; | ||
| 216 | 191 | ||
| 217 | @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. | 192 | @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. |
| 218 | */ | 193 | */ |
| 219 | -- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; | 194 | +- (void)setQueryStringSerializationWithBlock:(NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; |
| 220 | 195 | ||
| 221 | ///------------------------------- | 196 | ///------------------------------- |
| 222 | /// @name Creating Request Objects | 197 | /// @name Creating Request Objects |
| 223 | ///------------------------------- | 198 | ///------------------------------- |
| 224 | 199 | ||
| 225 | /** | 200 | /** |
| 201 | + @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead. | ||
| 202 | + */ | ||
| 203 | +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method | ||
| 204 | + URLString:(NSString *)URLString | ||
| 205 | + parameters:(id)parameters DEPRECATED_ATTRIBUTE; | ||
| 206 | + | ||
| 207 | +/** | ||
| 226 | Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. | 208 | Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. |
| 227 | 209 | ||
| 228 | If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. | 210 | If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. |
| @@ -236,8 +218,16 @@ forHTTPHeaderField:(NSString *)field; | @@ -236,8 +218,16 @@ forHTTPHeaderField:(NSString *)field; | ||
| 236 | */ | 218 | */ |
| 237 | - (NSMutableURLRequest *)requestWithMethod:(NSString *)method | 219 | - (NSMutableURLRequest *)requestWithMethod:(NSString *)method |
| 238 | URLString:(NSString *)URLString | 220 | URLString:(NSString *)URLString |
| 239 | - parameters:(nullable id)parameters | ||
| 240 | - error:(NSError * _Nullable __autoreleasing *)error; | 221 | + parameters:(id)parameters |
| 222 | + error:(NSError * __autoreleasing *)error; | ||
| 223 | + | ||
| 224 | +/** | ||
| 225 | + @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead. | ||
| 226 | + */ | ||
| 227 | +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method | ||
| 228 | + URLString:(NSString *)URLString | ||
| 229 | + parameters:(NSDictionary *)parameters | ||
| 230 | + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block DEPRECATED_ATTRIBUTE; | ||
| 241 | 231 | ||
| 242 | /** | 232 | /** |
| 243 | Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 | 233 | Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 |
| @@ -254,9 +244,9 @@ forHTTPHeaderField:(NSString *)field; | @@ -254,9 +244,9 @@ forHTTPHeaderField:(NSString *)field; | ||
| 254 | */ | 244 | */ |
| 255 | - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method | 245 | - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method |
| 256 | URLString:(NSString *)URLString | 246 | URLString:(NSString *)URLString |
| 257 | - parameters:(nullable NSDictionary <NSString *, id> *)parameters | ||
| 258 | - constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block | ||
| 259 | - error:(NSError * _Nullable __autoreleasing *)error; | 247 | + parameters:(NSDictionary *)parameters |
| 248 | + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block | ||
| 249 | + error:(NSError * __autoreleasing *)error; | ||
| 260 | 250 | ||
| 261 | /** | 251 | /** |
| 262 | Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. | 252 | Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. |
| @@ -271,7 +261,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -271,7 +261,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 271 | */ | 261 | */ |
| 272 | - (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request | 262 | - (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request |
| 273 | writingStreamContentsToFile:(NSURL *)fileURL | 263 | writingStreamContentsToFile:(NSURL *)fileURL |
| 274 | - completionHandler:(nullable void (^)(NSError * _Nullable error))handler; | 264 | + completionHandler:(void (^)(NSError *error))handler; |
| 275 | 265 | ||
| 276 | @end | 266 | @end |
| 277 | 267 | ||
| @@ -295,7 +285,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -295,7 +285,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 295 | */ | 285 | */ |
| 296 | - (BOOL)appendPartWithFileURL:(NSURL *)fileURL | 286 | - (BOOL)appendPartWithFileURL:(NSURL *)fileURL |
| 297 | name:(NSString *)name | 287 | name:(NSString *)name |
| 298 | - error:(NSError * _Nullable __autoreleasing *)error; | 288 | + error:(NSError * __autoreleasing *)error; |
| 299 | 289 | ||
| 300 | /** | 290 | /** |
| 301 | Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. | 291 | Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. |
| @@ -312,7 +302,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -312,7 +302,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 312 | name:(NSString *)name | 302 | name:(NSString *)name |
| 313 | fileName:(NSString *)fileName | 303 | fileName:(NSString *)fileName |
| 314 | mimeType:(NSString *)mimeType | 304 | mimeType:(NSString *)mimeType |
| 315 | - error:(NSError * _Nullable __autoreleasing *)error; | 305 | + error:(NSError * __autoreleasing *)error; |
| 316 | 306 | ||
| 317 | /** | 307 | /** |
| 318 | Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. | 308 | Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. |
| @@ -323,7 +313,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -323,7 +313,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 323 | @param length The length of the specified input stream in bytes. | 313 | @param length The length of the specified input stream in bytes. |
| 324 | @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. | 314 | @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. |
| 325 | */ | 315 | */ |
| 326 | -- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream | 316 | +- (void)appendPartWithInputStream:(NSInputStream *)inputStream |
| 327 | name:(NSString *)name | 317 | name:(NSString *)name |
| 328 | fileName:(NSString *)fileName | 318 | fileName:(NSString *)fileName |
| 329 | length:(int64_t)length | 319 | length:(int64_t)length |
| @@ -359,7 +349,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -359,7 +349,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 359 | @param headers The HTTP headers to be appended to the form data. | 349 | @param headers The HTTP headers to be appended to the form data. |
| 360 | @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. | 350 | @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. |
| 361 | */ | 351 | */ |
| 362 | -- (void)appendPartWithHeaders:(nullable NSDictionary <NSString *, NSString *> *)headers | 352 | +- (void)appendPartWithHeaders:(NSDictionary *)headers |
| 363 | body:(NSData *)body; | 353 | body:(NSData *)body; |
| 364 | 354 | ||
| 365 | /** | 355 | /** |
| @@ -444,7 +434,7 @@ forHTTPHeaderField:(NSString *)field; | @@ -444,7 +434,7 @@ forHTTPHeaderField:(NSString *)field; | ||
| 444 | `AFURLRequestSerializationErrorDomain` | 434 | `AFURLRequestSerializationErrorDomain` |
| 445 | AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. | 435 | AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. |
| 446 | */ | 436 | */ |
| 447 | -FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; | 437 | +extern NSString * const AFURLRequestSerializationErrorDomain; |
| 448 | 438 | ||
| 449 | /** | 439 | /** |
| 450 | ## User info dictionary keys | 440 | ## User info dictionary keys |
| @@ -458,7 +448,7 @@ FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; | @@ -458,7 +448,7 @@ FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; | ||
| 458 | `AFNetworkingOperationFailingURLRequestErrorKey` | 448 | `AFNetworkingOperationFailingURLRequestErrorKey` |
| 459 | The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. | 449 | The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. |
| 460 | */ | 450 | */ |
| 461 | -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey; | 451 | +extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; |
| 462 | 452 | ||
| 463 | /** | 453 | /** |
| 464 | ## Throttling Bandwidth for HTTP Request Input Streams | 454 | ## Throttling Bandwidth for HTTP Request Input Streams |
| @@ -473,7 +463,5 @@ FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKe | @@ -473,7 +463,5 @@ FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKe | ||
| 473 | `kAFUploadStream3GSuggestedDelay` | 463 | `kAFUploadStream3GSuggestedDelay` |
| 474 | Duration of delay each time a packet is read. Equal to 0.2 seconds. | 464 | Duration of delay each time a packet is read. Equal to 0.2 seconds. |
| 475 | */ | 465 | */ |
| 476 | -FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize; | ||
| 477 | -FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay; | ||
| 478 | - | ||
| 479 | -NS_ASSUME_NONNULL_END | 466 | +extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; |
| 467 | +extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFURLRequestSerialization.m
| 1 | // AFURLRequestSerialization.m | 1 | // AFURLRequestSerialization.m |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | 21 | ||
| 22 | #import "AFURLRequestSerialization.h" | 22 | #import "AFURLRequestSerialization.h" |
| 23 | 23 | ||
| 24 | -#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV | 24 | +#if __IPHONE_OS_VERSION_MIN_REQUIRED |
| 25 | #import <MobileCoreServices/MobileCoreServices.h> | 25 | #import <MobileCoreServices/MobileCoreServices.h> |
| 26 | #else | 26 | #else |
| 27 | #import <CoreServices/CoreServices.h> | 27 | #import <CoreServices/CoreServices.h> |
| @@ -32,48 +32,45 @@ NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofir | @@ -32,48 +32,45 @@ NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofir | ||
| 32 | 32 | ||
| 33 | typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); | 33 | typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); |
| 34 | 34 | ||
| 35 | -/** | ||
| 36 | - Returns a percent-escaped string following RFC 3986 for a query string key or value. | ||
| 37 | - RFC 3986 states that the following characters are "reserved" characters. | ||
| 38 | - - General Delimiters: ":", "#", "[", "]", "@", "?", "/" | ||
| 39 | - - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" | 35 | +static NSString * AFBase64EncodedStringFromString(NSString *string) { |
| 36 | + NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; | ||
| 37 | + NSUInteger length = [data length]; | ||
| 38 | + NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; | ||
| 40 | 39 | ||
| 41 | - In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow | ||
| 42 | - query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" | ||
| 43 | - should be percent-escaped in the query string. | ||
| 44 | - - parameter string: The string to be percent-escaped. | ||
| 45 | - - returns: The percent-escaped string. | ||
| 46 | - */ | ||
| 47 | -NSString * AFPercentEscapedStringFromString(NSString *string) { | ||
| 48 | - static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4 | ||
| 49 | - static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;="; | 40 | + uint8_t *input = (uint8_t *)[data bytes]; |
| 41 | + uint8_t *output = (uint8_t *)[mutableData mutableBytes]; | ||
| 50 | 42 | ||
| 51 | - NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; | ||
| 52 | - [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]]; | ||
| 53 | - | ||
| 54 | - // FIXME: https://github.com/AFNetworking/AFNetworking/pull/3028 | ||
| 55 | - // return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; | 43 | + for (NSUInteger i = 0; i < length; i += 3) { |
| 44 | + NSUInteger value = 0; | ||
| 45 | + for (NSUInteger j = i; j < (i + 3); j++) { | ||
| 46 | + value <<= 8; | ||
| 47 | + if (j < length) { | ||
| 48 | + value |= (0xFF & input[j]); | ||
| 49 | + } | ||
| 50 | + } | ||
| 56 | 51 | ||
| 57 | - static NSUInteger const batchSize = 50; | 52 | + static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
| 58 | 53 | ||
| 59 | - NSUInteger index = 0; | ||
| 60 | - NSMutableString *escaped = @"".mutableCopy; | 54 | + NSUInteger idx = (i / 3) * 4; |
| 55 | + output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; | ||
| 56 | + output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; | ||
| 57 | + output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; | ||
| 58 | + output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; | ||
| 59 | + } | ||
| 61 | 60 | ||
| 62 | - while (index < string.length) { | ||
| 63 | - NSUInteger length = MIN(string.length - index, batchSize); | ||
| 64 | - NSRange range = NSMakeRange(index, length); | 61 | + return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; |
| 62 | +} | ||
| 65 | 63 | ||
| 66 | - // To avoid breaking up character sequences such as 👴🏻👮🏽 | ||
| 67 | - range = [string rangeOfComposedCharacterSequencesForRange:range]; | 64 | +static NSString * const kAFCharactersToBeEscapedInQueryString = @":/?&=;+!@#$()',*"; |
| 68 | 65 | ||
| 69 | - NSString *substring = [string substringWithRange:range]; | ||
| 70 | - NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; | ||
| 71 | - [escaped appendString:encoded]; | 66 | +static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { |
| 67 | + static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[]."; | ||
| 72 | 68 | ||
| 73 | - index += range.length; | ||
| 74 | - } | 69 | + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescapedInQueryStringPairKey, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); |
| 70 | +} | ||
| 75 | 71 | ||
| 76 | - return escaped; | 72 | +static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { |
| 73 | + return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); | ||
| 77 | } | 74 | } |
| 78 | 75 | ||
| 79 | #pragma mark - | 76 | #pragma mark - |
| @@ -82,14 +79,14 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | @@ -82,14 +79,14 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | ||
| 82 | @property (readwrite, nonatomic, strong) id field; | 79 | @property (readwrite, nonatomic, strong) id field; |
| 83 | @property (readwrite, nonatomic, strong) id value; | 80 | @property (readwrite, nonatomic, strong) id value; |
| 84 | 81 | ||
| 85 | -- (instancetype)initWithField:(id)field value:(id)value; | 82 | +- (id)initWithField:(id)field value:(id)value; |
| 86 | 83 | ||
| 87 | -- (NSString *)URLEncodedStringValue; | 84 | +- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; |
| 88 | @end | 85 | @end |
| 89 | 86 | ||
| 90 | @implementation AFQueryStringPair | 87 | @implementation AFQueryStringPair |
| 91 | 88 | ||
| 92 | -- (instancetype)initWithField:(id)field value:(id)value { | 89 | +- (id)initWithField:(id)field value:(id)value { |
| 93 | self = [super init]; | 90 | self = [super init]; |
| 94 | if (!self) { | 91 | if (!self) { |
| 95 | return nil; | 92 | return nil; |
| @@ -101,11 +98,11 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | @@ -101,11 +98,11 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | ||
| 101 | return self; | 98 | return self; |
| 102 | } | 99 | } |
| 103 | 100 | ||
| 104 | -- (NSString *)URLEncodedStringValue { | 101 | +- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { |
| 105 | if (!self.value || [self.value isEqual:[NSNull null]]) { | 102 | if (!self.value || [self.value isEqual:[NSNull null]]) { |
| 106 | - return AFPercentEscapedStringFromString([self.field description]); | 103 | + return AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding); |
| 107 | } else { | 104 | } else { |
| 108 | - return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])]; | 105 | + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringValueFromStringWithEncoding([self.value description], stringEncoding)]; |
| 109 | } | 106 | } |
| 110 | } | 107 | } |
| 111 | 108 | ||
| @@ -113,13 +110,13 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | @@ -113,13 +110,13 @@ NSString * AFPercentEscapedStringFromString(NSString *string) { | ||
| 113 | 110 | ||
| 114 | #pragma mark - | 111 | #pragma mark - |
| 115 | 112 | ||
| 116 | -FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); | ||
| 117 | -FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); | 113 | +extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); |
| 114 | +extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); | ||
| 118 | 115 | ||
| 119 | -NSString * AFQueryStringFromParameters(NSDictionary *parameters) { | 116 | +static NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) { |
| 120 | NSMutableArray *mutablePairs = [NSMutableArray array]; | 117 | NSMutableArray *mutablePairs = [NSMutableArray array]; |
| 121 | for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { | 118 | for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { |
| 122 | - [mutablePairs addObject:[pair URLEncodedStringValue]]; | 119 | + [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]]; |
| 123 | } | 120 | } |
| 124 | 121 | ||
| 125 | return [mutablePairs componentsJoinedByString:@"&"]; | 122 | return [mutablePairs componentsJoinedByString:@"&"]; |
| @@ -138,7 +135,7 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { | @@ -138,7 +135,7 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { | ||
| 138 | NSDictionary *dictionary = value; | 135 | NSDictionary *dictionary = value; |
| 139 | // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries | 136 | // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries |
| 140 | for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { | 137 | for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { |
| 141 | - id nestedValue = dictionary[nestedKey]; | 138 | + id nestedValue = [dictionary objectForKey:nestedKey]; |
| 142 | if (nestedValue) { | 139 | if (nestedValue) { |
| 143 | [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; | 140 | [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; |
| 144 | } | 141 | } |
| @@ -186,7 +183,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | @@ -186,7 +183,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | ||
| 186 | @interface AFHTTPRequestSerializer () | 183 | @interface AFHTTPRequestSerializer () |
| 187 | @property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths; | 184 | @property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths; |
| 188 | @property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders; | 185 | @property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders; |
| 189 | -@property (readwrite, nonatomic, strong) dispatch_queue_t requestHeaderModificationQueue; | ||
| 190 | @property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle; | 186 | @property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle; |
| 191 | @property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization; | 187 | @property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization; |
| 192 | @end | 188 | @end |
| @@ -206,7 +202,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | @@ -206,7 +202,6 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | ||
| 206 | self.stringEncoding = NSUTF8StringEncoding; | 202 | self.stringEncoding = NSUTF8StringEncoding; |
| 207 | 203 | ||
| 208 | self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary]; | 204 | self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary]; |
| 209 | - self.requestHeaderModificationQueue = dispatch_queue_create("requestHeaderModificationQueue", DISPATCH_QUEUE_CONCURRENT); | ||
| 210 | 205 | ||
| 211 | // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 | 206 | // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 |
| 212 | NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; | 207 | NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; |
| @@ -218,15 +213,15 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | @@ -218,15 +213,15 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | ||
| 218 | [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"]; | 213 | [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"]; |
| 219 | 214 | ||
| 220 | NSString *userAgent = nil; | 215 | NSString *userAgent = nil; |
| 221 | -#if TARGET_OS_IOS | ||
| 222 | - // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 | ||
| 223 | - userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; | ||
| 224 | -#elif TARGET_OS_WATCH | 216 | +#pragma clang diagnostic push |
| 217 | +#pragma clang diagnostic ignored "-Wgnu" | ||
| 218 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) | ||
| 225 | // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 | 219 | // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 |
| 226 | - userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]]; | 220 | + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; |
| 227 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) | 221 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) |
| 228 | - userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; | 222 | + userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; |
| 229 | #endif | 223 | #endif |
| 224 | +#pragma clang diagnostic pop | ||
| 230 | if (userAgent) { | 225 | if (userAgent) { |
| 231 | if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) { | 226 | if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) { |
| 232 | NSMutableString *mutableUserAgent = [userAgent mutableCopy]; | 227 | NSMutableString *mutableUserAgent = [userAgent mutableCopy]; |
| @@ -302,41 +297,32 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | @@ -302,41 +297,32 @@ static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerOb | ||
| 302 | #pragma mark - | 297 | #pragma mark - |
| 303 | 298 | ||
| 304 | - (NSDictionary *)HTTPRequestHeaders { | 299 | - (NSDictionary *)HTTPRequestHeaders { |
| 305 | - NSDictionary __block *value; | ||
| 306 | - dispatch_sync(self.requestHeaderModificationQueue, ^{ | ||
| 307 | - value = [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders]; | ||
| 308 | - }); | ||
| 309 | - return value; | 300 | + return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders]; |
| 310 | } | 301 | } |
| 311 | 302 | ||
| 312 | - (void)setValue:(NSString *)value | 303 | - (void)setValue:(NSString *)value |
| 313 | forHTTPHeaderField:(NSString *)field | 304 | forHTTPHeaderField:(NSString *)field |
| 314 | { | 305 | { |
| 315 | - dispatch_barrier_async(self.requestHeaderModificationQueue, ^{ | ||
| 316 | - [self.mutableHTTPRequestHeaders setValue:value forKey:field]; | ||
| 317 | - }); | 306 | + [self.mutableHTTPRequestHeaders setValue:value forKey:field]; |
| 318 | } | 307 | } |
| 319 | 308 | ||
| 320 | - (NSString *)valueForHTTPHeaderField:(NSString *)field { | 309 | - (NSString *)valueForHTTPHeaderField:(NSString *)field { |
| 321 | - NSString __block *value; | ||
| 322 | - dispatch_sync(self.requestHeaderModificationQueue, ^{ | ||
| 323 | - value = [self.mutableHTTPRequestHeaders valueForKey:field]; | ||
| 324 | - }); | ||
| 325 | - return value; | 310 | + return [self.mutableHTTPRequestHeaders valueForKey:field]; |
| 326 | } | 311 | } |
| 327 | 312 | ||
| 328 | - (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username | 313 | - (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username |
| 329 | password:(NSString *)password | 314 | password:(NSString *)password |
| 330 | { | 315 | { |
| 331 | - NSData *basicAuthCredentials = [[NSString stringWithFormat:@"%@:%@", username, password] dataUsingEncoding:NSUTF8StringEncoding]; | ||
| 332 | - NSString *base64AuthCredentials = [basicAuthCredentials base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0]; | ||
| 333 | - [self setValue:[NSString stringWithFormat:@"Basic %@", base64AuthCredentials] forHTTPHeaderField:@"Authorization"]; | 316 | + NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; |
| 317 | + [self setValue:[NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)] forHTTPHeaderField:@"Authorization"]; | ||
| 318 | +} | ||
| 319 | + | ||
| 320 | +- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token { | ||
| 321 | + [self setValue:[NSString stringWithFormat:@"Token token=\"%@\"", token] forHTTPHeaderField:@"Authorization"]; | ||
| 334 | } | 322 | } |
| 335 | 323 | ||
| 336 | - (void)clearAuthorizationHeader { | 324 | - (void)clearAuthorizationHeader { |
| 337 | - dispatch_barrier_async(self.requestHeaderModificationQueue, ^{ | ||
| 338 | - [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"]; | ||
| 339 | - }); | 325 | + [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"]; |
| 340 | } | 326 | } |
| 341 | 327 | ||
| 342 | #pragma mark - | 328 | #pragma mark - |
| @@ -355,6 +341,13 @@ forHTTPHeaderField:(NSString *)field | @@ -355,6 +341,13 @@ forHTTPHeaderField:(NSString *)field | ||
| 355 | - (NSMutableURLRequest *)requestWithMethod:(NSString *)method | 341 | - (NSMutableURLRequest *)requestWithMethod:(NSString *)method |
| 356 | URLString:(NSString *)URLString | 342 | URLString:(NSString *)URLString |
| 357 | parameters:(id)parameters | 343 | parameters:(id)parameters |
| 344 | +{ | ||
| 345 | + return [self requestWithMethod:method URLString:URLString parameters:parameters error:nil]; | ||
| 346 | +} | ||
| 347 | + | ||
| 348 | +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method | ||
| 349 | + URLString:(NSString *)URLString | ||
| 350 | + parameters:(id)parameters | ||
| 358 | error:(NSError *__autoreleasing *)error | 351 | error:(NSError *__autoreleasing *)error |
| 359 | { | 352 | { |
| 360 | NSParameterAssert(method); | 353 | NSParameterAssert(method); |
| @@ -382,6 +375,14 @@ forHTTPHeaderField:(NSString *)field | @@ -382,6 +375,14 @@ forHTTPHeaderField:(NSString *)field | ||
| 382 | URLString:(NSString *)URLString | 375 | URLString:(NSString *)URLString |
| 383 | parameters:(NSDictionary *)parameters | 376 | parameters:(NSDictionary *)parameters |
| 384 | constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block | 377 | constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block |
| 378 | +{ | ||
| 379 | + return [self multipartFormRequestWithMethod:method URLString:URLString parameters:parameters constructingBodyWithBlock:block error:nil]; | ||
| 380 | +} | ||
| 381 | + | ||
| 382 | +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method | ||
| 383 | + URLString:(NSString *)URLString | ||
| 384 | + parameters:(NSDictionary *)parameters | ||
| 385 | + constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block | ||
| 385 | error:(NSError *__autoreleasing *)error | 386 | error:(NSError *__autoreleasing *)error |
| 386 | { | 387 | { |
| 387 | NSParameterAssert(method); | 388 | NSParameterAssert(method); |
| @@ -485,8 +486,8 @@ forHTTPHeaderField:(NSString *)field | @@ -485,8 +486,8 @@ forHTTPHeaderField:(NSString *)field | ||
| 485 | } | 486 | } |
| 486 | }]; | 487 | }]; |
| 487 | 488 | ||
| 488 | - NSString *query = nil; | ||
| 489 | if (parameters) { | 489 | if (parameters) { |
| 490 | + NSString *query = nil; | ||
| 490 | if (self.queryStringSerialization) { | 491 | if (self.queryStringSerialization) { |
| 491 | NSError *serializationError; | 492 | NSError *serializationError; |
| 492 | query = self.queryStringSerialization(request, parameters, &serializationError); | 493 | query = self.queryStringSerialization(request, parameters, &serializationError); |
| @@ -501,25 +502,19 @@ forHTTPHeaderField:(NSString *)field | @@ -501,25 +502,19 @@ forHTTPHeaderField:(NSString *)field | ||
| 501 | } else { | 502 | } else { |
| 502 | switch (self.queryStringSerializationStyle) { | 503 | switch (self.queryStringSerializationStyle) { |
| 503 | case AFHTTPRequestQueryStringDefaultStyle: | 504 | case AFHTTPRequestQueryStringDefaultStyle: |
| 504 | - query = AFQueryStringFromParameters(parameters); | 505 | + query = AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding); |
| 505 | break; | 506 | break; |
| 506 | } | 507 | } |
| 507 | } | 508 | } |
| 508 | - } | ||
| 509 | 509 | ||
| 510 | - if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { | ||
| 511 | - if (query && query.length > 0) { | 510 | + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { |
| 512 | mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; | 511 | mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; |
| 512 | + } else { | ||
| 513 | + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { | ||
| 514 | + [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; | ||
| 515 | + } | ||
| 516 | + [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; | ||
| 513 | } | 517 | } |
| 514 | - } else { | ||
| 515 | - // #2864: an empty string is a valid x-www-form-urlencoded payload | ||
| 516 | - if (!query) { | ||
| 517 | - query = @""; | ||
| 518 | - } | ||
| 519 | - if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { | ||
| 520 | - [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; | ||
| 521 | - } | ||
| 522 | - [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; | ||
| 523 | } | 518 | } |
| 524 | 519 | ||
| 525 | return mutableRequest; | 520 | return mutableRequest; |
| @@ -555,32 +550,28 @@ forHTTPHeaderField:(NSString *)field | @@ -555,32 +550,28 @@ forHTTPHeaderField:(NSString *)field | ||
| 555 | return YES; | 550 | return YES; |
| 556 | } | 551 | } |
| 557 | 552 | ||
| 558 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 553 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 559 | self = [self init]; | 554 | self = [self init]; |
| 560 | if (!self) { | 555 | if (!self) { |
| 561 | return nil; | 556 | return nil; |
| 562 | } | 557 | } |
| 563 | 558 | ||
| 564 | self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; | 559 | self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; |
| 565 | - self.queryStringSerializationStyle = (AFHTTPRequestQueryStringSerializationStyle)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; | 560 | + self.queryStringSerializationStyle = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; |
| 566 | 561 | ||
| 567 | return self; | 562 | return self; |
| 568 | } | 563 | } |
| 569 | 564 | ||
| 570 | - (void)encodeWithCoder:(NSCoder *)coder { | 565 | - (void)encodeWithCoder:(NSCoder *)coder { |
| 571 | - dispatch_sync(self.requestHeaderModificationQueue, ^{ | ||
| 572 | - [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))]; | ||
| 573 | - }); | 566 | + [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))]; |
| 574 | [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))]; | 567 | [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))]; |
| 575 | } | 568 | } |
| 576 | 569 | ||
| 577 | #pragma mark - NSCopying | 570 | #pragma mark - NSCopying |
| 578 | 571 | ||
| 579 | -- (instancetype)copyWithZone:(NSZone *)zone { | 572 | +- (id)copyWithZone:(NSZone *)zone { |
| 580 | AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; | 573 | AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; |
| 581 | - dispatch_sync(self.requestHeaderModificationQueue, ^{ | ||
| 582 | - serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; | ||
| 583 | - }); | 574 | + serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; |
| 584 | serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; | 575 | serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; |
| 585 | serializer.queryStringSerialization = self.queryStringSerialization; | 576 | serializer.queryStringSerialization = self.queryStringSerialization; |
| 586 | 577 | ||
| @@ -610,6 +601,7 @@ static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) { | @@ -610,6 +601,7 @@ static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) { | ||
| 610 | } | 601 | } |
| 611 | 602 | ||
| 612 | static inline NSString * AFContentTypeForPathExtension(NSString *extension) { | 603 | static inline NSString * AFContentTypeForPathExtension(NSString *extension) { |
| 604 | +#ifdef __UTTYPE__ | ||
| 613 | NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); | 605 | NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); |
| 614 | NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); | 606 | NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); |
| 615 | if (!contentType) { | 607 | if (!contentType) { |
| @@ -617,6 +609,10 @@ static inline NSString * AFContentTypeForPathExtension(NSString *extension) { | @@ -617,6 +609,10 @@ static inline NSString * AFContentTypeForPathExtension(NSString *extension) { | ||
| 617 | } else { | 609 | } else { |
| 618 | return contentType; | 610 | return contentType; |
| 619 | } | 611 | } |
| 612 | +#else | ||
| 613 | +#pragma unused (extension) | ||
| 614 | + return @"application/octet-stream"; | ||
| 615 | +#endif | ||
| 620 | } | 616 | } |
| 621 | 617 | ||
| 622 | NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; | 618 | NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; |
| @@ -647,7 +643,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -647,7 +643,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 647 | @property (readonly, nonatomic, assign) unsigned long long contentLength; | 643 | @property (readonly, nonatomic, assign) unsigned long long contentLength; |
| 648 | @property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; | 644 | @property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; |
| 649 | 645 | ||
| 650 | -- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding; | 646 | +- (id)initWithStringEncoding:(NSStringEncoding)encoding; |
| 651 | - (void)setInitialAndFinalBoundaries; | 647 | - (void)setInitialAndFinalBoundaries; |
| 652 | - (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; | 648 | - (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; |
| 653 | @end | 649 | @end |
| @@ -663,8 +659,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -663,8 +659,8 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 663 | 659 | ||
| 664 | @implementation AFStreamingMultipartFormData | 660 | @implementation AFStreamingMultipartFormData |
| 665 | 661 | ||
| 666 | -- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest | ||
| 667 | - stringEncoding:(NSStringEncoding)encoding | 662 | +- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest |
| 663 | + stringEncoding:(NSStringEncoding)encoding | ||
| 668 | { | 664 | { |
| 669 | self = [super init]; | 665 | self = [super init]; |
| 670 | if (!self) { | 666 | if (!self) { |
| @@ -733,7 +729,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -733,7 +729,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 733 | bodyPart.headers = mutableHeaders; | 729 | bodyPart.headers = mutableHeaders; |
| 734 | bodyPart.boundary = self.boundary; | 730 | bodyPart.boundary = self.boundary; |
| 735 | bodyPart.body = fileURL; | 731 | bodyPart.body = fileURL; |
| 736 | - bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue]; | 732 | + bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; |
| 737 | [self.bodyStream appendHTTPBodyPart:bodyPart]; | 733 | [self.bodyStream appendHTTPBodyPart:bodyPart]; |
| 738 | 734 | ||
| 739 | return YES; | 735 | return YES; |
| @@ -847,13 +843,16 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -847,13 +843,16 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 847 | @end | 843 | @end |
| 848 | 844 | ||
| 849 | @implementation AFMultipartBodyStream | 845 | @implementation AFMultipartBodyStream |
| 846 | +#pragma clang diagnostic push | ||
| 847 | +#pragma clang diagnostic ignored "-Wimplicit-atomic-properties" | ||
| 850 | #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100) | 848 | #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100) |
| 851 | @synthesize delegate; | 849 | @synthesize delegate; |
| 852 | #endif | 850 | #endif |
| 853 | @synthesize streamStatus; | 851 | @synthesize streamStatus; |
| 854 | @synthesize streamError; | 852 | @synthesize streamError; |
| 853 | +#pragma clang diagnostic pop | ||
| 855 | 854 | ||
| 856 | -- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding { | 855 | +- (id)initWithStringEncoding:(NSStringEncoding)encoding { |
| 857 | self = [super init]; | 856 | self = [super init]; |
| 858 | if (!self) { | 857 | if (!self) { |
| 859 | return nil; | 858 | return nil; |
| @@ -873,7 +872,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -873,7 +872,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 873 | bodyPart.hasFinalBoundary = NO; | 872 | bodyPart.hasFinalBoundary = NO; |
| 874 | } | 873 | } |
| 875 | 874 | ||
| 876 | - [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES]; | 875 | + [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES]; |
| 877 | [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; | 876 | [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; |
| 878 | } | 877 | } |
| 879 | } | 878 | } |
| @@ -897,13 +896,15 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -897,13 +896,15 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 897 | 896 | ||
| 898 | NSInteger totalNumberOfBytesRead = 0; | 897 | NSInteger totalNumberOfBytesRead = 0; |
| 899 | 898 | ||
| 899 | +#pragma clang diagnostic push | ||
| 900 | +#pragma clang diagnostic ignored "-Wgnu" | ||
| 900 | while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) { | 901 | while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) { |
| 901 | if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { | 902 | if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { |
| 902 | if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { | 903 | if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { |
| 903 | break; | 904 | break; |
| 904 | } | 905 | } |
| 905 | } else { | 906 | } else { |
| 906 | - NSUInteger maxLength = MIN(length, self.numberOfBytesInPacket) - (NSUInteger)totalNumberOfBytesRead; | 907 | + NSUInteger maxLength = length - (NSUInteger)totalNumberOfBytesRead; |
| 907 | NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; | 908 | NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; |
| 908 | if (numberOfBytesRead == -1) { | 909 | if (numberOfBytesRead == -1) { |
| 909 | self.streamError = self.currentHTTPBodyPart.inputStream.streamError; | 910 | self.streamError = self.currentHTTPBodyPart.inputStream.streamError; |
| @@ -917,6 +918,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -917,6 +918,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 917 | } | 918 | } |
| 918 | } | 919 | } |
| 919 | } | 920 | } |
| 921 | +#pragma clang diagnostic pop | ||
| 920 | 922 | ||
| 921 | return totalNumberOfBytesRead; | 923 | return totalNumberOfBytesRead; |
| 922 | } | 924 | } |
| @@ -993,7 +995,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | @@ -993,7 +995,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; | ||
| 993 | 995 | ||
| 994 | #pragma mark - NSCopying | 996 | #pragma mark - NSCopying |
| 995 | 997 | ||
| 996 | -- (instancetype)copyWithZone:(NSZone *)zone { | 998 | +-(id)copyWithZone:(NSZone *)zone { |
| 997 | AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; | 999 | AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; |
| 998 | 1000 | ||
| 999 | for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { | 1001 | for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { |
| @@ -1030,7 +1032,7 @@ typedef enum { | @@ -1030,7 +1032,7 @@ typedef enum { | ||
| 1030 | 1032 | ||
| 1031 | @implementation AFHTTPBodyPart | 1033 | @implementation AFHTTPBodyPart |
| 1032 | 1034 | ||
| 1033 | -- (instancetype)init { | 1035 | +- (id)init { |
| 1034 | self = [super init]; | 1036 | self = [super init]; |
| 1035 | if (!self) { | 1037 | if (!self) { |
| 1036 | return nil; | 1038 | return nil; |
| @@ -1097,6 +1099,8 @@ typedef enum { | @@ -1097,6 +1099,8 @@ typedef enum { | ||
| 1097 | return YES; | 1099 | return YES; |
| 1098 | } | 1100 | } |
| 1099 | 1101 | ||
| 1102 | +#pragma clang diagnostic push | ||
| 1103 | +#pragma clang diagnostic ignored "-Wcovered-switch-default" | ||
| 1100 | switch (self.inputStream.streamStatus) { | 1104 | switch (self.inputStream.streamStatus) { |
| 1101 | case NSStreamStatusNotOpen: | 1105 | case NSStreamStatusNotOpen: |
| 1102 | case NSStreamStatusOpening: | 1106 | case NSStreamStatusOpening: |
| @@ -1110,6 +1114,7 @@ typedef enum { | @@ -1110,6 +1114,7 @@ typedef enum { | ||
| 1110 | default: | 1114 | default: |
| 1111 | return NO; | 1115 | return NO; |
| 1112 | } | 1116 | } |
| 1117 | +#pragma clang diagnostic pop | ||
| 1113 | } | 1118 | } |
| 1114 | 1119 | ||
| 1115 | - (NSInteger)read:(uint8_t *)buffer | 1120 | - (NSInteger)read:(uint8_t *)buffer |
| @@ -1154,8 +1159,11 @@ typedef enum { | @@ -1154,8 +1159,11 @@ typedef enum { | ||
| 1154 | intoBuffer:(uint8_t *)buffer | 1159 | intoBuffer:(uint8_t *)buffer |
| 1155 | maxLength:(NSUInteger)length | 1160 | maxLength:(NSUInteger)length |
| 1156 | { | 1161 | { |
| 1162 | +#pragma clang diagnostic push | ||
| 1163 | +#pragma clang diagnostic ignored "-Wgnu" | ||
| 1157 | NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); | 1164 | NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); |
| 1158 | [data getBytes:buffer range:range]; | 1165 | [data getBytes:buffer range:range]; |
| 1166 | +#pragma clang diagnostic pop | ||
| 1159 | 1167 | ||
| 1160 | _phaseReadOffset += range.length; | 1168 | _phaseReadOffset += range.length; |
| 1161 | 1169 | ||
| @@ -1174,6 +1182,8 @@ typedef enum { | @@ -1174,6 +1182,8 @@ typedef enum { | ||
| 1174 | return YES; | 1182 | return YES; |
| 1175 | } | 1183 | } |
| 1176 | 1184 | ||
| 1185 | +#pragma clang diagnostic push | ||
| 1186 | +#pragma clang diagnostic ignored "-Wcovered-switch-default" | ||
| 1177 | switch (_phase) { | 1187 | switch (_phase) { |
| 1178 | case AFEncapsulationBoundaryPhase: | 1188 | case AFEncapsulationBoundaryPhase: |
| 1179 | _phase = AFHeaderPhase; | 1189 | _phase = AFHeaderPhase; |
| @@ -1193,13 +1203,14 @@ typedef enum { | @@ -1193,13 +1203,14 @@ typedef enum { | ||
| 1193 | break; | 1203 | break; |
| 1194 | } | 1204 | } |
| 1195 | _phaseReadOffset = 0; | 1205 | _phaseReadOffset = 0; |
| 1206 | +#pragma clang diagnostic pop | ||
| 1196 | 1207 | ||
| 1197 | return YES; | 1208 | return YES; |
| 1198 | } | 1209 | } |
| 1199 | 1210 | ||
| 1200 | #pragma mark - NSCopying | 1211 | #pragma mark - NSCopying |
| 1201 | 1212 | ||
| 1202 | -- (instancetype)copyWithZone:(NSZone *)zone { | 1213 | +- (id)copyWithZone:(NSZone *)zone { |
| 1203 | AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; | 1214 | AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; |
| 1204 | 1215 | ||
| 1205 | bodyPart.stringEncoding = self.stringEncoding; | 1216 | bodyPart.stringEncoding = self.stringEncoding; |
| @@ -1254,21 +1265,7 @@ typedef enum { | @@ -1254,21 +1265,7 @@ typedef enum { | ||
| 1254 | [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; | 1265 | [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; |
| 1255 | } | 1266 | } |
| 1256 | 1267 | ||
| 1257 | - if (![NSJSONSerialization isValidJSONObject:parameters]) { | ||
| 1258 | - if (error) { | ||
| 1259 | - NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"The `parameters` argument is not valid JSON.", @"AFNetworking", nil)}; | ||
| 1260 | - *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; | ||
| 1261 | - } | ||
| 1262 | - return nil; | ||
| 1263 | - } | ||
| 1264 | - | ||
| 1265 | - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]; | ||
| 1266 | - | ||
| 1267 | - if (!jsonData) { | ||
| 1268 | - return nil; | ||
| 1269 | - } | ||
| 1270 | - | ||
| 1271 | - [mutableRequest setHTTPBody:jsonData]; | 1268 | + [mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]]; |
| 1272 | } | 1269 | } |
| 1273 | 1270 | ||
| 1274 | return mutableRequest; | 1271 | return mutableRequest; |
| @@ -1276,7 +1273,7 @@ typedef enum { | @@ -1276,7 +1273,7 @@ typedef enum { | ||
| 1276 | 1273 | ||
| 1277 | #pragma mark - NSSecureCoding | 1274 | #pragma mark - NSSecureCoding |
| 1278 | 1275 | ||
| 1279 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 1276 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 1280 | self = [super initWithCoder:decoder]; | 1277 | self = [super initWithCoder:decoder]; |
| 1281 | if (!self) { | 1278 | if (!self) { |
| 1282 | return nil; | 1279 | return nil; |
| @@ -1295,7 +1292,7 @@ typedef enum { | @@ -1295,7 +1292,7 @@ typedef enum { | ||
| 1295 | 1292 | ||
| 1296 | #pragma mark - NSCopying | 1293 | #pragma mark - NSCopying |
| 1297 | 1294 | ||
| 1298 | -- (instancetype)copyWithZone:(NSZone *)zone { | 1295 | +- (id)copyWithZone:(NSZone *)zone { |
| 1299 | AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; | 1296 | AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; |
| 1300 | serializer.writingOptions = self.writingOptions; | 1297 | serializer.writingOptions = self.writingOptions; |
| 1301 | 1298 | ||
| @@ -1347,13 +1344,7 @@ typedef enum { | @@ -1347,13 +1344,7 @@ typedef enum { | ||
| 1347 | [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"]; | 1344 | [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"]; |
| 1348 | } | 1345 | } |
| 1349 | 1346 | ||
| 1350 | - NSData *plistData = [NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]; | ||
| 1351 | - | ||
| 1352 | - if (!plistData) { | ||
| 1353 | - return nil; | ||
| 1354 | - } | ||
| 1355 | - | ||
| 1356 | - [mutableRequest setHTTPBody:plistData]; | 1347 | + [mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]]; |
| 1357 | } | 1348 | } |
| 1358 | 1349 | ||
| 1359 | return mutableRequest; | 1350 | return mutableRequest; |
| @@ -1361,13 +1352,13 @@ typedef enum { | @@ -1361,13 +1352,13 @@ typedef enum { | ||
| 1361 | 1352 | ||
| 1362 | #pragma mark - NSSecureCoding | 1353 | #pragma mark - NSSecureCoding |
| 1363 | 1354 | ||
| 1364 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 1355 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 1365 | self = [super initWithCoder:decoder]; | 1356 | self = [super initWithCoder:decoder]; |
| 1366 | if (!self) { | 1357 | if (!self) { |
| 1367 | return nil; | 1358 | return nil; |
| 1368 | } | 1359 | } |
| 1369 | 1360 | ||
| 1370 | - self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; | 1361 | + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; |
| 1371 | self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; | 1362 | self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; |
| 1372 | 1363 | ||
| 1373 | return self; | 1364 | return self; |
| @@ -1382,7 +1373,7 @@ typedef enum { | @@ -1382,7 +1373,7 @@ typedef enum { | ||
| 1382 | 1373 | ||
| 1383 | #pragma mark - NSCopying | 1374 | #pragma mark - NSCopying |
| 1384 | 1375 | ||
| 1385 | -- (instancetype)copyWithZone:(NSZone *)zone { | 1376 | +- (id)copyWithZone:(NSZone *)zone { |
| 1386 | AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; | 1377 | AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; |
| 1387 | serializer.format = self.format; | 1378 | serializer.format = self.format; |
| 1388 | serializer.writeOptions = self.writeOptions; | 1379 | serializer.writeOptions = self.writeOptions; |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFURLResponseSerialization.h
| 1 | // AFURLResponseSerialization.h | 1 | // AFURLResponseSerialization.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -22,8 +22,6 @@ | @@ -22,8 +22,6 @@ | ||
| 22 | #import <Foundation/Foundation.h> | 22 | #import <Foundation/Foundation.h> |
| 23 | #import <CoreGraphics/CoreGraphics.h> | 23 | #import <CoreGraphics/CoreGraphics.h> |
| 24 | 24 | ||
| 25 | -NS_ASSUME_NONNULL_BEGIN | ||
| 26 | - | ||
| 27 | /** | 25 | /** |
| 28 | The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. | 26 | The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. |
| 29 | 27 | ||
| @@ -40,9 +38,9 @@ NS_ASSUME_NONNULL_BEGIN | @@ -40,9 +38,9 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 40 | 38 | ||
| 41 | @return The object decoded from the specified response data. | 39 | @return The object decoded from the specified response data. |
| 42 | */ | 40 | */ |
| 43 | -- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response | ||
| 44 | - data:(nullable NSData *)data | ||
| 45 | - error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; | 41 | +- (id)responseObjectForResponse:(NSURLResponse *)response |
| 42 | + data:(NSData *)data | ||
| 43 | + error:(NSError *__autoreleasing *)error; | ||
| 46 | 44 | ||
| 47 | @end | 45 | @end |
| 48 | 46 | ||
| @@ -55,9 +53,12 @@ NS_ASSUME_NONNULL_BEGIN | @@ -55,9 +53,12 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 55 | */ | 53 | */ |
| 56 | @interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization> | 54 | @interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization> |
| 57 | 55 | ||
| 58 | -- (instancetype)init; | 56 | +- (instancetype) init; |
| 59 | 57 | ||
| 60 | -@property (nonatomic, assign) NSStringEncoding stringEncoding DEPRECATED_MSG_ATTRIBUTE("The string encoding is never used. AFHTTPResponseSerializer only validates status codes and content types but does not try to decode the received data in any way."); | 58 | +/** |
| 59 | + The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default. | ||
| 60 | + */ | ||
| 61 | +@property (nonatomic, assign) NSStringEncoding stringEncoding; | ||
| 61 | 62 | ||
| 62 | /** | 63 | /** |
| 63 | Creates and returns a serializer with default configuration. | 64 | Creates and returns a serializer with default configuration. |
| @@ -73,12 +74,12 @@ NS_ASSUME_NONNULL_BEGIN | @@ -73,12 +74,12 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 73 | 74 | ||
| 74 | See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html | 75 | See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html |
| 75 | */ | 76 | */ |
| 76 | -@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes; | 77 | +@property (nonatomic, copy) NSIndexSet *acceptableStatusCodes; |
| 77 | 78 | ||
| 78 | /** | 79 | /** |
| 79 | The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. | 80 | The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. |
| 80 | */ | 81 | */ |
| 81 | -@property (nonatomic, copy, nullable) NSSet <NSString *> *acceptableContentTypes; | 82 | +@property (nonatomic, copy) NSSet *acceptableContentTypes; |
| 82 | 83 | ||
| 83 | /** | 84 | /** |
| 84 | Validates the specified response and data. | 85 | Validates the specified response and data. |
| @@ -91,9 +92,9 @@ NS_ASSUME_NONNULL_BEGIN | @@ -91,9 +92,9 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 91 | 92 | ||
| 92 | @return `YES` if the response is valid, otherwise `NO`. | 93 | @return `YES` if the response is valid, otherwise `NO`. |
| 93 | */ | 94 | */ |
| 94 | -- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response | ||
| 95 | - data:(nullable NSData *)data | ||
| 96 | - error:(NSError * _Nullable __autoreleasing *)error; | 95 | +- (BOOL)validateResponse:(NSHTTPURLResponse *)response |
| 96 | + data:(NSData *)data | ||
| 97 | + error:(NSError *__autoreleasing *)error; | ||
| 97 | 98 | ||
| 98 | @end | 99 | @end |
| 99 | 100 | ||
| @@ -111,7 +112,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -111,7 +112,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 111 | */ | 112 | */ |
| 112 | @interface AFJSONResponseSerializer : AFHTTPResponseSerializer | 113 | @interface AFJSONResponseSerializer : AFHTTPResponseSerializer |
| 113 | 114 | ||
| 114 | -- (instancetype)init; | 115 | +- (instancetype) init; |
| 115 | 116 | ||
| 116 | /** | 117 | /** |
| 117 | Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. | 118 | Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. |
| @@ -160,7 +161,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -160,7 +161,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 160 | */ | 161 | */ |
| 161 | @interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer | 162 | @interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer |
| 162 | 163 | ||
| 163 | -- (instancetype)init; | 164 | +- (instancetype) init; |
| 164 | 165 | ||
| 165 | /** | 166 | /** |
| 166 | Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. | 167 | Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. |
| @@ -189,7 +190,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -189,7 +190,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 189 | */ | 190 | */ |
| 190 | @interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer | 191 | @interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer |
| 191 | 192 | ||
| 192 | -- (instancetype)init; | 193 | +- (instancetype) init; |
| 193 | 194 | ||
| 194 | /** | 195 | /** |
| 195 | The property list format. Possible values are described in "NSPropertyListFormat". | 196 | The property list format. Possible values are described in "NSPropertyListFormat". |
| @@ -232,7 +233,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -232,7 +233,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 232 | */ | 233 | */ |
| 233 | @interface AFImageResponseSerializer : AFHTTPResponseSerializer | 234 | @interface AFImageResponseSerializer : AFHTTPResponseSerializer |
| 234 | 235 | ||
| 235 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 236 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 236 | /** | 237 | /** |
| 237 | The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. | 238 | The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. |
| 238 | */ | 239 | */ |
| @@ -256,14 +257,14 @@ NS_ASSUME_NONNULL_BEGIN | @@ -256,14 +257,14 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 256 | /** | 257 | /** |
| 257 | The component response serializers. | 258 | The component response serializers. |
| 258 | */ | 259 | */ |
| 259 | -@property (readonly, nonatomic, copy) NSArray <id<AFURLResponseSerialization>> *responseSerializers; | 260 | +@property (readonly, nonatomic, copy) NSArray *responseSerializers; |
| 260 | 261 | ||
| 261 | /** | 262 | /** |
| 262 | Creates and returns a compound serializer comprised of the specified response serializers. | 263 | Creates and returns a compound serializer comprised of the specified response serializers. |
| 263 | 264 | ||
| 264 | @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. | 265 | @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. |
| 265 | */ | 266 | */ |
| 266 | -+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray <id<AFURLResponseSerialization>> *)responseSerializers; | 267 | ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers; |
| 267 | 268 | ||
| 268 | @end | 269 | @end |
| 269 | 270 | ||
| @@ -283,7 +284,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -283,7 +284,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 283 | `AFURLResponseSerializationErrorDomain` | 284 | `AFURLResponseSerializationErrorDomain` |
| 284 | AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. | 285 | AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. |
| 285 | */ | 286 | */ |
| 286 | -FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain; | 287 | +extern NSString * const AFURLResponseSerializationErrorDomain; |
| 287 | 288 | ||
| 288 | /** | 289 | /** |
| 289 | ## User info dictionary keys | 290 | ## User info dictionary keys |
| @@ -301,8 +302,8 @@ FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain; | @@ -301,8 +302,8 @@ FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain; | ||
| 301 | `AFNetworkingOperationFailingURLResponseDataErrorKey` | 302 | `AFNetworkingOperationFailingURLResponseDataErrorKey` |
| 302 | The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. | 303 | The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. |
| 303 | */ | 304 | */ |
| 304 | -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey; | 305 | +extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey; |
| 306 | + | ||
| 307 | +extern NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; | ||
| 305 | 308 | ||
| 306 | -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; | ||
| 307 | 309 | ||
| 308 | -NS_ASSUME_NONNULL_END |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFURLResponseSerialization.m
| 1 | // AFURLResponseSerialization.m | 1 | // AFURLResponseSerialization.m |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -21,12 +21,8 @@ | @@ -21,12 +21,8 @@ | ||
| 21 | 21 | ||
| 22 | #import "AFURLResponseSerialization.h" | 22 | #import "AFURLResponseSerialization.h" |
| 23 | 23 | ||
| 24 | -#import <TargetConditionals.h> | ||
| 25 | - | ||
| 26 | -#if TARGET_OS_IOS | 24 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 27 | #import <UIKit/UIKit.h> | 25 | #import <UIKit/UIKit.h> |
| 28 | -#elif TARGET_OS_WATCH | ||
| 29 | -#import <WatchKit/WatchKit.h> | ||
| 30 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) | 26 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) |
| 31 | #import <Cocoa/Cocoa.h> | 27 | #import <Cocoa/Cocoa.h> |
| 32 | #endif | 28 | #endif |
| @@ -71,11 +67,11 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -71,11 +67,11 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 71 | } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { | 67 | } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { |
| 72 | NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; | 68 | NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; |
| 73 | for (id <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) { | 69 | for (id <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) { |
| 74 | - id value = (NSDictionary *)JSONObject[key]; | 70 | + id value = [(NSDictionary *)JSONObject objectForKey:key]; |
| 75 | if (!value || [value isEqual:[NSNull null]]) { | 71 | if (!value || [value isEqual:[NSNull null]]) { |
| 76 | [mutableDictionary removeObjectForKey:key]; | 72 | [mutableDictionary removeObjectForKey:key]; |
| 77 | } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { | 73 | } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { |
| 78 | - mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions); | 74 | + [mutableDictionary setObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions) forKey:key]; |
| 79 | } | 75 | } |
| 80 | } | 76 | } |
| 81 | 77 | ||
| @@ -97,6 +93,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -97,6 +93,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 97 | return nil; | 93 | return nil; |
| 98 | } | 94 | } |
| 99 | 95 | ||
| 96 | + self.stringEncoding = NSUTF8StringEncoding; | ||
| 97 | + | ||
| 100 | self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; | 98 | self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; |
| 101 | self.acceptableContentTypes = nil; | 99 | self.acceptableContentTypes = nil; |
| 102 | 100 | ||
| @@ -113,9 +111,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -113,9 +111,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 113 | NSError *validationError = nil; | 111 | NSError *validationError = nil; |
| 114 | 112 | ||
| 115 | if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) { | 113 | if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) { |
| 116 | - if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] && | ||
| 117 | - !([response MIMEType] == nil && [data length] == 0)) { | ||
| 118 | - | 114 | + if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]]) { |
| 119 | if ([data length] > 0 && [response URL]) { | 115 | if ([data length] > 0 && [response URL]) { |
| 120 | NSMutableDictionary *mutableUserInfo = [@{ | 116 | NSMutableDictionary *mutableUserInfo = [@{ |
| 121 | NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], | 117 | NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], |
| @@ -173,7 +169,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -173,7 +169,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 173 | return YES; | 169 | return YES; |
| 174 | } | 170 | } |
| 175 | 171 | ||
| 176 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 172 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 177 | self = [self init]; | 173 | self = [self init]; |
| 178 | if (!self) { | 174 | if (!self) { |
| 179 | return nil; | 175 | return nil; |
| @@ -192,7 +188,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -192,7 +188,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 192 | 188 | ||
| 193 | #pragma mark - NSCopying | 189 | #pragma mark - NSCopying |
| 194 | 190 | ||
| 195 | -- (instancetype)copyWithZone:(NSZone *)zone { | 191 | +- (id)copyWithZone:(NSZone *)zone { |
| 196 | AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | 192 | AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; |
| 197 | serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; | 193 | serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; |
| 198 | serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; | 194 | serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; |
| @@ -223,7 +219,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -223,7 +219,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 223 | return nil; | 219 | return nil; |
| 224 | } | 220 | } |
| 225 | 221 | ||
| 226 | - self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", @"text/plain", nil]; | 222 | + self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; |
| 227 | 223 | ||
| 228 | return self; | 224 | return self; |
| 229 | } | 225 | } |
| @@ -242,26 +238,51 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -242,26 +238,51 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 242 | 238 | ||
| 243 | // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. | 239 | // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. |
| 244 | // See https://github.com/rails/rails/issues/1742 | 240 | // See https://github.com/rails/rails/issues/1742 |
| 245 | - BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]]; | ||
| 246 | - | ||
| 247 | - if (data.length == 0 || isSpace) { | ||
| 248 | - return nil; | 241 | + NSStringEncoding stringEncoding = self.stringEncoding; |
| 242 | + if (response.textEncodingName) { | ||
| 243 | + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); | ||
| 244 | + if (encoding != kCFStringEncodingInvalidId) { | ||
| 245 | + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); | ||
| 246 | + } | ||
| 249 | } | 247 | } |
| 250 | - | 248 | + |
| 249 | + id responseObject = nil; | ||
| 251 | NSError *serializationError = nil; | 250 | NSError *serializationError = nil; |
| 252 | - | ||
| 253 | - id responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError]; | 251 | + @autoreleasepool { |
| 252 | + NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding]; | ||
| 253 | + | ||
| 254 | + /*change true/false to nsstring add by lc*/ | ||
| 255 | + responseString = [responseString stringByReplacingOccurrencesOfString:@":true" withString:@":\"true\""]; | ||
| 256 | + responseString = [responseString stringByReplacingOccurrencesOfString:@":false" withString:@":\"false\""]; | ||
| 257 | + | ||
| 258 | + if (responseString && ![responseString isEqualToString:@" "]) { | ||
| 259 | + // Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character | ||
| 260 | + // See http://stackoverflow.com/a/12843465/157142 | ||
| 261 | + data = [responseString dataUsingEncoding:NSUTF8StringEncoding]; | ||
| 254 | 262 | ||
| 255 | - if (!responseObject) | ||
| 256 | - { | ||
| 257 | - if (error) { | ||
| 258 | - *error = AFErrorWithUnderlyingError(serializationError, *error); | 263 | + if (data) { |
| 264 | + if ([data length] > 0) { | ||
| 265 | + responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError]; | ||
| 266 | + } else { | ||
| 267 | + return nil; | ||
| 268 | + } | ||
| 269 | + } else { | ||
| 270 | + NSDictionary *userInfo = @{ | ||
| 271 | + NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Data failed decoding as a UTF-8 string", @"AFNetworking", nil), | ||
| 272 | + NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Could not decode string: %@", @"AFNetworking", nil), responseString] | ||
| 273 | + }; | ||
| 274 | + | ||
| 275 | + serializationError = [NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; | ||
| 276 | + } | ||
| 259 | } | 277 | } |
| 260 | - return nil; | ||
| 261 | } | 278 | } |
| 262 | - | ||
| 263 | - if (self.removesKeysWithNullValues) { | ||
| 264 | - return AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions); | 279 | + |
| 280 | + if (self.removesKeysWithNullValues && responseObject) { | ||
| 281 | + responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions); | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + if (error) { | ||
| 285 | + *error = AFErrorWithUnderlyingError(serializationError, *error); | ||
| 265 | } | 286 | } |
| 266 | 287 | ||
| 267 | return responseObject; | 288 | return responseObject; |
| @@ -269,7 +290,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -269,7 +290,7 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 269 | 290 | ||
| 270 | #pragma mark - NSSecureCoding | 291 | #pragma mark - NSSecureCoding |
| 271 | 292 | ||
| 272 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 293 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 273 | self = [super initWithCoder:decoder]; | 294 | self = [super initWithCoder:decoder]; |
| 274 | if (!self) { | 295 | if (!self) { |
| 275 | return nil; | 296 | return nil; |
| @@ -290,8 +311,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -290,8 +311,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 290 | 311 | ||
| 291 | #pragma mark - NSCopying | 312 | #pragma mark - NSCopying |
| 292 | 313 | ||
| 293 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 294 | - AFJSONResponseSerializer *serializer = [super copyWithZone:zone]; | 314 | +- (id)copyWithZone:(NSZone *)zone { |
| 315 | + AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | ||
| 295 | serializer.readingOptions = self.readingOptions; | 316 | serializer.readingOptions = self.readingOptions; |
| 296 | serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; | 317 | serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; |
| 297 | 318 | ||
| @@ -381,20 +402,16 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -381,20 +402,16 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 381 | NSError *serializationError = nil; | 402 | NSError *serializationError = nil; |
| 382 | NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError]; | 403 | NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError]; |
| 383 | 404 | ||
| 384 | - if (!document) | ||
| 385 | - { | ||
| 386 | - if (error) { | ||
| 387 | - *error = AFErrorWithUnderlyingError(serializationError, *error); | ||
| 388 | - } | ||
| 389 | - return nil; | 405 | + if (error) { |
| 406 | + *error = AFErrorWithUnderlyingError(serializationError, *error); | ||
| 390 | } | 407 | } |
| 391 | - | 408 | + |
| 392 | return document; | 409 | return document; |
| 393 | } | 410 | } |
| 394 | 411 | ||
| 395 | #pragma mark - NSSecureCoding | 412 | #pragma mark - NSSecureCoding |
| 396 | 413 | ||
| 397 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 414 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 398 | self = [super initWithCoder:decoder]; | 415 | self = [super initWithCoder:decoder]; |
| 399 | if (!self) { | 416 | if (!self) { |
| 400 | return nil; | 417 | return nil; |
| @@ -413,8 +430,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -413,8 +430,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 413 | 430 | ||
| 414 | #pragma mark - NSCopying | 431 | #pragma mark - NSCopying |
| 415 | 432 | ||
| 416 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 417 | - AFXMLDocumentResponseSerializer *serializer = [super copyWithZone:zone]; | 433 | +- (id)copyWithZone:(NSZone *)zone { |
| 434 | + AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | ||
| 418 | serializer.options = self.options; | 435 | serializer.options = self.options; |
| 419 | 436 | ||
| 420 | return serializer; | 437 | return serializer; |
| @@ -465,20 +482,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -465,20 +482,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 465 | } | 482 | } |
| 466 | } | 483 | } |
| 467 | 484 | ||
| 468 | - if (!data) { | ||
| 469 | - return nil; | ||
| 470 | - } | ||
| 471 | - | 485 | + id responseObject; |
| 472 | NSError *serializationError = nil; | 486 | NSError *serializationError = nil; |
| 473 | - | ||
| 474 | - id responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError]; | ||
| 475 | - | ||
| 476 | - if (!responseObject) | ||
| 477 | - { | ||
| 478 | - if (error) { | ||
| 479 | - *error = AFErrorWithUnderlyingError(serializationError, *error); | ||
| 480 | - } | ||
| 481 | - return nil; | 487 | + |
| 488 | + if (data) { | ||
| 489 | + responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError]; | ||
| 490 | + } | ||
| 491 | + | ||
| 492 | + if (error) { | ||
| 493 | + *error = AFErrorWithUnderlyingError(serializationError, *error); | ||
| 482 | } | 494 | } |
| 483 | 495 | ||
| 484 | return responseObject; | 496 | return responseObject; |
| @@ -486,13 +498,13 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -486,13 +498,13 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 486 | 498 | ||
| 487 | #pragma mark - NSSecureCoding | 499 | #pragma mark - NSSecureCoding |
| 488 | 500 | ||
| 489 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 501 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 490 | self = [super initWithCoder:decoder]; | 502 | self = [super initWithCoder:decoder]; |
| 491 | if (!self) { | 503 | if (!self) { |
| 492 | return nil; | 504 | return nil; |
| 493 | } | 505 | } |
| 494 | 506 | ||
| 495 | - self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; | 507 | + self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; |
| 496 | self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; | 508 | self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; |
| 497 | 509 | ||
| 498 | return self; | 510 | return self; |
| @@ -507,8 +519,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -507,8 +519,8 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 507 | 519 | ||
| 508 | #pragma mark - NSCopying | 520 | #pragma mark - NSCopying |
| 509 | 521 | ||
| 510 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 511 | - AFPropertyListResponseSerializer *serializer = [super copyWithZone:zone]; | 522 | +- (id)copyWithZone:(NSZone *)zone { |
| 523 | + AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | ||
| 512 | serializer.format = self.format; | 524 | serializer.format = self.format; |
| 513 | serializer.readOptions = self.readOptions; | 525 | serializer.readOptions = self.readOptions; |
| 514 | 526 | ||
| @@ -519,39 +531,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | @@ -519,39 +531,15 @@ static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingO | ||
| 519 | 531 | ||
| 520 | #pragma mark - | 532 | #pragma mark - |
| 521 | 533 | ||
| 522 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 534 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 523 | #import <CoreGraphics/CoreGraphics.h> | 535 | #import <CoreGraphics/CoreGraphics.h> |
| 524 | -#import <UIKit/UIKit.h> | ||
| 525 | - | ||
| 526 | -@interface UIImage (AFNetworkingSafeImageLoading) | ||
| 527 | -+ (UIImage *)af_safeImageWithData:(NSData *)data; | ||
| 528 | -@end | ||
| 529 | - | ||
| 530 | -static NSLock* imageLock = nil; | ||
| 531 | - | ||
| 532 | -@implementation UIImage (AFNetworkingSafeImageLoading) | ||
| 533 | - | ||
| 534 | -+ (UIImage *)af_safeImageWithData:(NSData *)data { | ||
| 535 | - UIImage* image = nil; | ||
| 536 | - static dispatch_once_t onceToken; | ||
| 537 | - dispatch_once(&onceToken, ^{ | ||
| 538 | - imageLock = [[NSLock alloc] init]; | ||
| 539 | - }); | ||
| 540 | - | ||
| 541 | - [imageLock lock]; | ||
| 542 | - image = [UIImage imageWithData:data]; | ||
| 543 | - [imageLock unlock]; | ||
| 544 | - return image; | ||
| 545 | -} | ||
| 546 | - | ||
| 547 | -@end | ||
| 548 | 536 | ||
| 549 | static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { | 537 | static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { |
| 550 | - UIImage *image = [UIImage af_safeImageWithData:data]; | 538 | + UIImage *image = [[UIImage alloc] initWithData:data]; |
| 551 | if (image.images) { | 539 | if (image.images) { |
| 552 | return image; | 540 | return image; |
| 553 | } | 541 | } |
| 554 | - | 542 | + |
| 555 | return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; | 543 | return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; |
| 556 | } | 544 | } |
| 557 | 545 | ||
| @@ -659,12 +647,9 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -659,12 +647,9 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 659 | 647 | ||
| 660 | self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; | 648 | self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; |
| 661 | 649 | ||
| 662 | -#if TARGET_OS_IOS || TARGET_OS_TV | 650 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 663 | self.imageScale = [[UIScreen mainScreen] scale]; | 651 | self.imageScale = [[UIScreen mainScreen] scale]; |
| 664 | self.automaticallyInflatesResponseImage = YES; | 652 | self.automaticallyInflatesResponseImage = YES; |
| 665 | -#elif TARGET_OS_WATCH | ||
| 666 | - self.imageScale = [[WKInterfaceDevice currentDevice] screenScale]; | ||
| 667 | - self.automaticallyInflatesResponseImage = YES; | ||
| 668 | #endif | 653 | #endif |
| 669 | 654 | ||
| 670 | return self; | 655 | return self; |
| @@ -682,13 +667,13 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -682,13 +667,13 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 682 | } | 667 | } |
| 683 | } | 668 | } |
| 684 | 669 | ||
| 685 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 670 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 686 | if (self.automaticallyInflatesResponseImage) { | 671 | if (self.automaticallyInflatesResponseImage) { |
| 687 | return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); | 672 | return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); |
| 688 | } else { | 673 | } else { |
| 689 | return AFImageWithDataAtScale(data, self.imageScale); | 674 | return AFImageWithDataAtScale(data, self.imageScale); |
| 690 | } | 675 | } |
| 691 | -#else | 676 | +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) |
| 692 | // Ensure that the image is set to it's correct pixel width and height | 677 | // Ensure that the image is set to it's correct pixel width and height |
| 693 | NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; | 678 | NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; |
| 694 | NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; | 679 | NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; |
| @@ -702,13 +687,13 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -702,13 +687,13 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 702 | 687 | ||
| 703 | #pragma mark - NSSecureCoding | 688 | #pragma mark - NSSecureCoding |
| 704 | 689 | ||
| 705 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 690 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 706 | self = [super initWithCoder:decoder]; | 691 | self = [super initWithCoder:decoder]; |
| 707 | if (!self) { | 692 | if (!self) { |
| 708 | return nil; | 693 | return nil; |
| 709 | } | 694 | } |
| 710 | 695 | ||
| 711 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 696 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 712 | NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; | 697 | NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; |
| 713 | #if CGFLOAT_IS_DOUBLE | 698 | #if CGFLOAT_IS_DOUBLE |
| 714 | self.imageScale = [imageScale doubleValue]; | 699 | self.imageScale = [imageScale doubleValue]; |
| @@ -725,7 +710,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -725,7 +710,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 725 | - (void)encodeWithCoder:(NSCoder *)coder { | 710 | - (void)encodeWithCoder:(NSCoder *)coder { |
| 726 | [super encodeWithCoder:coder]; | 711 | [super encodeWithCoder:coder]; |
| 727 | 712 | ||
| 728 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 713 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 729 | [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; | 714 | [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; |
| 730 | [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; | 715 | [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; |
| 731 | #endif | 716 | #endif |
| @@ -733,10 +718,10 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -733,10 +718,10 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 733 | 718 | ||
| 734 | #pragma mark - NSCopying | 719 | #pragma mark - NSCopying |
| 735 | 720 | ||
| 736 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 737 | - AFImageResponseSerializer *serializer = [super copyWithZone:zone]; | 721 | +- (id)copyWithZone:(NSZone *)zone { |
| 722 | + AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | ||
| 738 | 723 | ||
| 739 | -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH | 724 | +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) |
| 740 | serializer.imageScale = self.imageScale; | 725 | serializer.imageScale = self.imageScale; |
| 741 | serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; | 726 | serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; |
| 742 | #endif | 727 | #endif |
| @@ -788,7 +773,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -788,7 +773,7 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 788 | 773 | ||
| 789 | #pragma mark - NSSecureCoding | 774 | #pragma mark - NSSecureCoding |
| 790 | 775 | ||
| 791 | -- (instancetype)initWithCoder:(NSCoder *)decoder { | 776 | +- (id)initWithCoder:(NSCoder *)decoder { |
| 792 | self = [super initWithCoder:decoder]; | 777 | self = [super initWithCoder:decoder]; |
| 793 | if (!self) { | 778 | if (!self) { |
| 794 | return nil; | 779 | return nil; |
| @@ -807,8 +792,8 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | @@ -807,8 +792,8 @@ static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *r | ||
| 807 | 792 | ||
| 808 | #pragma mark - NSCopying | 793 | #pragma mark - NSCopying |
| 809 | 794 | ||
| 810 | -- (instancetype)copyWithZone:(NSZone *)zone { | ||
| 811 | - AFCompoundResponseSerializer *serializer = [super copyWithZone:zone]; | 795 | +- (id)copyWithZone:(NSZone *)zone { |
| 796 | + AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; | ||
| 812 | serializer.responseSerializers = self.responseSerializers; | 797 | serializer.responseSerializers = self.responseSerializers; |
| 813 | 798 | ||
| 814 | return serializer; | 799 | return serializer; |
LiveVideoCloud/LiveVideoCloud/Classes/SDK/AFNetworking/AFURLSessionManager.h
| 1 | // AFURLSessionManager.h | 1 | // AFURLSessionManager.h |
| 2 | -// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) | 2 | +// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) |
| 3 | // | 3 | // |
| 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy | 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | // of this software and associated documentation files (the "Software"), to deal | 5 | // of this software and associated documentation files (the "Software"), to deal |
| @@ -19,14 +19,19 @@ | @@ -19,14 +19,19 @@ | ||
| 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 20 | // THE SOFTWARE. | 20 | // THE SOFTWARE. |
| 21 | 21 | ||
| 22 | - | ||
| 23 | #import <Foundation/Foundation.h> | 22 | #import <Foundation/Foundation.h> |
| 24 | 23 | ||
| 25 | #import "AFURLResponseSerialization.h" | 24 | #import "AFURLResponseSerialization.h" |
| 26 | #import "AFURLRequestSerialization.h" | 25 | #import "AFURLRequestSerialization.h" |
| 27 | #import "AFSecurityPolicy.h" | 26 | #import "AFSecurityPolicy.h" |
| 28 | -#if !TARGET_OS_WATCH | ||
| 29 | #import "AFNetworkReachabilityManager.h" | 27 | #import "AFNetworkReachabilityManager.h" |
| 28 | + | ||
| 29 | +#ifndef NS_DESIGNATED_INITIALIZER | ||
| 30 | +#if __has_attribute(objc_designated_initializer) | ||
| 31 | +#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 32 | +#else | ||
| 33 | +#define NS_DESIGNATED_INITIALIZER | ||
| 34 | +#endif | ||
| 30 | #endif | 35 | #endif |
| 31 | 36 | ||
| 32 | /** | 37 | /** |
| @@ -51,7 +56,6 @@ | @@ -51,7 +56,6 @@ | ||
| 51 | - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` | 56 | - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` |
| 52 | - `URLSession:task:didReceiveChallenge:completionHandler:` | 57 | - `URLSession:task:didReceiveChallenge:completionHandler:` |
| 53 | - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` | 58 | - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` |
| 54 | - - `URLSession:task:needNewBodyStream:` | ||
| 55 | - `URLSession:task:didCompleteWithError:` | 59 | - `URLSession:task:didCompleteWithError:` |
| 56 | 60 | ||
| 57 | ### `NSURLSessionDataDelegate` | 61 | ### `NSURLSessionDataDelegate` |
| @@ -85,7 +89,7 @@ | @@ -85,7 +89,7 @@ | ||
| 85 | @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. | 89 | @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. |
| 86 | */ | 90 | */ |
| 87 | 91 | ||
| 88 | -NS_ASSUME_NONNULL_BEGIN | 92 | +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) |
| 89 | 93 | ||
| 90 | @interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying> | 94 | @interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying> |
| 91 | 95 | ||
| @@ -111,11 +115,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -111,11 +115,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 111 | ///------------------------------- | 115 | ///------------------------------- |
| 112 | 116 | ||
| 113 | /** | 117 | /** |
| 114 | - The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. | 118 | + The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. |
| 115 | */ | 119 | */ |
| 116 | @property (nonatomic, strong) AFSecurityPolicy *securityPolicy; | 120 | @property (nonatomic, strong) AFSecurityPolicy *securityPolicy; |
| 117 | 121 | ||
| 118 | -#if !TARGET_OS_WATCH | ||
| 119 | ///-------------------------------------- | 122 | ///-------------------------------------- |
| 120 | /// @name Monitoring Network Reachability | 123 | /// @name Monitoring Network Reachability |
| 121 | ///-------------------------------------- | 124 | ///-------------------------------------- |
| @@ -124,7 +127,6 @@ NS_ASSUME_NONNULL_BEGIN | @@ -124,7 +127,6 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 124 | The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. | 127 | The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. |
| 125 | */ | 128 | */ |
| 126 | @property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; | 129 | @property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; |
| 127 | -#endif | ||
| 128 | 130 | ||
| 129 | ///---------------------------- | 131 | ///---------------------------- |
| 130 | /// @name Getting Session Tasks | 132 | /// @name Getting Session Tasks |
| @@ -133,22 +135,22 @@ NS_ASSUME_NONNULL_BEGIN | @@ -133,22 +135,22 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 133 | /** | 135 | /** |
| 134 | The data, upload, and download tasks currently run by the managed session. | 136 | The data, upload, and download tasks currently run by the managed session. |
| 135 | */ | 137 | */ |
| 136 | -@property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks; | 138 | +@property (readonly, nonatomic, strong) NSArray *tasks; |
| 137 | 139 | ||
| 138 | /** | 140 | /** |
| 139 | The data tasks currently run by the managed session. | 141 | The data tasks currently run by the managed session. |
| 140 | */ | 142 | */ |
| 141 | -@property (readonly, nonatomic, strong) NSArray <NSURLSessionDataTask *> *dataTasks; | 143 | +@property (readonly, nonatomic, strong) NSArray *dataTasks; |
| 142 | 144 | ||
| 143 | /** | 145 | /** |
| 144 | The upload tasks currently run by the managed session. | 146 | The upload tasks currently run by the managed session. |
| 145 | */ | 147 | */ |
| 146 | -@property (readonly, nonatomic, strong) NSArray <NSURLSessionUploadTask *> *uploadTasks; | 148 | +@property (readonly, nonatomic, strong) NSArray *uploadTasks; |
| 147 | 149 | ||
| 148 | /** | 150 | /** |
| 149 | The download tasks currently run by the managed session. | 151 | The download tasks currently run by the managed session. |
| 150 | */ | 152 | */ |
| 151 | -@property (readonly, nonatomic, strong) NSArray <NSURLSessionDownloadTask *> *downloadTasks; | 153 | +@property (readonly, nonatomic, strong) NSArray *downloadTasks; |
| 152 | 154 | ||
| 153 | ///------------------------------- | 155 | ///------------------------------- |
| 154 | /// @name Managing Callback Queues | 156 | /// @name Managing Callback Queues |
| @@ -157,12 +159,20 @@ NS_ASSUME_NONNULL_BEGIN | @@ -157,12 +159,20 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 157 | /** | 159 | /** |
| 158 | The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. | 160 | The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. |
| 159 | */ | 161 | */ |
| 160 | -@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; | 162 | +#if OS_OBJECT_HAVE_OBJC_SUPPORT |
| 163 | +@property (nonatomic, strong) dispatch_queue_t completionQueue; | ||
| 164 | +#else | ||
| 165 | +@property (nonatomic, assign) dispatch_queue_t completionQueue; | ||
| 166 | +#endif | ||
| 161 | 167 | ||
| 162 | /** | 168 | /** |
| 163 | The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. | 169 | The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. |
| 164 | */ | 170 | */ |
| 165 | -@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; | 171 | +#if OS_OBJECT_HAVE_OBJC_SUPPORT |
| 172 | +@property (nonatomic, strong) dispatch_group_t completionGroup; | ||
| 173 | +#else | ||
| 174 | +@property (nonatomic, assign) dispatch_group_t completionGroup; | ||
| 175 | +#endif | ||
| 166 | 176 | ||
| 167 | ///--------------------------------- | 177 | ///--------------------------------- |
| 168 | /// @name Working Around System Bugs | 178 | /// @name Working Around System Bugs |
| @@ -188,7 +198,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -188,7 +198,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 188 | 198 | ||
| 189 | @return A manager for a newly-created session. | 199 | @return A manager for a newly-created session. |
| 190 | */ | 200 | */ |
| 191 | -- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; | 201 | +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; |
| 192 | 202 | ||
| 193 | /** | 203 | /** |
| 194 | Invalidates the managed session, optionally canceling pending tasks. | 204 | Invalidates the managed session, optionally canceling pending tasks. |
| @@ -208,20 +218,7 @@ NS_ASSUME_NONNULL_BEGIN | @@ -208,20 +218,7 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 208 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. | 218 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. |
| 209 | */ | 219 | */ |
| 210 | - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request | 220 | - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request |
| 211 | - completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler DEPRECATED_ATTRIBUTE; | ||
| 212 | - | ||
| 213 | -/** | ||
| 214 | - Creates an `NSURLSessionDataTask` with the specified request. | ||
| 215 | - | ||
| 216 | - @param request The HTTP request for the request. | ||
| 217 | - @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | ||
| 218 | - @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. | ||
| 219 | - @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. | ||
| 220 | - */ | ||
| 221 | -- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request | ||
| 222 | - uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock | ||
| 223 | - downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock | ||
| 224 | - completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; | 221 | + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; |
| 225 | 222 | ||
| 226 | ///--------------------------- | 223 | ///--------------------------- |
| 227 | /// @name Running Upload Tasks | 224 | /// @name Running Upload Tasks |
| @@ -232,39 +229,39 @@ NS_ASSUME_NONNULL_BEGIN | @@ -232,39 +229,39 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 232 | 229 | ||
| 233 | @param request The HTTP request for the request. | 230 | @param request The HTTP request for the request. |
| 234 | @param fileURL A URL to the local file to be uploaded. | 231 | @param fileURL A URL to the local file to be uploaded. |
| 235 | - @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | 232 | + @param progress A progress object monitoring the current upload progress. |
| 236 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. | 233 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. |
| 237 | 234 | ||
| 238 | @see `attemptsToRecreateUploadTasksForBackgroundSessions` | 235 | @see `attemptsToRecreateUploadTasksForBackgroundSessions` |
| 239 | */ | 236 | */ |
| 240 | - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request | 237 | - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request |
| 241 | fromFile:(NSURL *)fileURL | 238 | fromFile:(NSURL *)fileURL |
| 242 | - progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock | ||
| 243 | - completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; | 239 | + progress:(NSProgress * __autoreleasing *)progress |
| 240 | + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; | ||
| 244 | 241 | ||
| 245 | /** | 242 | /** |
| 246 | Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. | 243 | Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. |
| 247 | 244 | ||
| 248 | @param request The HTTP request for the request. | 245 | @param request The HTTP request for the request. |
| 249 | @param bodyData A data object containing the HTTP body to be uploaded. | 246 | @param bodyData A data object containing the HTTP body to be uploaded. |
| 250 | - @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | 247 | + @param progress A progress object monitoring the current upload progress. |
| 251 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. | 248 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. |
| 252 | */ | 249 | */ |
| 253 | - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request | 250 | - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request |
| 254 | - fromData:(nullable NSData *)bodyData | ||
| 255 | - progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock | ||
| 256 | - completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; | 251 | + fromData:(NSData *)bodyData |
| 252 | + progress:(NSProgress * __autoreleasing *)progress | ||
| 253 | + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; | ||
| 257 | 254 | ||
| 258 | /** | 255 | /** |
| 259 | Creates an `NSURLSessionUploadTask` with the specified streaming request. | 256 | Creates an `NSURLSessionUploadTask` with the specified streaming request. |
| 260 | 257 | ||
| 261 | @param request The HTTP request for the request. | 258 | @param request The HTTP request for the request. |
| 262 | - @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. | 259 | + @param progress A progress object monitoring the current upload progress. |
| 263 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. | 260 | @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. |
| 264 | */ | 261 | */ |
| 265 | - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request | 262 | - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request |
| 266 | - progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock | ||
| 267 | - completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; | 263 | + progress:(NSProgress * __autoreleasing *)progress |
| 264 | + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler; | ||
| 268 | 265 | ||
| 269 | ///----------------------------- | 266 | ///----------------------------- |
| 270 | /// @name Running Download Tasks | 267 | /// @name Running Download Tasks |
| @@ -274,29 +271,29 @@ NS_ASSUME_NONNULL_BEGIN | @@ -274,29 +271,29 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 274 | Creates an `NSURLSessionDownloadTask` with the specified request. | 271 | Creates an `NSURLSessionDownloadTask` with the specified request. |
| 275 | 272 | ||
| 276 | @param request The HTTP request for the request. | 273 | @param request The HTTP request for the request. |
| 277 | - @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. | 274 | + @param progress A progress object monitoring the current download progress. |
| 278 | @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. | 275 | @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. |
| 279 | @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. | 276 | @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. |
| 280 | 277 | ||
| 281 | @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. | 278 | @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. |
| 282 | */ | 279 | */ |
| 283 | - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request | 280 | - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request |
| 284 | - progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock | ||
| 285 | - destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination | ||
| 286 | - completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; | 281 | + progress:(NSProgress * __autoreleasing *)progress |
| 282 | + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination | ||
| 283 | + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; | ||
| 287 | 284 | ||
| 288 | /** | 285 | /** |
| 289 | Creates an `NSURLSessionDownloadTask` with the specified resume data. | 286 | Creates an `NSURLSessionDownloadTask` with the specified resume data. |
| 290 | 287 | ||
| 291 | @param resumeData The data used to resume downloading. | 288 | @param resumeData The data used to resume downloading. |
| 292 | - @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. | 289 | + @param progress A progress object monitoring the current download progress. |
| 293 | @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. | 290 | @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. |
| 294 | @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. | 291 | @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. |
| 295 | */ | 292 | */ |
| 296 | - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData | 293 | - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData |
| 297 | - progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock | ||
| 298 | - destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination | ||
| 299 | - completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; | 294 | + progress:(NSProgress * __autoreleasing *)progress |
| 295 | + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination | ||
| 296 | + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler; | ||
| 300 | 297 | ||
| 301 | ///--------------------------------- | 298 | ///--------------------------------- |
| 302 | /// @name Getting Progress for Tasks | 299 | /// @name Getting Progress for Tasks |
| @@ -305,20 +302,20 @@ NS_ASSUME_NONNULL_BEGIN | @@ -305,20 +302,20 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 305 | /** | 302 | /** |
| 306 | Returns the upload progress of the specified task. | 303 | Returns the upload progress of the specified task. |
| 307 | 304 | ||
| 308 | - @param task The session task. Must not be `nil`. | 305 | + @param uploadTask The session upload task. Must not be `nil`. |
| 309 | 306 | ||
| 310 | @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. | 307 | @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. |
| 311 | */ | 308 | */ |
| 312 | -- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task; | 309 | +- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask; |
| 313 | 310 | ||
| 314 | /** | 311 | /** |
| 315 | Returns the download progress of the specified task. | 312 | Returns the download progress of the specified task. |
| 316 | 313 | ||
| 317 | - @param task The session task. Must not be `nil`. | 314 | + @param downloadTask The session download task. Must not be `nil`. |
| 318 | 315 | ||
| 319 | @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. | 316 | @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. |
| 320 | */ | 317 | */ |
| 321 | -- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task; | 318 | +- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask; |
| 322 | 319 | ||
| 323 | ///----------------------------------------- | 320 | ///----------------------------------------- |
| 324 | /// @name Setting Session Delegate Callbacks | 321 | /// @name Setting Session Delegate Callbacks |
| @@ -329,14 +326,14 @@ NS_ASSUME_NONNULL_BEGIN | @@ -329,14 +326,14 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 329 | 326 | ||
| 330 | @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. | 327 | @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. |
| 331 | */ | 328 | */ |
| 332 | -- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block; | 329 | +- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block; |
| 333 | 330 | ||
| 334 | /** | 331 | /** |
| 335 | Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. | 332 | Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. |
| 336 | 333 | ||
| 337 | @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. | 334 | @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. |
| 338 | */ | 335 | */ |
| 339 | -- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block; | 336 | +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; |
| 340 | 337 | ||
| 341 | ///-------------------------------------- | 338 | ///-------------------------------------- |
| 342 | /// @name Setting Task Delegate Callbacks | 339 | /// @name Setting Task Delegate Callbacks |
| @@ -347,35 +344,35 @@ NS_ASSUME_NONNULL_BEGIN | @@ -347,35 +344,35 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 347 | 344 | ||
| 348 | @param block A block object to be executed when a task requires a new request body stream. | 345 | @param block A block object to be executed when a task requires a new request body stream. |
| 349 | */ | 346 | */ |
| 350 | -- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; | 347 | +- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; |
| 351 | 348 | ||
| 352 | /** | 349 | /** |
| 353 | Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. | 350 | Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. |
| 354 | 351 | ||
| 355 | @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. | 352 | @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. |
| 356 | */ | 353 | */ |
| 357 | -- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; | 354 | +- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; |
| 358 | 355 | ||
| 359 | /** | 356 | /** |
| 360 | Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. | 357 | Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. |
| 361 | 358 | ||
| 362 | @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. | 359 | @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. |
| 363 | */ | 360 | */ |
| 364 | -- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block; | 361 | +- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block; |
| 365 | 362 | ||
| 366 | /** | 363 | /** |
| 367 | Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. | 364 | Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. |
| 368 | 365 | ||
| 369 | @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. | 366 | @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. |
| 370 | */ | 367 | */ |
| 371 | -- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; | 368 | +- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; |
| 372 | 369 | ||
| 373 | /** | 370 | /** |
| 374 | Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. | 371 | Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. |
| 375 | 372 | ||
| 376 | @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. | 373 | @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. |
| 377 | */ | 374 | */ |
| 378 | -- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block; | 375 | +- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block; |
| 379 | 376 | ||
| 380 | ///------------------------------------------- | 377 | ///------------------------------------------- |
| 381 | /// @name Setting Data Task Delegate Callbacks | 378 | /// @name Setting Data Task Delegate Callbacks |
| @@ -386,35 +383,35 @@ NS_ASSUME_NONNULL_BEGIN | @@ -386,35 +383,35 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 386 | 383 | ||
| 387 | @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. | 384 | @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. |
| 388 | */ | 385 | */ |
| 389 | -- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; | 386 | +- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; |
| 390 | 387 | ||
| 391 | /** | 388 | /** |
| 392 | Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. | 389 | Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. |
| 393 | 390 | ||
| 394 | @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. | 391 | @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. |
| 395 | */ | 392 | */ |
| 396 | -- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; | 393 | +- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; |
| 397 | 394 | ||
| 398 | /** | 395 | /** |
| 399 | Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. | 396 | Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. |
| 400 | 397 | ||
| 401 | @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. | 398 | @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. |
| 402 | */ | 399 | */ |
| 403 | -- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; | 400 | +- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; |
| 404 | 401 | ||
| 405 | /** | 402 | /** |
| 406 | Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. | 403 | Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. |
| 407 | 404 | ||
| 408 | @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. | 405 | @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. |
| 409 | */ | 406 | */ |
| 410 | -- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; | 407 | +- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; |
| 411 | 408 | ||
| 412 | /** | 409 | /** |
| 413 | Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. | 410 | Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. |
| 414 | 411 | ||
| 415 | @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. | 412 | @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session. |
| 416 | */ | 413 | */ |
| 417 | -- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block; | 414 | +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block; |
| 418 | 415 | ||
| 419 | ///----------------------------------------------- | 416 | ///----------------------------------------------- |
| 420 | /// @name Setting Download Task Delegate Callbacks | 417 | /// @name Setting Download Task Delegate Callbacks |
| @@ -425,76 +422,125 @@ NS_ASSUME_NONNULL_BEGIN | @@ -425,76 +422,125 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 425 | 422 | ||
| 426 | @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. | 423 | @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. |
| 427 | */ | 424 | */ |
| 428 | -- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; | 425 | +- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; |
| 429 | 426 | ||
| 430 | /** | 427 | /** |
| 431 | Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`. | 428 | Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`. |
| 432 | 429 | ||
| 433 | @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. | 430 | @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. |
| 434 | */ | 431 | */ |
| 435 | -- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; | 432 | +- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; |
| 436 | 433 | ||
| 437 | /** | 434 | /** |
| 438 | Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. | 435 | Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. |
| 439 | 436 | ||
| 440 | @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. | 437 | @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. |
| 441 | */ | 438 | */ |
| 442 | -- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; | 439 | +- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; |
| 443 | 440 | ||
| 444 | @end | 441 | @end |
| 445 | 442 | ||
| 443 | +#endif | ||
| 444 | + | ||
| 446 | ///-------------------- | 445 | ///-------------------- |
| 447 | /// @name Notifications | 446 | /// @name Notifications |
| 448 | ///-------------------- | 447 | ///-------------------- |
| 449 | 448 | ||
| 450 | /** | 449 | /** |
| 450 | + Posted when a task begins executing. | ||
| 451 | + | ||
| 452 | + @deprecated Use `AFNetworkingTaskDidResumeNotification` instead. | ||
| 453 | + */ | ||
| 454 | +extern NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE; | ||
| 455 | + | ||
| 456 | +/** | ||
| 451 | Posted when a task resumes. | 457 | Posted when a task resumes. |
| 452 | */ | 458 | */ |
| 453 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification; | 459 | +extern NSString * const AFNetworkingTaskDidResumeNotification; |
| 460 | + | ||
| 461 | +/** | ||
| 462 | + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. | ||
| 463 | + | ||
| 464 | + @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead. | ||
| 465 | + */ | ||
| 466 | +extern NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE; | ||
| 454 | 467 | ||
| 455 | /** | 468 | /** |
| 456 | Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. | 469 | Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. |
| 457 | */ | 470 | */ |
| 458 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification; | 471 | +extern NSString * const AFNetworkingTaskDidCompleteNotification; |
| 459 | 472 | ||
| 460 | /** | 473 | /** |
| 461 | Posted when a task suspends its execution. | 474 | Posted when a task suspends its execution. |
| 462 | */ | 475 | */ |
| 463 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification; | 476 | +extern NSString * const AFNetworkingTaskDidSuspendNotification; |
| 464 | 477 | ||
| 465 | /** | 478 | /** |
| 466 | Posted when a session is invalidated. | 479 | Posted when a session is invalidated. |
| 467 | */ | 480 | */ |
| 468 | -FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification; | 481 | +extern NSString * const AFURLSessionDidInvalidateNotification; |
| 469 | 482 | ||
| 470 | /** | 483 | /** |
| 471 | Posted when a session download task encountered an error when moving the temporary download file to a specified destination. | 484 | Posted when a session download task encountered an error when moving the temporary download file to a specified destination. |
| 472 | */ | 485 | */ |
| 473 | -FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; | 486 | +extern NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; |
| 487 | + | ||
| 488 | +/** | ||
| 489 | + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. | ||
| 490 | + | ||
| 491 | + @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead. | ||
| 492 | + */ | ||
| 493 | +extern NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE; | ||
| 494 | + | ||
| 495 | +/** | ||
| 496 | + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task. | ||
| 497 | + */ | ||
| 498 | +extern NSString * const AFNetworkingTaskDidCompleteResponseDataKey; | ||
| 499 | + | ||
| 500 | +/** | ||
| 501 | + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. | ||
| 502 | + | ||
| 503 | + @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead. | ||
| 504 | + */ | ||
| 505 | +extern NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE; | ||
| 474 | 506 | ||
| 475 | /** | 507 | /** |
| 476 | - The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task. | 508 | + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized. |
| 477 | */ | 509 | */ |
| 478 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey; | 510 | +extern NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; |
| 479 | 511 | ||
| 480 | /** | 512 | /** |
| 481 | - The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized. | 513 | + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. |
| 514 | + | ||
| 515 | + @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead. | ||
| 482 | */ | 516 | */ |
| 483 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; | 517 | +extern NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE; |
| 484 | 518 | ||
| 485 | /** | 519 | /** |
| 486 | - The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer. | 520 | + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer. |
| 487 | */ | 521 | */ |
| 488 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; | 522 | +extern NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; |
| 489 | 523 | ||
| 490 | /** | 524 | /** |
| 491 | - The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk. | 525 | + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. |
| 526 | + | ||
| 527 | + @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead. | ||
| 492 | */ | 528 | */ |
| 493 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey; | 529 | +extern NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE; |
| 494 | 530 | ||
| 495 | /** | 531 | /** |
| 496 | - Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists. | 532 | + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk. |
| 497 | */ | 533 | */ |
| 498 | -FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey; | 534 | +extern NSString * const AFNetworkingTaskDidCompleteAssetPathKey; |
| 499 | 535 | ||
| 500 | -NS_ASSUME_NONNULL_END | 536 | +/** |
| 537 | + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. | ||
| 538 | + | ||
| 539 | + @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead. | ||
| 540 | + */ | ||
| 541 | +extern NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE; | ||
| 542 | + | ||
| 543 | +/** | ||
| 544 | + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists. | ||
| 545 | + */ | ||
| 546 | +extern NSString * const AFNetworkingTaskDidCompleteErrorKey; |