├── .DS_Store ├── .gitignore ├── MoyaDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── sungrow.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── sungrow.xcuserdatad │ └── xcschemes │ ├── MoyaDemo.xcscheme │ └── xcschememanagement.plist ├── MoyaDemo.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── sungrow.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── MoyaDemo ├── API.swift ├── AppDelegate.swift ├── AppService.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── LoginModel.swift ├── Observable+Extension.swift ├── Observable+ObjectMapper.swift ├── VideoModel.swift ├── ViewController.swift └── ViewModel.swift ├── MoyaDemoTests ├── Info.plist └── MoyaDemoTests.swift ├── MoyaDemoUITests ├── Info.plist └── MoyaDemoUITests.swift ├── Podfile ├── Podfile.lock └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YQqiang/MoyaDemo/d0934dd6451a6b446258721c0cca9f5d064879d2/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode,macos,swift,cocoapods,objective-c 3 | # Edit at https://www.gitignore.io/?templates=xcode,macos,swift,cocoapods,objective-c 4 | 5 | ### CocoaPods ### 6 | ## CocoaPods GitIgnore Template 7 | 8 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 9 | # - Also handy if you have a large number of dependant pods 10 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 11 | Pods/ 12 | 13 | ### macOS ### 14 | # General 15 | .DS_Store 16 | .AppleDouble 17 | .LSOverride 18 | 19 | # Icon must end with two \r 20 | Icon 21 | 22 | # Thumbnails 23 | ._* 24 | 25 | # Files that might appear in the root of a volume 26 | .DocumentRevisions-V100 27 | .fseventsd 28 | .Spotlight-V100 29 | .TemporaryItems 30 | .Trashes 31 | .VolumeIcon.icns 32 | .com.apple.timemachine.donotpresent 33 | 34 | # Directories potentially created on remote AFP share 35 | .AppleDB 36 | .AppleDesktop 37 | Network Trash Folder 38 | Temporary Items 39 | .apdisk 40 | 41 | ### Objective-C ### 42 | # Xcode 43 | # 44 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 45 | 46 | ## Build generated 47 | build/ 48 | DerivedData/ 49 | 50 | ## Various settings 51 | *.pbxuser 52 | !default.pbxuser 53 | *.mode1v3 54 | !default.mode1v3 55 | *.mode2v3 56 | !default.mode2v3 57 | *.perspectivev3 58 | !default.perspectivev3 59 | xcuserdata/ 60 | 61 | ## Other 62 | *.moved-aside 63 | *.xccheckout 64 | *.xcscmblueprint 65 | 66 | ## Obj-C/Swift specific 67 | *.hmap 68 | *.ipa 69 | *.dSYM.zip 70 | *.dSYM 71 | 72 | # CocoaPods 73 | # We recommend against adding the Pods directory to your .gitignore. However 74 | # you should judge for yourself, the pros and cons are mentioned at: 75 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 76 | # Pods/ 77 | # Add this line if you want to avoid checking in source code from the Xcode workspace 78 | # *.xcworkspace 79 | 80 | # Carthage 81 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 82 | # Carthage/Checkouts 83 | 84 | Carthage/Build 85 | 86 | # fastlane 87 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 88 | # screenshots whenever they are needed. 89 | # For more information about the recommended setup visit: 90 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 91 | 92 | fastlane/report.xml 93 | fastlane/Preview.html 94 | fastlane/screenshots/**/*.png 95 | fastlane/test_output 96 | 97 | # Code Injection 98 | # After new code Injection tools there's a generated folder /iOSInjectionProject 99 | # https://github.com/johnno1962/injectionforxcode 100 | 101 | iOSInjectionProject/ 102 | 103 | ### Objective-C Patch ### 104 | 105 | ### Swift ### 106 | # Xcode 107 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 108 | 109 | 110 | 111 | 112 | 113 | ## Playgrounds 114 | timeline.xctimeline 115 | playground.xcworkspace 116 | 117 | # Swift Package Manager 118 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 119 | # Packages/ 120 | # Package.pins 121 | # Package.resolved 122 | .build/ 123 | 124 | # CocoaPods 125 | # We recommend against adding the Pods directory to your .gitignore. However 126 | # you should judge for yourself, the pros and cons are mentioned at: 127 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 128 | # Pods/ 129 | # Add this line if you want to avoid checking in source code from the Xcode workspace 130 | # *.xcworkspace 131 | 132 | # Carthage 133 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 134 | # Carthage/Checkouts 135 | 136 | 137 | # fastlane 138 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 139 | # screenshots whenever they are needed. 140 | # For more information about the recommended setup visit: 141 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 142 | 143 | 144 | # Code Injection 145 | # After new code Injection tools there's a generated folder /iOSInjectionProject 146 | # https://github.com/johnno1962/injectionforxcode 147 | 148 | 149 | ### Xcode ### 150 | # Xcode 151 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 152 | 153 | ## User settings 154 | 155 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 156 | 157 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 158 | 159 | ### Xcode Patch ### 160 | *.xcodeproj/* 161 | !*.xcodeproj/project.pbxproj 162 | !*.xcodeproj/xcshareddata/ 163 | !*.xcworkspace/contents.xcworkspacedata 164 | /*.gcno 165 | **/xcshareddata/WorkspaceSettings.xcsettings 166 | 167 | # End of https://www.gitignore.io/api/xcode,macos,swift,cocoapods,objective-c 168 | -------------------------------------------------------------------------------- /MoyaDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2FAD1EAD1E5E79FD00B8DBF6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EAC1E5E79FD00B8DBF6 /* AppDelegate.swift */; }; 11 | 2FAD1EAF1E5E79FD00B8DBF6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EAE1E5E79FD00B8DBF6 /* ViewController.swift */; }; 12 | 2FAD1EB21E5E79FD00B8DBF6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD1EB01E5E79FD00B8DBF6 /* Main.storyboard */; }; 13 | 2FAD1EB41E5E79FD00B8DBF6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD1EB31E5E79FD00B8DBF6 /* Assets.xcassets */; }; 14 | 2FAD1EB71E5E79FD00B8DBF6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD1EB51E5E79FD00B8DBF6 /* LaunchScreen.storyboard */; }; 15 | 2FAD1EC21E5E79FD00B8DBF6 /* MoyaDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EC11E5E79FD00B8DBF6 /* MoyaDemoTests.swift */; }; 16 | 2FAD1ECD1E5E79FD00B8DBF6 /* MoyaDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1ECC1E5E79FD00B8DBF6 /* MoyaDemoUITests.swift */; }; 17 | 2FAD1EDC1E5E7B2C00B8DBF6 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EDA1E5E7B2C00B8DBF6 /* API.swift */; }; 18 | 2FAD1EDD1E5E7B2C00B8DBF6 /* AppService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EDB1E5E7B2C00B8DBF6 /* AppService.swift */; }; 19 | 2FAD1EE01E5E7D4F00B8DBF6 /* Observable+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EDE1E5E7D4F00B8DBF6 /* Observable+Extension.swift */; }; 20 | 2FAD1EE11E5E7D4F00B8DBF6 /* Observable+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EDF1E5E7D4F00B8DBF6 /* Observable+ObjectMapper.swift */; }; 21 | 2FAD1EE31E5E8A8300B8DBF6 /* LoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EE21E5E8A8300B8DBF6 /* LoginModel.swift */; }; 22 | 2FAD1EE51E5E8ACB00B8DBF6 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EE41E5E8ACB00B8DBF6 /* ViewModel.swift */; }; 23 | 2FAD1EE71E5E8CC600B8DBF6 /* VideoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAD1EE61E5E8CC600B8DBF6 /* VideoModel.swift */; }; 24 | 69C768E341EC1E8613CA0A30 /* Pods_MoyaDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2029528163F03C1711D17EC /* Pods_MoyaDemo.framework */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 2FAD1EBE1E5E79FD00B8DBF6 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 2FAD1EA11E5E79FD00B8DBF6 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 2FAD1EA81E5E79FD00B8DBF6; 33 | remoteInfo = MoyaDemo; 34 | }; 35 | 2FAD1EC91E5E79FD00B8DBF6 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 2FAD1EA11E5E79FD00B8DBF6 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 2FAD1EA81E5E79FD00B8DBF6; 40 | remoteInfo = MoyaDemo; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 2FAD1EA91E5E79FD00B8DBF6 /* MoyaDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoyaDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 2FAD1EAC1E5E79FD00B8DBF6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 2FAD1EAE1E5E79FD00B8DBF6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 48 | 2FAD1EB11E5E79FD00B8DBF6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 2FAD1EB31E5E79FD00B8DBF6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 2FAD1EB61E5E79FD00B8DBF6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 2FAD1EB81E5E79FD00B8DBF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 2FAD1EBD1E5E79FD00B8DBF6 /* MoyaDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoyaDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 2FAD1EC11E5E79FD00B8DBF6 /* MoyaDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaDemoTests.swift; sourceTree = ""; }; 54 | 2FAD1EC31E5E79FD00B8DBF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 2FAD1EC81E5E79FD00B8DBF6 /* MoyaDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoyaDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 2FAD1ECC1E5E79FD00B8DBF6 /* MoyaDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaDemoUITests.swift; sourceTree = ""; }; 57 | 2FAD1ECE1E5E79FD00B8DBF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 2FAD1EDA1E5E7B2C00B8DBF6 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; 59 | 2FAD1EDB1E5E7B2C00B8DBF6 /* AppService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppService.swift; sourceTree = ""; }; 60 | 2FAD1EDE1E5E7D4F00B8DBF6 /* Observable+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+Extension.swift"; sourceTree = ""; }; 61 | 2FAD1EDF1E5E7D4F00B8DBF6 /* Observable+ObjectMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+ObjectMapper.swift"; sourceTree = ""; }; 62 | 2FAD1EE21E5E8A8300B8DBF6 /* LoginModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginModel.swift; sourceTree = ""; }; 63 | 2FAD1EE41E5E8ACB00B8DBF6 /* ViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = ""; }; 64 | 2FAD1EE61E5E8CC600B8DBF6 /* VideoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoModel.swift; sourceTree = ""; }; 65 | 540EB849B1FAE7B803BA7E32 /* Pods-MoyaDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MoyaDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-MoyaDemo/Pods-MoyaDemo.release.xcconfig"; sourceTree = ""; }; 66 | 55A228125788A5FC3D04E0EA /* Pods-MoyaDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MoyaDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MoyaDemo/Pods-MoyaDemo.debug.xcconfig"; sourceTree = ""; }; 67 | E2029528163F03C1711D17EC /* Pods_MoyaDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MoyaDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 2FAD1EA61E5E79FD00B8DBF6 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 69C768E341EC1E8613CA0A30 /* Pods_MoyaDemo.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 2FAD1EBA1E5E79FD00B8DBF6 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 2FAD1EC51E5E79FD00B8DBF6 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 098FBA62C844E674EFE03446 /* Pods */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 55A228125788A5FC3D04E0EA /* Pods-MoyaDemo.debug.xcconfig */, 100 | 540EB849B1FAE7B803BA7E32 /* Pods-MoyaDemo.release.xcconfig */, 101 | ); 102 | name = Pods; 103 | sourceTree = ""; 104 | }; 105 | 2FAD1EA01E5E79FD00B8DBF6 = { 106 | isa = PBXGroup; 107 | children = ( 108 | 2FAD1EAB1E5E79FD00B8DBF6 /* MoyaDemo */, 109 | 2FAD1EC01E5E79FD00B8DBF6 /* MoyaDemoTests */, 110 | 2FAD1ECB1E5E79FD00B8DBF6 /* MoyaDemoUITests */, 111 | 2FAD1EAA1E5E79FD00B8DBF6 /* Products */, 112 | 098FBA62C844E674EFE03446 /* Pods */, 113 | 98E264E3E113B8CB417B034D /* Frameworks */, 114 | ); 115 | sourceTree = ""; 116 | }; 117 | 2FAD1EAA1E5E79FD00B8DBF6 /* Products */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 2FAD1EA91E5E79FD00B8DBF6 /* MoyaDemo.app */, 121 | 2FAD1EBD1E5E79FD00B8DBF6 /* MoyaDemoTests.xctest */, 122 | 2FAD1EC81E5E79FD00B8DBF6 /* MoyaDemoUITests.xctest */, 123 | ); 124 | name = Products; 125 | sourceTree = ""; 126 | }; 127 | 2FAD1EAB1E5E79FD00B8DBF6 /* MoyaDemo */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 2FAD1EAC1E5E79FD00B8DBF6 /* AppDelegate.swift */, 131 | 2FAD1EAE1E5E79FD00B8DBF6 /* ViewController.swift */, 132 | 2FAD1EDA1E5E7B2C00B8DBF6 /* API.swift */, 133 | 2FAD1EDB1E5E7B2C00B8DBF6 /* AppService.swift */, 134 | 2FAD1EE21E5E8A8300B8DBF6 /* LoginModel.swift */, 135 | 2FAD1EE61E5E8CC600B8DBF6 /* VideoModel.swift */, 136 | 2FAD1EE41E5E8ACB00B8DBF6 /* ViewModel.swift */, 137 | 2FAD1EDE1E5E7D4F00B8DBF6 /* Observable+Extension.swift */, 138 | 2FAD1EDF1E5E7D4F00B8DBF6 /* Observable+ObjectMapper.swift */, 139 | 2FAD1EB01E5E79FD00B8DBF6 /* Main.storyboard */, 140 | 2FAD1EB31E5E79FD00B8DBF6 /* Assets.xcassets */, 141 | 2FAD1EB51E5E79FD00B8DBF6 /* LaunchScreen.storyboard */, 142 | 2FAD1EB81E5E79FD00B8DBF6 /* Info.plist */, 143 | ); 144 | path = MoyaDemo; 145 | sourceTree = ""; 146 | }; 147 | 2FAD1EC01E5E79FD00B8DBF6 /* MoyaDemoTests */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 2FAD1EC11E5E79FD00B8DBF6 /* MoyaDemoTests.swift */, 151 | 2FAD1EC31E5E79FD00B8DBF6 /* Info.plist */, 152 | ); 153 | path = MoyaDemoTests; 154 | sourceTree = ""; 155 | }; 156 | 2FAD1ECB1E5E79FD00B8DBF6 /* MoyaDemoUITests */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 2FAD1ECC1E5E79FD00B8DBF6 /* MoyaDemoUITests.swift */, 160 | 2FAD1ECE1E5E79FD00B8DBF6 /* Info.plist */, 161 | ); 162 | path = MoyaDemoUITests; 163 | sourceTree = ""; 164 | }; 165 | 98E264E3E113B8CB417B034D /* Frameworks */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | E2029528163F03C1711D17EC /* Pods_MoyaDemo.framework */, 169 | ); 170 | name = Frameworks; 171 | sourceTree = ""; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | 2FAD1EA81E5E79FD00B8DBF6 /* MoyaDemo */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 2FAD1ED11E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemo" */; 179 | buildPhases = ( 180 | 50BC4BE67ED7AFA3477FBB2C /* [CP] Check Pods Manifest.lock */, 181 | 2FAD1EA51E5E79FD00B8DBF6 /* Sources */, 182 | 2FAD1EA61E5E79FD00B8DBF6 /* Frameworks */, 183 | 2FAD1EA71E5E79FD00B8DBF6 /* Resources */, 184 | 49B172938B6775269BA32338 /* [CP] Embed Pods Frameworks */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | ); 190 | name = MoyaDemo; 191 | productName = MoyaDemo; 192 | productReference = 2FAD1EA91E5E79FD00B8DBF6 /* MoyaDemo.app */; 193 | productType = "com.apple.product-type.application"; 194 | }; 195 | 2FAD1EBC1E5E79FD00B8DBF6 /* MoyaDemoTests */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = 2FAD1ED41E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemoTests" */; 198 | buildPhases = ( 199 | 2FAD1EB91E5E79FD00B8DBF6 /* Sources */, 200 | 2FAD1EBA1E5E79FD00B8DBF6 /* Frameworks */, 201 | 2FAD1EBB1E5E79FD00B8DBF6 /* Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | 2FAD1EBF1E5E79FD00B8DBF6 /* PBXTargetDependency */, 207 | ); 208 | name = MoyaDemoTests; 209 | productName = MoyaDemoTests; 210 | productReference = 2FAD1EBD1E5E79FD00B8DBF6 /* MoyaDemoTests.xctest */; 211 | productType = "com.apple.product-type.bundle.unit-test"; 212 | }; 213 | 2FAD1EC71E5E79FD00B8DBF6 /* MoyaDemoUITests */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = 2FAD1ED71E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemoUITests" */; 216 | buildPhases = ( 217 | 2FAD1EC41E5E79FD00B8DBF6 /* Sources */, 218 | 2FAD1EC51E5E79FD00B8DBF6 /* Frameworks */, 219 | 2FAD1EC61E5E79FD00B8DBF6 /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | 2FAD1ECA1E5E79FD00B8DBF6 /* PBXTargetDependency */, 225 | ); 226 | name = MoyaDemoUITests; 227 | productName = MoyaDemoUITests; 228 | productReference = 2FAD1EC81E5E79FD00B8DBF6 /* MoyaDemoUITests.xctest */; 229 | productType = "com.apple.product-type.bundle.ui-testing"; 230 | }; 231 | /* End PBXNativeTarget section */ 232 | 233 | /* Begin PBXProject section */ 234 | 2FAD1EA11E5E79FD00B8DBF6 /* Project object */ = { 235 | isa = PBXProject; 236 | attributes = { 237 | LastSwiftUpdateCheck = 0820; 238 | LastUpgradeCheck = 0820; 239 | ORGANIZATIONNAME = sungrow; 240 | TargetAttributes = { 241 | 2FAD1EA81E5E79FD00B8DBF6 = { 242 | CreatedOnToolsVersion = 8.2; 243 | ProvisioningStyle = Automatic; 244 | }; 245 | 2FAD1EBC1E5E79FD00B8DBF6 = { 246 | CreatedOnToolsVersion = 8.2; 247 | ProvisioningStyle = Automatic; 248 | TestTargetID = 2FAD1EA81E5E79FD00B8DBF6; 249 | }; 250 | 2FAD1EC71E5E79FD00B8DBF6 = { 251 | CreatedOnToolsVersion = 8.2; 252 | ProvisioningStyle = Automatic; 253 | TestTargetID = 2FAD1EA81E5E79FD00B8DBF6; 254 | }; 255 | }; 256 | }; 257 | buildConfigurationList = 2FAD1EA41E5E79FD00B8DBF6 /* Build configuration list for PBXProject "MoyaDemo" */; 258 | compatibilityVersion = "Xcode 3.2"; 259 | developmentRegion = English; 260 | hasScannedForEncodings = 0; 261 | knownRegions = ( 262 | English, 263 | en, 264 | Base, 265 | ); 266 | mainGroup = 2FAD1EA01E5E79FD00B8DBF6; 267 | productRefGroup = 2FAD1EAA1E5E79FD00B8DBF6 /* Products */; 268 | projectDirPath = ""; 269 | projectRoot = ""; 270 | targets = ( 271 | 2FAD1EA81E5E79FD00B8DBF6 /* MoyaDemo */, 272 | 2FAD1EBC1E5E79FD00B8DBF6 /* MoyaDemoTests */, 273 | 2FAD1EC71E5E79FD00B8DBF6 /* MoyaDemoUITests */, 274 | ); 275 | }; 276 | /* End PBXProject section */ 277 | 278 | /* Begin PBXResourcesBuildPhase section */ 279 | 2FAD1EA71E5E79FD00B8DBF6 /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 2FAD1EB71E5E79FD00B8DBF6 /* LaunchScreen.storyboard in Resources */, 284 | 2FAD1EB41E5E79FD00B8DBF6 /* Assets.xcassets in Resources */, 285 | 2FAD1EB21E5E79FD00B8DBF6 /* Main.storyboard in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 2FAD1EBB1E5E79FD00B8DBF6 /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | 2FAD1EC61E5E79FD00B8DBF6 /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXShellScriptBuildPhase section */ 306 | 49B172938B6775269BA32338 /* [CP] Embed Pods Frameworks */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputPaths = ( 312 | "${PODS_ROOT}/Target Support Files/Pods-MoyaDemo/Pods-MoyaDemo-frameworks.sh", 313 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", 314 | "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework", 315 | "${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework", 316 | "${BUILT_PRODUCTS_DIR}/Result/Result.framework", 317 | "${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework", 318 | "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", 319 | "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", 320 | ); 321 | name = "[CP] Embed Pods Frameworks"; 322 | outputPaths = ( 323 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", 324 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework", 325 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework", 326 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Result.framework", 327 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework", 328 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", 329 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", 330 | ); 331 | runOnlyForDeploymentPostprocessing = 0; 332 | shellPath = /bin/sh; 333 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MoyaDemo/Pods-MoyaDemo-frameworks.sh\"\n"; 334 | showEnvVarsInLog = 0; 335 | }; 336 | 50BC4BE67ED7AFA3477FBB2C /* [CP] Check Pods Manifest.lock */ = { 337 | isa = PBXShellScriptBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | ); 341 | inputPaths = ( 342 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 343 | "${PODS_ROOT}/Manifest.lock", 344 | ); 345 | name = "[CP] Check Pods Manifest.lock"; 346 | outputPaths = ( 347 | "$(DERIVED_FILE_DIR)/Pods-MoyaDemo-checkManifestLockResult.txt", 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | shellPath = /bin/sh; 351 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 352 | showEnvVarsInLog = 0; 353 | }; 354 | /* End PBXShellScriptBuildPhase section */ 355 | 356 | /* Begin PBXSourcesBuildPhase section */ 357 | 2FAD1EA51E5E79FD00B8DBF6 /* Sources */ = { 358 | isa = PBXSourcesBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | 2FAD1EE11E5E7D4F00B8DBF6 /* Observable+ObjectMapper.swift in Sources */, 362 | 2FAD1EE31E5E8A8300B8DBF6 /* LoginModel.swift in Sources */, 363 | 2FAD1EAF1E5E79FD00B8DBF6 /* ViewController.swift in Sources */, 364 | 2FAD1EDD1E5E7B2C00B8DBF6 /* AppService.swift in Sources */, 365 | 2FAD1EE71E5E8CC600B8DBF6 /* VideoModel.swift in Sources */, 366 | 2FAD1EE01E5E7D4F00B8DBF6 /* Observable+Extension.swift in Sources */, 367 | 2FAD1EDC1E5E7B2C00B8DBF6 /* API.swift in Sources */, 368 | 2FAD1EE51E5E8ACB00B8DBF6 /* ViewModel.swift in Sources */, 369 | 2FAD1EAD1E5E79FD00B8DBF6 /* AppDelegate.swift in Sources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | 2FAD1EB91E5E79FD00B8DBF6 /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 2FAD1EC21E5E79FD00B8DBF6 /* MoyaDemoTests.swift in Sources */, 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | }; 381 | 2FAD1EC41E5E79FD00B8DBF6 /* Sources */ = { 382 | isa = PBXSourcesBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | 2FAD1ECD1E5E79FD00B8DBF6 /* MoyaDemoUITests.swift in Sources */, 386 | ); 387 | runOnlyForDeploymentPostprocessing = 0; 388 | }; 389 | /* End PBXSourcesBuildPhase section */ 390 | 391 | /* Begin PBXTargetDependency section */ 392 | 2FAD1EBF1E5E79FD00B8DBF6 /* PBXTargetDependency */ = { 393 | isa = PBXTargetDependency; 394 | target = 2FAD1EA81E5E79FD00B8DBF6 /* MoyaDemo */; 395 | targetProxy = 2FAD1EBE1E5E79FD00B8DBF6 /* PBXContainerItemProxy */; 396 | }; 397 | 2FAD1ECA1E5E79FD00B8DBF6 /* PBXTargetDependency */ = { 398 | isa = PBXTargetDependency; 399 | target = 2FAD1EA81E5E79FD00B8DBF6 /* MoyaDemo */; 400 | targetProxy = 2FAD1EC91E5E79FD00B8DBF6 /* PBXContainerItemProxy */; 401 | }; 402 | /* End PBXTargetDependency section */ 403 | 404 | /* Begin PBXVariantGroup section */ 405 | 2FAD1EB01E5E79FD00B8DBF6 /* Main.storyboard */ = { 406 | isa = PBXVariantGroup; 407 | children = ( 408 | 2FAD1EB11E5E79FD00B8DBF6 /* Base */, 409 | ); 410 | name = Main.storyboard; 411 | sourceTree = ""; 412 | }; 413 | 2FAD1EB51E5E79FD00B8DBF6 /* LaunchScreen.storyboard */ = { 414 | isa = PBXVariantGroup; 415 | children = ( 416 | 2FAD1EB61E5E79FD00B8DBF6 /* Base */, 417 | ); 418 | name = LaunchScreen.storyboard; 419 | sourceTree = ""; 420 | }; 421 | /* End PBXVariantGroup section */ 422 | 423 | /* Begin XCBuildConfiguration section */ 424 | 2FAD1ECF1E5E79FD00B8DBF6 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ALWAYS_SEARCH_USER_PATHS = NO; 428 | CLANG_ANALYZER_NONNULL = YES; 429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 430 | CLANG_CXX_LIBRARY = "libc++"; 431 | CLANG_ENABLE_MODULES = YES; 432 | CLANG_ENABLE_OBJC_ARC = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_CONSTANT_CONVERSION = YES; 435 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 436 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 437 | CLANG_WARN_EMPTY_BODY = YES; 438 | CLANG_WARN_ENUM_CONVERSION = YES; 439 | CLANG_WARN_INFINITE_RECURSION = YES; 440 | CLANG_WARN_INT_CONVERSION = YES; 441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 442 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 443 | CLANG_WARN_UNREACHABLE_CODE = YES; 444 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 445 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 446 | COPY_PHASE_STRIP = NO; 447 | DEBUG_INFORMATION_FORMAT = dwarf; 448 | ENABLE_STRICT_OBJC_MSGSEND = YES; 449 | ENABLE_TESTABILITY = YES; 450 | GCC_C_LANGUAGE_STANDARD = gnu99; 451 | GCC_DYNAMIC_NO_PIC = NO; 452 | GCC_NO_COMMON_BLOCKS = YES; 453 | GCC_OPTIMIZATION_LEVEL = 0; 454 | GCC_PREPROCESSOR_DEFINITIONS = ( 455 | "DEBUG=1", 456 | "$(inherited)", 457 | ); 458 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 459 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 460 | GCC_WARN_UNDECLARED_SELECTOR = YES; 461 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 462 | GCC_WARN_UNUSED_FUNCTION = YES; 463 | GCC_WARN_UNUSED_VARIABLE = YES; 464 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 465 | MTL_ENABLE_DEBUG_INFO = YES; 466 | ONLY_ACTIVE_ARCH = YES; 467 | SDKROOT = iphoneos; 468 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 469 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 470 | SWIFT_VERSION = 5.0; 471 | }; 472 | name = Debug; 473 | }; 474 | 2FAD1ED01E5E79FD00B8DBF6 /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ALWAYS_SEARCH_USER_PATHS = NO; 478 | CLANG_ANALYZER_NONNULL = YES; 479 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 480 | CLANG_CXX_LIBRARY = "libc++"; 481 | CLANG_ENABLE_MODULES = YES; 482 | CLANG_ENABLE_OBJC_ARC = YES; 483 | CLANG_WARN_BOOL_CONVERSION = YES; 484 | CLANG_WARN_CONSTANT_CONVERSION = YES; 485 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 486 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 487 | CLANG_WARN_EMPTY_BODY = YES; 488 | CLANG_WARN_ENUM_CONVERSION = YES; 489 | CLANG_WARN_INFINITE_RECURSION = YES; 490 | CLANG_WARN_INT_CONVERSION = YES; 491 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 492 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 493 | CLANG_WARN_UNREACHABLE_CODE = YES; 494 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 495 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 496 | COPY_PHASE_STRIP = NO; 497 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 498 | ENABLE_NS_ASSERTIONS = NO; 499 | ENABLE_STRICT_OBJC_MSGSEND = YES; 500 | GCC_C_LANGUAGE_STANDARD = gnu99; 501 | GCC_NO_COMMON_BLOCKS = YES; 502 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 503 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 504 | GCC_WARN_UNDECLARED_SELECTOR = YES; 505 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 506 | GCC_WARN_UNUSED_FUNCTION = YES; 507 | GCC_WARN_UNUSED_VARIABLE = YES; 508 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 509 | MTL_ENABLE_DEBUG_INFO = NO; 510 | SDKROOT = iphoneos; 511 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 512 | SWIFT_VERSION = 5.0; 513 | VALIDATE_PRODUCT = YES; 514 | }; 515 | name = Release; 516 | }; 517 | 2FAD1ED21E5E79FD00B8DBF6 /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | baseConfigurationReference = 55A228125788A5FC3D04E0EA /* Pods-MoyaDemo.debug.xcconfig */; 520 | buildSettings = { 521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 522 | INFOPLIST_FILE = MoyaDemo/Info.plist; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 524 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemo; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | SWIFT_VERSION = 5.0; 527 | }; 528 | name = Debug; 529 | }; 530 | 2FAD1ED31E5E79FD00B8DBF6 /* Release */ = { 531 | isa = XCBuildConfiguration; 532 | baseConfigurationReference = 540EB849B1FAE7B803BA7E32 /* Pods-MoyaDemo.release.xcconfig */; 533 | buildSettings = { 534 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 535 | INFOPLIST_FILE = MoyaDemo/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 537 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemo; 538 | PRODUCT_NAME = "$(TARGET_NAME)"; 539 | SWIFT_VERSION = 5.0; 540 | }; 541 | name = Release; 542 | }; 543 | 2FAD1ED51E5E79FD00B8DBF6 /* Debug */ = { 544 | isa = XCBuildConfiguration; 545 | buildSettings = { 546 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 547 | BUNDLE_LOADER = "$(TEST_HOST)"; 548 | INFOPLIST_FILE = MoyaDemoTests/Info.plist; 549 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 550 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemoTests; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | SWIFT_VERSION = 3.0; 553 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoyaDemo.app/MoyaDemo"; 554 | }; 555 | name = Debug; 556 | }; 557 | 2FAD1ED61E5E79FD00B8DBF6 /* Release */ = { 558 | isa = XCBuildConfiguration; 559 | buildSettings = { 560 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 561 | BUNDLE_LOADER = "$(TEST_HOST)"; 562 | INFOPLIST_FILE = MoyaDemoTests/Info.plist; 563 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 564 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemoTests; 565 | PRODUCT_NAME = "$(TARGET_NAME)"; 566 | SWIFT_VERSION = 3.0; 567 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MoyaDemo.app/MoyaDemo"; 568 | }; 569 | name = Release; 570 | }; 571 | 2FAD1ED81E5E79FD00B8DBF6 /* Debug */ = { 572 | isa = XCBuildConfiguration; 573 | buildSettings = { 574 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 575 | INFOPLIST_FILE = MoyaDemoUITests/Info.plist; 576 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 577 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemoUITests; 578 | PRODUCT_NAME = "$(TARGET_NAME)"; 579 | SWIFT_VERSION = 3.0; 580 | TEST_TARGET_NAME = MoyaDemo; 581 | }; 582 | name = Debug; 583 | }; 584 | 2FAD1ED91E5E79FD00B8DBF6 /* Release */ = { 585 | isa = XCBuildConfiguration; 586 | buildSettings = { 587 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 588 | INFOPLIST_FILE = MoyaDemoUITests/Info.plist; 589 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 590 | PRODUCT_BUNDLE_IDENTIFIER = sungrow.com.MoyaDemoUITests; 591 | PRODUCT_NAME = "$(TARGET_NAME)"; 592 | SWIFT_VERSION = 3.0; 593 | TEST_TARGET_NAME = MoyaDemo; 594 | }; 595 | name = Release; 596 | }; 597 | /* End XCBuildConfiguration section */ 598 | 599 | /* Begin XCConfigurationList section */ 600 | 2FAD1EA41E5E79FD00B8DBF6 /* Build configuration list for PBXProject "MoyaDemo" */ = { 601 | isa = XCConfigurationList; 602 | buildConfigurations = ( 603 | 2FAD1ECF1E5E79FD00B8DBF6 /* Debug */, 604 | 2FAD1ED01E5E79FD00B8DBF6 /* Release */, 605 | ); 606 | defaultConfigurationIsVisible = 0; 607 | defaultConfigurationName = Release; 608 | }; 609 | 2FAD1ED11E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemo" */ = { 610 | isa = XCConfigurationList; 611 | buildConfigurations = ( 612 | 2FAD1ED21E5E79FD00B8DBF6 /* Debug */, 613 | 2FAD1ED31E5E79FD00B8DBF6 /* Release */, 614 | ); 615 | defaultConfigurationIsVisible = 0; 616 | defaultConfigurationName = Release; 617 | }; 618 | 2FAD1ED41E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemoTests" */ = { 619 | isa = XCConfigurationList; 620 | buildConfigurations = ( 621 | 2FAD1ED51E5E79FD00B8DBF6 /* Debug */, 622 | 2FAD1ED61E5E79FD00B8DBF6 /* Release */, 623 | ); 624 | defaultConfigurationIsVisible = 0; 625 | defaultConfigurationName = Release; 626 | }; 627 | 2FAD1ED71E5E79FD00B8DBF6 /* Build configuration list for PBXNativeTarget "MoyaDemoUITests" */ = { 628 | isa = XCConfigurationList; 629 | buildConfigurations = ( 630 | 2FAD1ED81E5E79FD00B8DBF6 /* Debug */, 631 | 2FAD1ED91E5E79FD00B8DBF6 /* Release */, 632 | ); 633 | defaultConfigurationIsVisible = 0; 634 | defaultConfigurationName = Release; 635 | }; 636 | /* End XCConfigurationList section */ 637 | }; 638 | rootObject = 2FAD1EA11E5E79FD00B8DBF6 /* Project object */; 639 | } 640 | -------------------------------------------------------------------------------- /MoyaDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MoyaDemo.xcodeproj/project.xcworkspace/xcuserdata/sungrow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YQqiang/MoyaDemo/d0934dd6451a6b446258721c0cca9f5d064879d2/MoyaDemo.xcodeproj/project.xcworkspace/xcuserdata/sungrow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MoyaDemo.xcodeproj/xcuserdata/sungrow.xcuserdatad/xcschemes/MoyaDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /MoyaDemo.xcodeproj/xcuserdata/sungrow.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MoyaDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2FAD1EA81E5E79FD00B8DBF6 16 | 17 | primary 18 | 19 | 20 | 2FAD1EBC1E5E79FD00B8DBF6 21 | 22 | primary 23 | 24 | 25 | 2FAD1EC71E5E79FD00B8DBF6 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MoyaDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MoyaDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MoyaDemo.xcworkspace/xcuserdata/sungrow.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YQqiang/MoyaDemo/d0934dd6451a6b446258721c0cca9f5d064879d2/MoyaDemo.xcworkspace/xcuserdata/sungrow.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MoyaDemo.xcworkspace/xcuserdata/sungrow.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /MoyaDemo/API.swift: -------------------------------------------------------------------------------- 1 | // 2 | // API.swift 3 | // operation4ios 4 | // 5 | // Created by sungrow on 2017/2/17. 6 | // Copyright © 2017年 阳光电源股份有限公司. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Moya 11 | 12 | let API_PRO = "http://120.25.226.186:32812" 13 | 14 | let headerFields: [String: String] = ["system": "iOS","sys_ver": String(UIDevice.version())] 15 | let publicParameters: [String: String] = ["language": "_zh_CN"] 16 | -------------------------------------------------------------------------------- /MoyaDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MoyaDemo 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /MoyaDemo/AppService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnekeyService.swift 3 | // operation4ios 4 | // 5 | // Created by sungrow on 2017/2/17. 6 | // Copyright © 2017年 阳光电源股份有限公司. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Moya 11 | 12 | enum AppService: TargetType { 13 | case login(username: String, pwd: String) 14 | case video 15 | } 16 | 17 | extension AppService { 18 | 19 | var headers: [String : String]? { 20 | return [:] 21 | } 22 | 23 | var baseURL: URL { 24 | return URL(string: API_PRO)! 25 | } 26 | 27 | var path: String { 28 | switch self { 29 | case .login(username: _, pwd: _): 30 | return "/login" 31 | case .video: 32 | return "/video" 33 | } 34 | } 35 | 36 | var method: Moya.Method { 37 | switch self { 38 | case .login(username: _, pwd: _): 39 | return .get 40 | case .video: 41 | return .post 42 | } 43 | } 44 | 45 | var parameters: [String: Any] { 46 | switch self { 47 | case .login(username: let username, pwd: let pwd): 48 | return ["username": username, "pwd": pwd] 49 | case .video: 50 | return ["type": "JSON"] 51 | } 52 | } 53 | 54 | var parameterEncoding: ParameterEncoding { 55 | return URLEncoding.default 56 | } 57 | 58 | var sampleData: Data { 59 | return "".data(using: String.Encoding.utf8)! 60 | } 61 | 62 | var task: Task { 63 | return .requestParameters(parameters: parameters, encoding: parameterEncoding) 64 | } 65 | } 66 | 67 | private let endPointClosure = { (target: AppService) -> Endpoint in 68 | let defaultEndpoint = MoyaProvider.defaultEndpointMapping(for: target) 69 | return defaultEndpoint.adding(newHTTPHeaderFields: headerFields) 70 | } 71 | 72 | let appServiceProvider = MoyaProvider.init() 73 | -------------------------------------------------------------------------------- /MoyaDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /MoyaDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MoyaDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /MoyaDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | en 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleVersion 25 | 1 26 | LSRequiresIPhoneOS 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /MoyaDemo/LoginModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginModel.swift 3 | // MoyaDemo 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import ObjectMapper 11 | 12 | class LoginModel: Mappable { 13 | var error: String? 14 | var success: String? 15 | 16 | required init?(map: Map) { 17 | } 18 | 19 | func mapping(map: Map) { 20 | error <- map["error"] 21 | success <- map["success"] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MoyaDemo/Observable+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Observable+Extension.swift 3 | // operation4ios 4 | // 5 | // Created by sungrow on 2017/2/18. 6 | // Copyright © 2017年 阳光电源股份有限公司. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RxSwift 11 | 12 | extension Observable { 13 | func showAPIErrorToast() -> Observable { 14 | return self.do(onNext: { (event) in 15 | }, onError: { (error) in 16 | // TODO: 可以在此处做一些网络错误的时候的提示信息 17 | print("\(error.localizedDescription)") 18 | }, onCompleted: { 19 | }, onSubscribe: { 20 | }, onDispose: { 21 | }) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MoyaDemo/Observable+ObjectMapper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Observable+ObjectMapper.swift 3 | // operation4ios 4 | // 5 | // Created by sungrow on 2017/2/18. 6 | // Copyright © 2017年 阳光电源股份有限公司. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RxSwift 11 | import Moya 12 | import ObjectMapper 13 | 14 | enum RxSwiftMoyaError : Swift.Error { 15 | case ParseJSONError 16 | case NoRepresentor 17 | case NotSuccessfulHTTP 18 | case NoData 19 | case CouldNotMakeObjectError 20 | case BizError(resultCode: String, resultMsg: String) 21 | } 22 | 23 | extension RxSwiftMoyaError: LocalizedError { 24 | public var errorDescription: String? { 25 | switch self { 26 | case .ParseJSONError: 27 | return "数据解析失败" 28 | case .NoRepresentor: 29 | return "NoRepresentor." 30 | case .NotSuccessfulHTTP: 31 | return "NotSuccessfulHTTP." 32 | case .NoData: 33 | return "NoData." 34 | case .CouldNotMakeObjectError: 35 | return "CouldNotMakeObjectError." 36 | case .BizError(resultCode: let resultCode, resultMsg: let resultMsg): 37 | return "错误码: \(resultCode), 错误信息: \(resultMsg)" 38 | } 39 | } 40 | } 41 | 42 | extension Observable { 43 | func mapObject(type: T.Type) -> Observable { 44 | return self.map { response in 45 | //if response is a dictionary, then use ObjectMapper to map the dictionary 46 | //if not throw an error 47 | guard let dict = response as? [String: Any] else { 48 | throw RxSwiftMoyaError.ParseJSONError 49 | } 50 | return Mapper().map(JSON: dict)! 51 | } 52 | } 53 | 54 | func mapArray(type: T.Type) -> Observable<[T]> { 55 | return self.map { response in 56 | //if response is an array of dictionaries, then use ObjectMapper to map the dictionary 57 | //if not, throw an error 58 | guard let array = response as? [[String: Any]] else { 59 | throw RxSwiftMoyaError.ParseJSONError 60 | } 61 | return Mapper().mapArray(JSONArray: array) 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /MoyaDemo/VideoModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VideoModel.swift 3 | // MoyaDemo 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import ObjectMapper 11 | 12 | class VideoModel: Mappable { 13 | var videos: [Video]? 14 | 15 | required init?(map: Map) { 16 | } 17 | 18 | func mapping(map: Map) { 19 | videos <- map["videos"] 20 | } 21 | } 22 | 23 | class Video: Mappable { 24 | var id: Int? 25 | var length: Float? 26 | var name: String? 27 | var url: String? 28 | 29 | required init?(map: Map) { 30 | } 31 | 32 | func mapping(map: Map) { 33 | id <- map["id"] 34 | length <- map["length"] 35 | name <- map["name"] 36 | url <- map["url"] 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /MoyaDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // MoyaDemo 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | import RxCocoa 12 | 13 | class ViewController: UIViewController { 14 | 15 | let disposeBag = DisposeBag() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | let viewModel = ViewModel() 21 | viewModel.login(username: "520it", pwd: "520it").subscribe(onNext: { (loginModel) in 22 | print("---\(loginModel.success)") 23 | }).addDisposableTo(disposeBag) 24 | 25 | viewModel.video().subscribe(onNext: { (videoModel) in 26 | guard let videos = videoModel.videos else { 27 | return 28 | } 29 | for video in videos { 30 | print("----id:\(video.id)---length:\(video.length)---name:\(video.name)---url:\(video.url)") 31 | } 32 | }).disposed(by: disposeBag) 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /MoyaDemo/ViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModel.swift 3 | // MoyaDemo 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RxSwift 11 | 12 | class ViewModel { 13 | 14 | func login(username: String, pwd: String) -> Observable { 15 | return appServiceProvider.rx.request(.login(username: username, pwd: pwd)) 16 | .filterSuccessfulStatusCodes() 17 | .mapJSON().asObservable() 18 | .showAPIErrorToast() 19 | .mapObject(type: LoginModel.self) 20 | } 21 | 22 | func video() -> Observable { 23 | return appServiceProvider.rx.request(.video) 24 | .filterSuccessfulStatusCodes() 25 | .mapJSON().asObservable() 26 | .showAPIErrorToast() 27 | .mapObject(type: VideoModel.self) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /MoyaDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MoyaDemoTests/MoyaDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MoyaDemoTests.swift 3 | // MoyaDemoTests 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import MoyaDemo 11 | 12 | class MoyaDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /MoyaDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MoyaDemoUITests/MoyaDemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MoyaDemoUITests.swift 3 | // MoyaDemoUITests 4 | // 5 | // Created by sungrow on 2017/2/23. 6 | // Copyright © 2017年 sungrow. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class MoyaDemoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | target "MoyaDemo" do 3 | pod 'RxSwift' 4 | pod 'RxCocoa' 5 | pod 'Moya/RxSwift' 6 | pod 'ObjectMapper' 7 | end 8 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.8.1) 3 | - Moya/Core (12.0.1): 4 | - Alamofire (~> 4.1) 5 | - Result (~> 4.0) 6 | - Moya/RxSwift (12.0.1): 7 | - Moya/Core 8 | - RxSwift (~> 4.0) 9 | - ObjectMapper (3.4.2) 10 | - Result (4.1.0) 11 | - RxAtomic (4.4.2) 12 | - RxCocoa (4.4.2): 13 | - RxSwift (>= 4.4.2, ~> 4.4) 14 | - RxSwift (4.4.2): 15 | - RxAtomic (>= 4.4.2, ~> 4.4) 16 | 17 | DEPENDENCIES: 18 | - Moya/RxSwift 19 | - ObjectMapper 20 | - RxCocoa 21 | - RxSwift 22 | 23 | SPEC REPOS: 24 | https://github.com/cocoapods/specs.git: 25 | - Alamofire 26 | - Moya 27 | - ObjectMapper 28 | - Result 29 | - RxAtomic 30 | - RxCocoa 31 | - RxSwift 32 | 33 | SPEC CHECKSUMS: 34 | Alamofire: 16ce2c353fb72865124ddae8a57c5942388f4f11 35 | Moya: cf730b3cd9e005401ef37a85143aa141a12fd38f 36 | ObjectMapper: 0d4402610f4e468903ae64629eec4784531e5c51 37 | Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 38 | RxAtomic: d00e97c10db88c6f08540e0bf2752fc5a2404167 39 | RxCocoa: 477990dc3b4c3ff55fb0ac77e1cc06244e0aaec8 40 | RxSwift: 74c29b693c8e42b0f64400e8b06564575742d649 41 | 42 | PODFILE CHECKSUM: 6d80616c946ee604c24e3f8b38df18c7c6b4071e 43 | 44 | COCOAPODS: 1.7.0.beta.3 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MoyaDemo 2 | RxSwift + Moya + ObjectMapper + MVVM 的网络请求 3 | 4 | # 博客地址(对demo的详解说明) 5 | [RxSwift + Moya + ObjectMapper + MVVM 的网络请求](http://yuqiangcoder.com/2017/02/23/RxSwift-+-Moya-+-ObjectMapper-+-MVVM-%E7%9A%84%E7%BD%91%E7%BB%9C%E8%AF%B7%E6%B1%82.html) 6 | 7 | --------------------------------------------------------------------------------