├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── RSSReader.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── RSSReader ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x-1.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── Icon-Spotlight-40.png │ │ ├── Icon-Spotlight-40@2x-1.png │ │ ├── Icon-Spotlight-40@2x.png │ │ └── Icon-Spotlight-40@3x.png │ ├── Top Album Icon.imageset │ │ ├── 1042-album.png │ │ ├── 1042-album@2x.png │ │ ├── 1042-album@3x.png │ │ └── Contents.json │ ├── Top App Icon.imageset │ │ ├── 919-ipod-touch.png │ │ ├── 919-ipod-touch@2x.png │ │ ├── 919-ipod-touch@3x.png │ │ └── Contents.json │ ├── Top Movie Icon.imageset │ │ ├── 930-film-2.png │ │ ├── 930-film-2@2x.png │ │ ├── 930-film-2@3x.png │ │ └── Contents.json │ └── Top Song Icon.imageset │ │ ├── 948-music-note.png │ │ ├── 948-music-note@2x.png │ │ ├── 948-music-note@3x.png │ │ └── Contents.json ├── Info.plist └── TopMediaController.swift └── RSSReaderTests ├── Info.plist └── RSSReaderTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | .DS_Store 4 | build/ 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | xcuserdata 14 | *.xccheckout 15 | *.moved-aside 16 | DerivedData 17 | *.hmap 18 | *.ipa 19 | *.xcuserstate 20 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | ## Post an Issue 4 | 5 | If you discover a bug or error, please add an issue here on GitHub. Feature requests are welcome. However, this is a community effort, so pull requests are preferred. 6 | 7 | ## Create a Pull Request 8 | 9 | Fork the project, create a branch, commit your changes, and then create a pull request. Please submit your pull request to the **develop** branch of this repository. 10 | 11 | The **master** branch is for production-ready code and should not contain incomplete features. Development occurs on the **develop** branch. Once your pull request is accepted, it will be merged into **master**. 12 | 13 | ## Tags 14 | 15 | This repository uses tags to mark intermediate steps of the app development, and these tags correspond to lessons in the [Teaching App Development with Swift](http://swifteducation.github.io) course materials. For example, the tag **lesson01** represents an Xcode project that is ready for working through the steps in Lesson 1. The **end** tag always represents the completed app, which represents an Xcode project that has accomplished all of the features within all of the respective lesson plans for the project. 16 | 17 | ## Impacts to Lesson Plans 18 | 19 | Please note that, because this Xcode project corresponds with lesson plans in the [Teaching App Development with Swift](http://swifteducation.github.io) course materials, you may also need to submit an issue or pull request in the [Teaching App Development with Swift repository](http://github.com/SwiftEducation/teaching-app-dev-swift). 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, by Yong Bakos, except where otherwise noted. 2 | 3 | https://creativecommons.org/licenses/by-nc-sa/4.0/ 4 | 5 | Tab bar icon graphics are [licensed by Joseph Wain](http://glyphish.com/license.txt), and used with permission. 6 | iTunes media art is copyright each respective owner and not covered by this license. 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Deprecation Warning 4 | 5 | The Swift Education materials are out of date, and are no longer maintained. 6 | 7 | # RSSReader 8 | 9 | ### Level 4, Eight Lessons 10 | 11 | Demonstrate how a tab bar controller helps manage an interface for multiple view controllers. Discover how iOS apps obtain and use network data such as RSS feeds containing media metadata. Teach students about the importance of separating data from code, extracting structured data, and invoking asynchronous methods. 12 | 13 | ## Contributing 14 | 15 | See [CONTRIBUTING.md](CONTRIBUTING.md). 16 | 17 | ## License 18 | 19 | This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/), by Yong Bakos, except for the tab bar icon graphics files and the media art retrieved from the iTunes store. Tab bar icon graphics are [licensed by Joseph Wain](http://glyphish.com/license.txt), and used with permission. iTunes media art is copyright each respective owner and not covered by this license. 20 | -------------------------------------------------------------------------------- /RSSReader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F9674BD21B4859DC00A1FF8B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9674BD01B4859DC00A1FF8B /* Main.storyboard */; }; 11 | F989C6D61B4B2184006B591D /* TopMediaController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F989C6D51B4B2184006B591D /* TopMediaController.swift */; }; 12 | F9B18B301B45EF600021AFE5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B18B2F1B45EF600021AFE5 /* AppDelegate.swift */; }; 13 | F9B18B371B45EF600021AFE5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F9B18B361B45EF600021AFE5 /* Images.xcassets */; }; 14 | F9B18B3A1B45EF600021AFE5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9B18B381B45EF600021AFE5 /* LaunchScreen.xib */; }; 15 | F9B18B461B45EF600021AFE5 /* RSSReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B18B451B45EF600021AFE5 /* RSSReaderTests.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | F9B18B401B45EF600021AFE5 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = F9B18B221B45EF600021AFE5 /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = F9B18B291B45EF600021AFE5; 24 | remoteInfo = RSSReader; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | F9674BD11B4859DC00A1FF8B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 30 | F989C6D51B4B2184006B591D /* TopMediaController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TopMediaController.swift; sourceTree = ""; }; 31 | F9B18B2A1B45EF600021AFE5 /* RSSReader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSSReader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | F9B18B2E1B45EF600021AFE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | F9B18B2F1B45EF600021AFE5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | F9B18B361B45EF600021AFE5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 35 | F9B18B391B45EF600021AFE5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 36 | F9B18B3F1B45EF600021AFE5 /* RSSReaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RSSReaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | F9B18B441B45EF600021AFE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | F9B18B451B45EF600021AFE5 /* RSSReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RSSReaderTests.swift; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | F9B18B271B45EF600021AFE5 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | F9B18B3C1B45EF600021AFE5 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | F9B18B211B45EF600021AFE5 = { 60 | isa = PBXGroup; 61 | children = ( 62 | F9B18B2C1B45EF600021AFE5 /* RSSReader */, 63 | F9B18B421B45EF600021AFE5 /* RSSReaderTests */, 64 | F9B18B2B1B45EF600021AFE5 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | F9B18B2B1B45EF600021AFE5 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | F9B18B2A1B45EF600021AFE5 /* RSSReader.app */, 72 | F9B18B3F1B45EF600021AFE5 /* RSSReaderTests.xctest */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | F9B18B2C1B45EF600021AFE5 /* RSSReader */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | F9B18B2F1B45EF600021AFE5 /* AppDelegate.swift */, 81 | F989C6D51B4B2184006B591D /* TopMediaController.swift */, 82 | F9674BD01B4859DC00A1FF8B /* Main.storyboard */, 83 | F9B18B361B45EF600021AFE5 /* Images.xcassets */, 84 | F9B18B381B45EF600021AFE5 /* LaunchScreen.xib */, 85 | F9B18B2D1B45EF600021AFE5 /* Supporting Files */, 86 | ); 87 | path = RSSReader; 88 | sourceTree = ""; 89 | }; 90 | F9B18B2D1B45EF600021AFE5 /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | F9B18B2E1B45EF600021AFE5 /* Info.plist */, 94 | ); 95 | name = "Supporting Files"; 96 | sourceTree = ""; 97 | }; 98 | F9B18B421B45EF600021AFE5 /* RSSReaderTests */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | F9B18B451B45EF600021AFE5 /* RSSReaderTests.swift */, 102 | F9B18B431B45EF600021AFE5 /* Supporting Files */, 103 | ); 104 | path = RSSReaderTests; 105 | sourceTree = ""; 106 | }; 107 | F9B18B431B45EF600021AFE5 /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | F9B18B441B45EF600021AFE5 /* Info.plist */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | F9B18B291B45EF600021AFE5 /* RSSReader */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = F9B18B491B45EF600021AFE5 /* Build configuration list for PBXNativeTarget "RSSReader" */; 121 | buildPhases = ( 122 | F9B18B261B45EF600021AFE5 /* Sources */, 123 | F9B18B271B45EF600021AFE5 /* Frameworks */, 124 | F9B18B281B45EF600021AFE5 /* Resources */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = RSSReader; 131 | productName = RSSReader; 132 | productReference = F9B18B2A1B45EF600021AFE5 /* RSSReader.app */; 133 | productType = "com.apple.product-type.application"; 134 | }; 135 | F9B18B3E1B45EF600021AFE5 /* RSSReaderTests */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = F9B18B4C1B45EF600021AFE5 /* Build configuration list for PBXNativeTarget "RSSReaderTests" */; 138 | buildPhases = ( 139 | F9B18B3B1B45EF600021AFE5 /* Sources */, 140 | F9B18B3C1B45EF600021AFE5 /* Frameworks */, 141 | F9B18B3D1B45EF600021AFE5 /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | F9B18B411B45EF600021AFE5 /* PBXTargetDependency */, 147 | ); 148 | name = RSSReaderTests; 149 | productName = RSSReaderTests; 150 | productReference = F9B18B3F1B45EF600021AFE5 /* RSSReaderTests.xctest */; 151 | productType = "com.apple.product-type.bundle.unit-test"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | F9B18B221B45EF600021AFE5 /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastSwiftMigration = 0710; 160 | LastUpgradeCheck = 0710; 161 | ORGANIZATIONNAME = "Your School"; 162 | TargetAttributes = { 163 | F9B18B291B45EF600021AFE5 = { 164 | CreatedOnToolsVersion = 6.3.2; 165 | LastSwiftMigration = 0820; 166 | }; 167 | F9B18B3E1B45EF600021AFE5 = { 168 | CreatedOnToolsVersion = 6.3.2; 169 | LastSwiftMigration = 0820; 170 | TestTargetID = F9B18B291B45EF600021AFE5; 171 | }; 172 | }; 173 | }; 174 | buildConfigurationList = F9B18B251B45EF600021AFE5 /* Build configuration list for PBXProject "RSSReader" */; 175 | compatibilityVersion = "Xcode 3.2"; 176 | developmentRegion = English; 177 | hasScannedForEncodings = 0; 178 | knownRegions = ( 179 | en, 180 | Base, 181 | ); 182 | mainGroup = F9B18B211B45EF600021AFE5; 183 | productRefGroup = F9B18B2B1B45EF600021AFE5 /* Products */; 184 | projectDirPath = ""; 185 | projectRoot = ""; 186 | targets = ( 187 | F9B18B291B45EF600021AFE5 /* RSSReader */, 188 | F9B18B3E1B45EF600021AFE5 /* RSSReaderTests */, 189 | ); 190 | }; 191 | /* End PBXProject section */ 192 | 193 | /* Begin PBXResourcesBuildPhase section */ 194 | F9B18B281B45EF600021AFE5 /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | F9674BD21B4859DC00A1FF8B /* Main.storyboard in Resources */, 199 | F9B18B3A1B45EF600021AFE5 /* LaunchScreen.xib in Resources */, 200 | F9B18B371B45EF600021AFE5 /* Images.xcassets in Resources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | F9B18B3D1B45EF600021AFE5 /* Resources */ = { 205 | isa = PBXResourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | /* End PBXResourcesBuildPhase section */ 212 | 213 | /* Begin PBXSourcesBuildPhase section */ 214 | F9B18B261B45EF600021AFE5 /* Sources */ = { 215 | isa = PBXSourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | F989C6D61B4B2184006B591D /* TopMediaController.swift in Sources */, 219 | F9B18B301B45EF600021AFE5 /* AppDelegate.swift in Sources */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | F9B18B3B1B45EF600021AFE5 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | F9B18B461B45EF600021AFE5 /* RSSReaderTests.swift in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXSourcesBuildPhase section */ 232 | 233 | /* Begin PBXTargetDependency section */ 234 | F9B18B411B45EF600021AFE5 /* PBXTargetDependency */ = { 235 | isa = PBXTargetDependency; 236 | target = F9B18B291B45EF600021AFE5 /* RSSReader */; 237 | targetProxy = F9B18B401B45EF600021AFE5 /* PBXContainerItemProxy */; 238 | }; 239 | /* End PBXTargetDependency section */ 240 | 241 | /* Begin PBXVariantGroup section */ 242 | F9674BD01B4859DC00A1FF8B /* Main.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | F9674BD11B4859DC00A1FF8B /* Base */, 246 | ); 247 | name = Main.storyboard; 248 | sourceTree = ""; 249 | }; 250 | F9B18B381B45EF600021AFE5 /* LaunchScreen.xib */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | F9B18B391B45EF600021AFE5 /* Base */, 254 | ); 255 | name = LaunchScreen.xib; 256 | sourceTree = ""; 257 | }; 258 | /* End PBXVariantGroup section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | F9B18B471B45EF600021AFE5 /* Debug */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 266 | CLANG_CXX_LIBRARY = "libc++"; 267 | CLANG_ENABLE_MODULES = YES; 268 | CLANG_ENABLE_OBJC_ARC = YES; 269 | CLANG_WARN_BOOL_CONVERSION = YES; 270 | CLANG_WARN_CONSTANT_CONVERSION = YES; 271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 276 | CLANG_WARN_UNREACHABLE_CODE = YES; 277 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 278 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 279 | COPY_PHASE_STRIP = NO; 280 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 281 | ENABLE_STRICT_OBJC_MSGSEND = YES; 282 | ENABLE_TESTABILITY = YES; 283 | GCC_C_LANGUAGE_STANDARD = gnu99; 284 | GCC_DYNAMIC_NO_PIC = NO; 285 | GCC_NO_COMMON_BLOCKS = YES; 286 | GCC_OPTIMIZATION_LEVEL = 0; 287 | GCC_PREPROCESSOR_DEFINITIONS = ( 288 | "DEBUG=1", 289 | "$(inherited)", 290 | ); 291 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 299 | MTL_ENABLE_DEBUG_INFO = YES; 300 | ONLY_ACTIVE_ARCH = YES; 301 | SDKROOT = iphoneos; 302 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | }; 305 | name = Debug; 306 | }; 307 | F9B18B481B45EF600021AFE5 /* Release */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | ALWAYS_SEARCH_USER_PATHS = NO; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_CONSTANT_CONVERSION = YES; 317 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 318 | CLANG_WARN_EMPTY_BODY = YES; 319 | CLANG_WARN_ENUM_CONVERSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 322 | CLANG_WARN_UNREACHABLE_CODE = YES; 323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 324 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 325 | COPY_PHASE_STRIP = NO; 326 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 327 | ENABLE_NS_ASSERTIONS = NO; 328 | ENABLE_STRICT_OBJC_MSGSEND = YES; 329 | GCC_C_LANGUAGE_STANDARD = gnu99; 330 | GCC_NO_COMMON_BLOCKS = YES; 331 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 332 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 333 | GCC_WARN_UNDECLARED_SELECTOR = YES; 334 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 335 | GCC_WARN_UNUSED_FUNCTION = YES; 336 | GCC_WARN_UNUSED_VARIABLE = YES; 337 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 338 | MTL_ENABLE_DEBUG_INFO = NO; 339 | SDKROOT = iphoneos; 340 | TARGETED_DEVICE_FAMILY = "1,2"; 341 | VALIDATE_PRODUCT = YES; 342 | }; 343 | name = Release; 344 | }; 345 | F9B18B4A1B45EF600021AFE5 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 349 | INFOPLIST_FILE = RSSReader/Info.plist; 350 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 351 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)"; 352 | PRODUCT_NAME = "$(TARGET_NAME)"; 353 | SWIFT_VERSION = 3.0; 354 | }; 355 | name = Debug; 356 | }; 357 | F9B18B4B1B45EF600021AFE5 /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 361 | INFOPLIST_FILE = RSSReader/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)"; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SWIFT_VERSION = 3.0; 366 | }; 367 | name = Release; 368 | }; 369 | F9B18B4D1B45EF600021AFE5 /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | BUNDLE_LOADER = "$(TEST_HOST)"; 373 | GCC_PREPROCESSOR_DEFINITIONS = ( 374 | "DEBUG=1", 375 | "$(inherited)", 376 | ); 377 | INFOPLIST_FILE = RSSReaderTests/Info.plist; 378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 379 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)"; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | SWIFT_VERSION = 3.0; 382 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RSSReader.app/RSSReader"; 383 | }; 384 | name = Debug; 385 | }; 386 | F9B18B4E1B45EF600021AFE5 /* Release */ = { 387 | isa = XCBuildConfiguration; 388 | buildSettings = { 389 | BUNDLE_LOADER = "$(TEST_HOST)"; 390 | INFOPLIST_FILE = RSSReaderTests/Info.plist; 391 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 392 | PRODUCT_BUNDLE_IDENTIFIER = "edu.yourschool.$(PRODUCT_NAME:rfc1034identifier)"; 393 | PRODUCT_NAME = "$(TARGET_NAME)"; 394 | SWIFT_VERSION = 3.0; 395 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RSSReader.app/RSSReader"; 396 | }; 397 | name = Release; 398 | }; 399 | /* End XCBuildConfiguration section */ 400 | 401 | /* Begin XCConfigurationList section */ 402 | F9B18B251B45EF600021AFE5 /* Build configuration list for PBXProject "RSSReader" */ = { 403 | isa = XCConfigurationList; 404 | buildConfigurations = ( 405 | F9B18B471B45EF600021AFE5 /* Debug */, 406 | F9B18B481B45EF600021AFE5 /* Release */, 407 | ); 408 | defaultConfigurationIsVisible = 0; 409 | defaultConfigurationName = Release; 410 | }; 411 | F9B18B491B45EF600021AFE5 /* Build configuration list for PBXNativeTarget "RSSReader" */ = { 412 | isa = XCConfigurationList; 413 | buildConfigurations = ( 414 | F9B18B4A1B45EF600021AFE5 /* Debug */, 415 | F9B18B4B1B45EF600021AFE5 /* Release */, 416 | ); 417 | defaultConfigurationIsVisible = 0; 418 | defaultConfigurationName = Release; 419 | }; 420 | F9B18B4C1B45EF600021AFE5 /* Build configuration list for PBXNativeTarget "RSSReaderTests" */ = { 421 | isa = XCConfigurationList; 422 | buildConfigurations = ( 423 | F9B18B4D1B45EF600021AFE5 /* Debug */, 424 | F9B18B4E1B45EF600021AFE5 /* Release */, 425 | ); 426 | defaultConfigurationIsVisible = 0; 427 | defaultConfigurationName = Release; 428 | }; 429 | /* End XCConfigurationList section */ 430 | }; 431 | rootObject = F9B18B221B45EF600021AFE5 /* Project object */; 432 | } 433 | -------------------------------------------------------------------------------- /RSSReader.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RSSReader/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4 | 4.0 International License, by Yong Bakos. 5 | 6 | */ 7 | 8 | import UIKit 9 | 10 | @UIApplicationMain 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 16 | // Override point for customization after application launch. 17 | return true 18 | } 19 | 20 | func applicationWillResignActive(_ application: UIApplication) { 21 | // 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. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | func applicationDidEnterBackground(_ application: UIApplication) { 26 | // 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. 27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 28 | } 29 | 30 | func applicationWillEnterForeground(_ application: UIApplication) { 31 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 32 | } 33 | 34 | func applicationDidBecomeActive(_ application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | func applicationWillTerminate(_ application: UIApplication) { 39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 40 | } 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /RSSReader/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /RSSReader/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 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 89 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 147 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 205 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "Icon-Small@2x-1.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "Icon-Small@3x.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "Icon-Spotlight-40@2x.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "Icon-Spotlight-40@3x.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "Icon-60@2x.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "Icon-60@3x.png", 47 | "scale" : "3x" 48 | }, 49 | { 50 | "idiom" : "ipad", 51 | "size" : "20x20", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "idiom" : "ipad", 56 | "size" : "20x20", 57 | "scale" : "2x" 58 | }, 59 | { 60 | "size" : "29x29", 61 | "idiom" : "ipad", 62 | "filename" : "Icon-Small.png", 63 | "scale" : "1x" 64 | }, 65 | { 66 | "size" : "29x29", 67 | "idiom" : "ipad", 68 | "filename" : "Icon-Small@2x.png", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "size" : "40x40", 73 | "idiom" : "ipad", 74 | "filename" : "Icon-Spotlight-40.png", 75 | "scale" : "1x" 76 | }, 77 | { 78 | "size" : "40x40", 79 | "idiom" : "ipad", 80 | "filename" : "Icon-Spotlight-40@2x-1.png", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "size" : "76x76", 85 | "idiom" : "ipad", 86 | "filename" : "Icon-76.png", 87 | "scale" : "1x" 88 | }, 89 | { 90 | "size" : "76x76", 91 | "idiom" : "ipad", 92 | "filename" : "Icon-76@2x.png", 93 | "scale" : "2x" 94 | }, 95 | { 96 | "size" : "83.5x83.5", 97 | "idiom" : "ipad", 98 | "filename" : "Icon-83.5@2x.png", 99 | "scale" : "2x" 100 | } 101 | ], 102 | "info" : { 103 | "version" : 1, 104 | "author" : "xcode" 105 | } 106 | } -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Album Icon.imageset/1042-album@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Album Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "1042-album.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "1042-album@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "1042-album@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top App Icon.imageset/919-ipod-touch@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top App Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "919-ipod-touch.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "919-ipod-touch@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "919-ipod-touch@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Movie Icon.imageset/930-film-2@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Movie Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "930-film-2.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "930-film-2@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "930-film-2@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note@2x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftEducation/RSSReader/077fece1385b4fb7259d02b72e69fa0594151749/RSSReader/Images.xcassets/Top Song Icon.imageset/948-music-note@3x.png -------------------------------------------------------------------------------- /RSSReader/Images.xcassets/Top Song Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "948-music-note.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "948-music-note@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "948-music-note@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /RSSReader/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | NSAppTransportSecurity 47 | 48 | NSAllowsArbitraryLoads 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /RSSReader/TopMediaController.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4 | 4.0 International License, by Yong Bakos. 5 | 6 | */ 7 | 8 | import UIKit 9 | 10 | class TopMediaController: UIViewController { 11 | 12 | @IBOutlet weak var titleLabel: UILabel! 13 | @IBOutlet weak var artistLabel: UILabel! 14 | @IBOutlet weak var imageView: UIImageView! 15 | 16 | @IBInspectable var feedURL: String! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | let request = URLRequest(url: URL(string: feedURL)!) 21 | NSURLConnection.sendAsynchronousRequest(request, queue: OperationQueue.main) { response, data, error in 22 | if let jsonData = data, 23 | let feed = (try? JSONSerialization.jsonObject(with: jsonData, options: .mutableContainers)) as? NSDictionary, 24 | let title = feed.value(forKeyPath: "feed.entry.im:name.label") as? String, 25 | let artist = feed.value(forKeyPath: "feed.entry.im:artist.label") as? String, 26 | let imageURLs = feed.value(forKeyPath: "feed.entry.im:image") as? [NSDictionary] { 27 | if let imageURL = imageURLs.last, 28 | let imageURLString = imageURL.value(forKeyPath: "label") as? String { 29 | self.loadImageFromURL(URL(string:imageURLString)!) 30 | } 31 | self.titleLabel.text = title 32 | self.titleLabel.isHidden = false 33 | self.artistLabel.text = artist 34 | self.artistLabel.isHidden = false 35 | 36 | } 37 | } 38 | } 39 | 40 | func loadImageFromURL(_ URL: Foundation.URL) { 41 | let request = URLRequest(url: URL) 42 | NSURLConnection.sendAsynchronousRequest(request, queue: OperationQueue.main) { response, data, error in 43 | if let imageData = data { 44 | self.imageView.image = UIImage(data: imageData) 45 | } 46 | } 47 | } 48 | 49 | override func didReceiveMemoryWarning() { 50 | super.didReceiveMemoryWarning() 51 | // Dispose of any resources that can be recreated. 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /RSSReaderTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /RSSReaderTests/RSSReaderTests.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4 | 4.0 International License, by Yong Bakos. 5 | 6 | */ 7 | 8 | import UIKit 9 | import XCTest 10 | 11 | class RSSReaderTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measure() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | --------------------------------------------------------------------------------