├── .gitignore ├── README.md └── RSSwift ├── RSSwift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ ├── arled.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ ├── arledkola.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ ├── brunogorss.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── kola01.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── arled.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── arledkola.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── brunogorss.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ └── kola01.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── RSSwift.xcscheme │ └── xcschememanagement.plist ├── RSSwift ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FeedItemWebViewController.swift ├── FeedListViewController.swift ├── Info.plist ├── RSSwift.xcdatamodeld │ ├── .xccurrentversion │ └── RSSwift.xcdatamodel │ │ └── contents ├── XmlParserManager.swift └── feed.png ├── RSSwiftTests ├── Info.plist └── RSSwiftTests.swift └── RsswiftUITests ├── Info.plist └── RsswiftUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Swift rss reader example 2 | 3 | ### Run app 4 | 5 | Clone repo and run via Xcode: 6 | 7 | ```sh 8 | $ git clone git@github.com:arled/swift-rss-reader-example.git 9 | ``` 10 | 11 | > Swift Compiler Language: Swift 5 12 | 13 | > RSS feed url used: NASA breaking news: `https://www.nasa.gov/rss/dyn/breaking_news.rss` 14 | 15 | ### More NASA RSS feeds 16 | 17 | > [NASA RSS feeds](https://www.nasa.gov/content/nasa-rss-feeds) 18 | 19 | ### Demo 20 | 21 | ![demo giphy](https://media.giphy.com/media/Sd8h5urla8yQ3Iplu7/giphy.gif) 22 | 23 | ### Contribution 24 | 25 | Contribution and pull requests are more than welcome. 26 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 42BB579A232FC2E800BC18CB /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42BB5799232FC2E700BC18CB /* WebKit.framework */; }; 11 | 703266451DDF6E3D006CC1B5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 703266441DDF6E3D006CC1B5 /* AppDelegate.swift */; }; 12 | 7032664A1DDF6E3D006CC1B5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 703266481DDF6E3D006CC1B5 /* Main.storyboard */; }; 13 | 7032664D1DDF6E3D006CC1B5 /* Rsswift.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 7032664B1DDF6E3D006CC1B5 /* Rsswift.xcdatamodeld */; }; 14 | 7032664F1DDF6E3D006CC1B5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7032664E1DDF6E3D006CC1B5 /* Assets.xcassets */; }; 15 | 703266521DDF6E3D006CC1B5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 703266501DDF6E3D006CC1B5 /* LaunchScreen.storyboard */; }; 16 | 7032665D1DDF6E3D006CC1B5 /* RsswiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7032665C1DDF6E3D006CC1B5 /* RsswiftTests.swift */; }; 17 | 703266681DDF6E3D006CC1B5 /* RsswiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 703266671DDF6E3D006CC1B5 /* RsswiftUITests.swift */; }; 18 | 703266761DDF705D006CC1B5 /* XmlParserManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 703266751DDF705D006CC1B5 /* XmlParserManager.swift */; }; 19 | 703266781DDF709F006CC1B5 /* FeedListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 703266771DDF709F006CC1B5 /* FeedListViewController.swift */; }; 20 | 7072F4452238210C00458EC1 /* FeedItemWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7072F4442238210C00458EC1 /* FeedItemWebViewController.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 703266591DDF6E3D006CC1B5 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 703266391DDF6E3D006CC1B5 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 703266401DDF6E3D006CC1B5; 29 | remoteInfo = Rsswift; 30 | }; 31 | 703266641DDF6E3D006CC1B5 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 703266391DDF6E3D006CC1B5 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 703266401DDF6E3D006CC1B5; 36 | remoteInfo = Rsswift; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 42BB5799232FC2E700BC18CB /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 42 | 703266411DDF6E3D006CC1B5 /* Rsswift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rsswift.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 703266441DDF6E3D006CC1B5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 703266491DDF6E3D006CC1B5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 7032664C1DDF6E3D006CC1B5 /* Rsswift.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Rsswift.xcdatamodel; sourceTree = ""; }; 46 | 7032664E1DDF6E3D006CC1B5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 703266511DDF6E3D006CC1B5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 703266531DDF6E3D006CC1B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 703266581DDF6E3D006CC1B5 /* RsswiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RsswiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 7032665C1DDF6E3D006CC1B5 /* RsswiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RsswiftTests.swift; sourceTree = ""; }; 51 | 7032665E1DDF6E3D006CC1B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 703266631DDF6E3D006CC1B5 /* RsswiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RsswiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 703266671DDF6E3D006CC1B5 /* RsswiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RsswiftUITests.swift; sourceTree = ""; }; 54 | 703266691DDF6E3D006CC1B5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 703266751DDF705D006CC1B5 /* XmlParserManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XmlParserManager.swift; sourceTree = ""; }; 56 | 703266771DDF709F006CC1B5 /* FeedListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedListViewController.swift; sourceTree = ""; }; 57 | 7072F4442238210C00458EC1 /* FeedItemWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FeedItemWebViewController.swift; path = RSSwift/FeedItemWebViewController.swift; sourceTree = SOURCE_ROOT; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 7032663E1DDF6E3D006CC1B5 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 42BB579A232FC2E800BC18CB /* WebKit.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 703266551DDF6E3D006CC1B5 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 703266601DDF6E3D006CC1B5 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 42BB5798232FC2E700BC18CB /* Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 42BB5799232FC2E700BC18CB /* WebKit.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | 703266381DDF6E3D006CC1B5 = { 95 | isa = PBXGroup; 96 | children = ( 97 | 703266431DDF6E3D006CC1B5 /* Rsswift */, 98 | 7032665B1DDF6E3D006CC1B5 /* RsswiftTests */, 99 | 703266661DDF6E3D006CC1B5 /* RsswiftUITests */, 100 | 703266421DDF6E3D006CC1B5 /* Products */, 101 | 42BB5798232FC2E700BC18CB /* Frameworks */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | 703266421DDF6E3D006CC1B5 /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 703266411DDF6E3D006CC1B5 /* Rsswift.app */, 109 | 703266581DDF6E3D006CC1B5 /* RsswiftTests.xctest */, 110 | 703266631DDF6E3D006CC1B5 /* RsswiftUITests.xctest */, 111 | ); 112 | name = Products; 113 | sourceTree = ""; 114 | }; 115 | 703266431DDF6E3D006CC1B5 /* Rsswift */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 703266441DDF6E3D006CC1B5 /* AppDelegate.swift */, 119 | 703266751DDF705D006CC1B5 /* XmlParserManager.swift */, 120 | 703266771DDF709F006CC1B5 /* FeedListViewController.swift */, 121 | 703266481DDF6E3D006CC1B5 /* Main.storyboard */, 122 | 7032664E1DDF6E3D006CC1B5 /* Assets.xcassets */, 123 | 703266501DDF6E3D006CC1B5 /* LaunchScreen.storyboard */, 124 | 703266531DDF6E3D006CC1B5 /* Info.plist */, 125 | 7032664B1DDF6E3D006CC1B5 /* Rsswift.xcdatamodeld */, 126 | 7072F4442238210C00458EC1 /* FeedItemWebViewController.swift */, 127 | ); 128 | path = Rsswift; 129 | sourceTree = ""; 130 | }; 131 | 7032665B1DDF6E3D006CC1B5 /* RsswiftTests */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 7032665C1DDF6E3D006CC1B5 /* RsswiftTests.swift */, 135 | 7032665E1DDF6E3D006CC1B5 /* Info.plist */, 136 | ); 137 | path = RsswiftTests; 138 | sourceTree = ""; 139 | }; 140 | 703266661DDF6E3D006CC1B5 /* RsswiftUITests */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 703266671DDF6E3D006CC1B5 /* RsswiftUITests.swift */, 144 | 703266691DDF6E3D006CC1B5 /* Info.plist */, 145 | ); 146 | path = RsswiftUITests; 147 | sourceTree = ""; 148 | }; 149 | /* End PBXGroup section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 703266401DDF6E3D006CC1B5 /* Rsswift */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 7032666C1DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "Rsswift" */; 155 | buildPhases = ( 156 | 7032663D1DDF6E3D006CC1B5 /* Sources */, 157 | 7032663E1DDF6E3D006CC1B5 /* Frameworks */, 158 | 7032663F1DDF6E3D006CC1B5 /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = Rsswift; 165 | productName = Rsswift; 166 | productReference = 703266411DDF6E3D006CC1B5 /* Rsswift.app */; 167 | productType = "com.apple.product-type.application"; 168 | }; 169 | 703266571DDF6E3D006CC1B5 /* RsswiftTests */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 7032666F1DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "RsswiftTests" */; 172 | buildPhases = ( 173 | 703266541DDF6E3D006CC1B5 /* Sources */, 174 | 703266551DDF6E3D006CC1B5 /* Frameworks */, 175 | 703266561DDF6E3D006CC1B5 /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | 7032665A1DDF6E3D006CC1B5 /* PBXTargetDependency */, 181 | ); 182 | name = RsswiftTests; 183 | productName = RsswiftTests; 184 | productReference = 703266581DDF6E3D006CC1B5 /* RsswiftTests.xctest */; 185 | productType = "com.apple.product-type.bundle.unit-test"; 186 | }; 187 | 703266621DDF6E3D006CC1B5 /* RsswiftUITests */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = 703266721DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "RsswiftUITests" */; 190 | buildPhases = ( 191 | 7032665F1DDF6E3D006CC1B5 /* Sources */, 192 | 703266601DDF6E3D006CC1B5 /* Frameworks */, 193 | 703266611DDF6E3D006CC1B5 /* Resources */, 194 | ); 195 | buildRules = ( 196 | ); 197 | dependencies = ( 198 | 703266651DDF6E3D006CC1B5 /* PBXTargetDependency */, 199 | ); 200 | name = RsswiftUITests; 201 | productName = RsswiftUITests; 202 | productReference = 703266631DDF6E3D006CC1B5 /* RsswiftUITests.xctest */; 203 | productType = "com.apple.product-type.bundle.ui-testing"; 204 | }; 205 | /* End PBXNativeTarget section */ 206 | 207 | /* Begin PBXProject section */ 208 | 703266391DDF6E3D006CC1B5 /* Project object */ = { 209 | isa = PBXProject; 210 | attributes = { 211 | LastSwiftUpdateCheck = 0810; 212 | LastUpgradeCheck = 1240; 213 | ORGANIZATIONNAME = ArledKola; 214 | TargetAttributes = { 215 | 703266401DDF6E3D006CC1B5 = { 216 | CreatedOnToolsVersion = 8.1; 217 | LastSwiftMigration = 1240; 218 | ProvisioningStyle = Automatic; 219 | }; 220 | 703266571DDF6E3D006CC1B5 = { 221 | CreatedOnToolsVersion = 8.1; 222 | LastSwiftMigration = 1240; 223 | ProvisioningStyle = Automatic; 224 | TestTargetID = 703266401DDF6E3D006CC1B5; 225 | }; 226 | 703266621DDF6E3D006CC1B5 = { 227 | CreatedOnToolsVersion = 8.1; 228 | LastSwiftMigration = 1240; 229 | ProvisioningStyle = Automatic; 230 | TestTargetID = 703266401DDF6E3D006CC1B5; 231 | }; 232 | }; 233 | }; 234 | buildConfigurationList = 7032663C1DDF6E3D006CC1B5 /* Build configuration list for PBXProject "RSSwift" */; 235 | compatibilityVersion = "Xcode 3.2"; 236 | developmentRegion = en; 237 | hasScannedForEncodings = 0; 238 | knownRegions = ( 239 | en, 240 | Base, 241 | ); 242 | mainGroup = 703266381DDF6E3D006CC1B5; 243 | productRefGroup = 703266421DDF6E3D006CC1B5 /* Products */; 244 | projectDirPath = ""; 245 | projectRoot = ""; 246 | targets = ( 247 | 703266401DDF6E3D006CC1B5 /* Rsswift */, 248 | 703266571DDF6E3D006CC1B5 /* RsswiftTests */, 249 | 703266621DDF6E3D006CC1B5 /* RsswiftUITests */, 250 | ); 251 | }; 252 | /* End PBXProject section */ 253 | 254 | /* Begin PBXResourcesBuildPhase section */ 255 | 7032663F1DDF6E3D006CC1B5 /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 703266521DDF6E3D006CC1B5 /* LaunchScreen.storyboard in Resources */, 260 | 7032664F1DDF6E3D006CC1B5 /* Assets.xcassets in Resources */, 261 | 7032664A1DDF6E3D006CC1B5 /* Main.storyboard in Resources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | 703266561DDF6E3D006CC1B5 /* Resources */ = { 266 | isa = PBXResourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | 703266611DDF6E3D006CC1B5 /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXResourcesBuildPhase section */ 280 | 281 | /* Begin PBXSourcesBuildPhase section */ 282 | 7032663D1DDF6E3D006CC1B5 /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 703266451DDF6E3D006CC1B5 /* AppDelegate.swift in Sources */, 287 | 703266781DDF709F006CC1B5 /* FeedListViewController.swift in Sources */, 288 | 703266761DDF705D006CC1B5 /* XmlParserManager.swift in Sources */, 289 | 7072F4452238210C00458EC1 /* FeedItemWebViewController.swift in Sources */, 290 | 7032664D1DDF6E3D006CC1B5 /* Rsswift.xcdatamodeld in Sources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | 703266541DDF6E3D006CC1B5 /* Sources */ = { 295 | isa = PBXSourcesBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | 7032665D1DDF6E3D006CC1B5 /* RsswiftTests.swift in Sources */, 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | 7032665F1DDF6E3D006CC1B5 /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 703266681DDF6E3D006CC1B5 /* RsswiftUITests.swift in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXTargetDependency section */ 313 | 7032665A1DDF6E3D006CC1B5 /* PBXTargetDependency */ = { 314 | isa = PBXTargetDependency; 315 | target = 703266401DDF6E3D006CC1B5 /* Rsswift */; 316 | targetProxy = 703266591DDF6E3D006CC1B5 /* PBXContainerItemProxy */; 317 | }; 318 | 703266651DDF6E3D006CC1B5 /* PBXTargetDependency */ = { 319 | isa = PBXTargetDependency; 320 | target = 703266401DDF6E3D006CC1B5 /* Rsswift */; 321 | targetProxy = 703266641DDF6E3D006CC1B5 /* PBXContainerItemProxy */; 322 | }; 323 | /* End PBXTargetDependency section */ 324 | 325 | /* Begin PBXVariantGroup section */ 326 | 703266481DDF6E3D006CC1B5 /* Main.storyboard */ = { 327 | isa = PBXVariantGroup; 328 | children = ( 329 | 703266491DDF6E3D006CC1B5 /* Base */, 330 | ); 331 | name = Main.storyboard; 332 | sourceTree = ""; 333 | }; 334 | 703266501DDF6E3D006CC1B5 /* LaunchScreen.storyboard */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | 703266511DDF6E3D006CC1B5 /* Base */, 338 | ); 339 | name = LaunchScreen.storyboard; 340 | sourceTree = ""; 341 | }; 342 | /* End PBXVariantGroup section */ 343 | 344 | /* Begin XCBuildConfiguration section */ 345 | 7032666A1DDF6E3D006CC1B5 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 350 | CLANG_ANALYZER_NONNULL = YES; 351 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 352 | CLANG_CXX_LIBRARY = "libc++"; 353 | CLANG_ENABLE_MODULES = YES; 354 | CLANG_ENABLE_OBJC_ARC = YES; 355 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 356 | CLANG_WARN_BOOL_CONVERSION = YES; 357 | CLANG_WARN_COMMA = YES; 358 | CLANG_WARN_CONSTANT_CONVERSION = YES; 359 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 362 | CLANG_WARN_EMPTY_BODY = YES; 363 | CLANG_WARN_ENUM_CONVERSION = YES; 364 | CLANG_WARN_INFINITE_RECURSION = YES; 365 | CLANG_WARN_INT_CONVERSION = YES; 366 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 367 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 368 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 371 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 372 | CLANG_WARN_STRICT_PROTOTYPES = YES; 373 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 374 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 375 | CLANG_WARN_UNREACHABLE_CODE = YES; 376 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 377 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 378 | COPY_PHASE_STRIP = NO; 379 | DEBUG_INFORMATION_FORMAT = dwarf; 380 | ENABLE_STRICT_OBJC_MSGSEND = YES; 381 | ENABLE_TESTABILITY = YES; 382 | GCC_C_LANGUAGE_STANDARD = gnu99; 383 | GCC_DYNAMIC_NO_PIC = NO; 384 | GCC_NO_COMMON_BLOCKS = YES; 385 | GCC_OPTIMIZATION_LEVEL = 0; 386 | GCC_PREPROCESSOR_DEFINITIONS = ( 387 | "DEBUG=1", 388 | "$(inherited)", 389 | ); 390 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 392 | GCC_WARN_UNDECLARED_SELECTOR = YES; 393 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 394 | GCC_WARN_UNUSED_FUNCTION = YES; 395 | GCC_WARN_UNUSED_VARIABLE = YES; 396 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 397 | MTL_ENABLE_DEBUG_INFO = YES; 398 | ONLY_ACTIVE_ARCH = YES; 399 | SDKROOT = iphoneos; 400 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 401 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 402 | TARGETED_DEVICE_FAMILY = "1,2"; 403 | }; 404 | name = Debug; 405 | }; 406 | 7032666B1DDF6E3D006CC1B5 /* Release */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | ALWAYS_SEARCH_USER_PATHS = NO; 410 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 411 | CLANG_ANALYZER_NONNULL = YES; 412 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 413 | CLANG_CXX_LIBRARY = "libc++"; 414 | CLANG_ENABLE_MODULES = YES; 415 | CLANG_ENABLE_OBJC_ARC = YES; 416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 417 | CLANG_WARN_BOOL_CONVERSION = YES; 418 | CLANG_WARN_COMMA = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 423 | CLANG_WARN_EMPTY_BODY = YES; 424 | CLANG_WARN_ENUM_CONVERSION = YES; 425 | CLANG_WARN_INFINITE_RECURSION = YES; 426 | CLANG_WARN_INT_CONVERSION = YES; 427 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 429 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 431 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 432 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 433 | CLANG_WARN_STRICT_PROTOTYPES = YES; 434 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 435 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 436 | CLANG_WARN_UNREACHABLE_CODE = YES; 437 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 438 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 439 | COPY_PHASE_STRIP = NO; 440 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 441 | ENABLE_NS_ASSERTIONS = NO; 442 | ENABLE_STRICT_OBJC_MSGSEND = YES; 443 | GCC_C_LANGUAGE_STANDARD = gnu99; 444 | GCC_NO_COMMON_BLOCKS = YES; 445 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 446 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 447 | GCC_WARN_UNDECLARED_SELECTOR = YES; 448 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 449 | GCC_WARN_UNUSED_FUNCTION = YES; 450 | GCC_WARN_UNUSED_VARIABLE = YES; 451 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 452 | MTL_ENABLE_DEBUG_INFO = NO; 453 | SDKROOT = iphoneos; 454 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 455 | TARGETED_DEVICE_FAMILY = "1,2"; 456 | VALIDATE_PRODUCT = YES; 457 | }; 458 | name = Release; 459 | }; 460 | 7032666D1DDF6E3D006CC1B5 /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 464 | INFOPLIST_FILE = Rsswift/Info.plist; 465 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 467 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.Rsswift; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 470 | SWIFT_VERSION = 5.0; 471 | }; 472 | name = Debug; 473 | }; 474 | 7032666E1DDF6E3D006CC1B5 /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 478 | INFOPLIST_FILE = Rsswift/Info.plist; 479 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.Rsswift; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 484 | SWIFT_VERSION = 5.0; 485 | }; 486 | name = Release; 487 | }; 488 | 703266701DDF6E3D006CC1B5 /* Debug */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 492 | BUNDLE_LOADER = "$(TEST_HOST)"; 493 | INFOPLIST_FILE = RsswiftTests/Info.plist; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 495 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.RsswiftTests; 496 | PRODUCT_NAME = "$(TARGET_NAME)"; 497 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 498 | SWIFT_VERSION = 5.0; 499 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rsswift.app/Rsswift"; 500 | }; 501 | name = Debug; 502 | }; 503 | 703266711DDF6E3D006CC1B5 /* Release */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 507 | BUNDLE_LOADER = "$(TEST_HOST)"; 508 | INFOPLIST_FILE = RsswiftTests/Info.plist; 509 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 510 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.RsswiftTests; 511 | PRODUCT_NAME = "$(TARGET_NAME)"; 512 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 513 | SWIFT_VERSION = 5.0; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rsswift.app/Rsswift"; 515 | }; 516 | name = Release; 517 | }; 518 | 703266731DDF6E3D006CC1B5 /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 522 | INFOPLIST_FILE = RsswiftUITests/Info.plist; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 524 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.RsswiftUITests; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 527 | SWIFT_VERSION = 5.0; 528 | TEST_TARGET_NAME = Rsswift; 529 | }; 530 | name = Debug; 531 | }; 532 | 703266741DDF6E3D006CC1B5 /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 536 | INFOPLIST_FILE = RsswiftUITests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = ArledKola.RsswiftUITests; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 541 | SWIFT_VERSION = 5.0; 542 | TEST_TARGET_NAME = Rsswift; 543 | }; 544 | name = Release; 545 | }; 546 | /* End XCBuildConfiguration section */ 547 | 548 | /* Begin XCConfigurationList section */ 549 | 7032663C1DDF6E3D006CC1B5 /* Build configuration list for PBXProject "RSSwift" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 7032666A1DDF6E3D006CC1B5 /* Debug */, 553 | 7032666B1DDF6E3D006CC1B5 /* Release */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | 7032666C1DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "Rsswift" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | 7032666D1DDF6E3D006CC1B5 /* Debug */, 562 | 7032666E1DDF6E3D006CC1B5 /* Release */, 563 | ); 564 | defaultConfigurationIsVisible = 0; 565 | defaultConfigurationName = Release; 566 | }; 567 | 7032666F1DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "RsswiftTests" */ = { 568 | isa = XCConfigurationList; 569 | buildConfigurations = ( 570 | 703266701DDF6E3D006CC1B5 /* Debug */, 571 | 703266711DDF6E3D006CC1B5 /* Release */, 572 | ); 573 | defaultConfigurationIsVisible = 0; 574 | defaultConfigurationName = Release; 575 | }; 576 | 703266721DDF6E3D006CC1B5 /* Build configuration list for PBXNativeTarget "RsswiftUITests" */ = { 577 | isa = XCConfigurationList; 578 | buildConfigurations = ( 579 | 703266731DDF6E3D006CC1B5 /* Debug */, 580 | 703266741DDF6E3D006CC1B5 /* Release */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | /* End XCConfigurationList section */ 586 | 587 | /* Begin XCVersionGroup section */ 588 | 7032664B1DDF6E3D006CC1B5 /* Rsswift.xcdatamodeld */ = { 589 | isa = XCVersionGroup; 590 | children = ( 591 | 7032664C1DDF6E3D006CC1B5 /* Rsswift.xcdatamodel */, 592 | ); 593 | currentVersion = 7032664C1DDF6E3D006CC1B5 /* Rsswift.xcdatamodel */; 594 | path = Rsswift.xcdatamodeld; 595 | sourceTree = ""; 596 | versionGroupType = wrapper.xcdatamodel; 597 | }; 598 | /* End XCVersionGroup section */ 599 | }; 600 | rootObject = 703266391DDF6E3D006CC1B5 /* Project object */; 601 | } 602 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/arled.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arled/swift-rss-reader-example/3bdd48704b1550d8f5c73e8f1fbfaa8240bd223e/RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/arled.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/arledkola.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arled/swift-rss-reader-example/3bdd48704b1550d8f5c73e8f1fbfaa8240bd223e/RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/arledkola.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/brunogorss.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arled/swift-rss-reader-example/3bdd48704b1550d8f5c73e8f1fbfaa8240bd223e/RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/brunogorss.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/kola01.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arled/swift-rss-reader-example/3bdd48704b1550d8f5c73e8f1fbfaa8240bd223e/RSSwift/RSSwift.xcodeproj/project.xcworkspace/xcuserdata/kola01.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/arled.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Rsswift.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/arledkola.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Rsswift.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/brunogorss.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Rsswift.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/kola01.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/kola01.xcuserdatad/xcschemes/RSSwift.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 | -------------------------------------------------------------------------------- /RSSwift/RSSwift.xcodeproj/xcuserdata/kola01.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Rsswift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 703266401DDF6E3D006CC1B5 16 | 17 | primary 18 | 19 | 20 | 703266571DDF6E3D006CC1B5 21 | 22 | primary 23 | 24 | 25 | 703266621DDF6E3D006CC1B5 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Rsswift 4 | // 5 | // Created by Arled Kola on 18/11/2016. 6 | // Copyright © 2016 ArledKola. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | return true 21 | } 22 | 23 | func applicationWillResignActive(_ application: UIApplication) { 24 | // 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. 25 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 26 | } 27 | 28 | func applicationDidEnterBackground(_ application: UIApplication) { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | func applicationWillEnterForeground(_ application: UIApplication) { 34 | // 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. 35 | } 36 | 37 | func applicationDidBecomeActive(_ application: UIApplication) { 38 | // 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. 39 | } 40 | 41 | func applicationWillTerminate(_ application: UIApplication) { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | self.saveContext() 45 | } 46 | 47 | // MARK: - Core Data stack 48 | 49 | lazy var persistentContainer: NSPersistentContainer = { 50 | /* 51 | The persistent container for the application. This implementation 52 | creates and returns a container, having loaded the store for the 53 | application to it. This property is optional since there are legitimate 54 | error conditions that could cause the creation of the store to fail. 55 | */ 56 | let container = NSPersistentContainer(name: "Rsswift") 57 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 58 | if let error = error as NSError? { 59 | // Replace this implementation with code to handle the error appropriately. 60 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 61 | 62 | /* 63 | Typical reasons for an error here include: 64 | * The parent directory does not exist, cannot be created, or disallows writing. 65 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 66 | * The device is out of space. 67 | * The store could not be migrated to the current model version. 68 | Check the error message to determine what the actual problem was. 69 | */ 70 | fatalError("Unresolved error \(error), \(error.userInfo)") 71 | } 72 | }) 73 | return container 74 | }() 75 | 76 | // MARK: - Core Data Saving support 77 | 78 | func saveContext () { 79 | let context = persistentContainer.viewContext 80 | if context.hasChanges { 81 | do { 82 | try context.save() 83 | } catch { 84 | // Replace this implementation with code to handle the error appropriately. 85 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 86 | let nserror = error as NSError 87 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)") 88 | } 89 | } 90 | } 91 | 92 | } 93 | 94 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/Assets.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 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /RSSwift/RSSwift/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 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 36 | 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 | 84 | 85 | 86 | 87 | 88 | 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 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/FeedItemWebViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FeedItemWebViewController.swift 3 | // Rsswift 4 | // 5 | // Created by Arled Kola on 12/03/2019. 6 | // Copyright © 2019 ArledKola. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | class FeedItemWebViewController: UIViewController { 13 | @IBOutlet var webView: WKWebView! 14 | var selectedFeedURL: String? 15 | 16 | private var loadingObservation: NSKeyValueObservation? 17 | 18 | private lazy var loadingIndicator: UIActivityIndicatorView = { 19 | let spinner = UIActivityIndicatorView() 20 | spinner.translatesAutoresizingMaskIntoConstraints = false 21 | spinner.color = .orange 22 | spinner.transform = CGAffineTransform(scaleX: 1.5, y: 1.5) 23 | return spinner 24 | }() 25 | 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | loadingObservation = webView.observe(\.isLoading, options: [.new, .old]) { [weak self] (_, change) in 31 | guard let strongSelf = self else { return } 32 | 33 | if change.newValue! && !change.oldValue! { 34 | strongSelf.view.addSubview(strongSelf.loadingIndicator) 35 | strongSelf.loadingIndicator.startAnimating() 36 | NSLayoutConstraint.activate([strongSelf.loadingIndicator.centerXAnchor.constraint(equalTo: strongSelf.view.centerXAnchor), 37 | strongSelf.loadingIndicator.centerYAnchor.constraint(equalTo: strongSelf.view.centerYAnchor)]) 38 | strongSelf.view.bringSubviewToFront(strongSelf.loadingIndicator) 39 | } 40 | 41 | else if !change.newValue! && change.oldValue! { 42 | strongSelf.loadingIndicator.stopAnimating() 43 | strongSelf.loadingIndicator.removeFromSuperview() 44 | } 45 | } 46 | 47 | selectedFeedURL = selectedFeedURL?.replacingOccurrences(of: " ", with:"") 48 | selectedFeedURL = selectedFeedURL?.replacingOccurrences(of: "\n", with:"") 49 | webView.backgroundColor = .white 50 | webView.load(URLRequest(url: URL(string: selectedFeedURL! as String)!)) 51 | } 52 | 53 | 54 | 55 | override func viewDidAppear(_ animated: Bool) { 56 | super.viewDidAppear( animated ) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/FeedListViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FeedListViewController.swift 3 | // Rsswift 4 | // 5 | // Created by Arled Kola on 18/11/2016. 6 | // Copyright © 2016 ArledKola. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FeedListViewController: UITableViewController, XMLParserDelegate { 12 | 13 | var myFeed : NSArray = [] 14 | var feedImgs: [AnyObject] = [] 15 | var url: URL! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | tableView.rowHeight = UITableView.automaticDimension 21 | tableView.estimatedRowHeight = 140 22 | tableView.backgroundColor = UIColorFromRGB(rgbValue: 0xdf4926) 23 | self.tableView.dataSource = self 24 | self.tableView.delegate = self 25 | 26 | loadData() 27 | } 28 | 29 | @IBAction func refreshFeed(_ sender: Any) { 30 | 31 | loadData() 32 | } 33 | 34 | func loadData() { 35 | url = URL(string: "https://www.nasa.gov/rss/dyn/breaking_news.rss")! 36 | loadRss(url); 37 | } 38 | 39 | func loadRss(_ data: URL) { 40 | 41 | // XmlParserManager instance/object/variable. 42 | let myParser : XmlParserManager = XmlParserManager().initWithURL(data) as! XmlParserManager 43 | 44 | // Put feed in array. 45 | feedImgs = myParser.img as [AnyObject] 46 | myFeed = myParser.feeds 47 | tableView.reloadData() 48 | } 49 | 50 | override func didReceiveMemoryWarning() { 51 | super.didReceiveMemoryWarning() 52 | } 53 | 54 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 55 | if segue.identifier == "openPage" { 56 | let indexPath: IndexPath = self.tableView.indexPathForSelectedRow! 57 | let selectedFURL: String = (myFeed[indexPath.row] as AnyObject).object(forKey: "link") as! String 58 | 59 | // Instance of our feedpageviewcontrolelr. 60 | let fiwvc: FeedItemWebViewController = segue.destination as! FeedItemWebViewController 61 | fiwvc.selectedFeedURL = selectedFURL as String 62 | } 63 | } 64 | 65 | // MARK: - Table view data source. 66 | override func numberOfSections(in tableView: UITableView) -> Int { 67 | return 1 68 | } 69 | 70 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 71 | return myFeed.count 72 | } 73 | 74 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 75 | let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) 76 | let cellBGColorView = UIView() 77 | let cellImageLayer: CALayer? = cell.imageView?.layer 78 | let url = NSURL(string:feedImgs[indexPath.row] as! String) 79 | let data = NSData(contentsOf:url! as URL) 80 | var image = UIImage(data:data! as Data) 81 | 82 | image = resizeImage(image: image!, toTheSize: CGSize(width: 70, height: 70)) 83 | 84 | cellImageLayer!.cornerRadius = 35 85 | cellImageLayer!.masksToBounds = true 86 | cellBGColorView.backgroundColor = .orange 87 | 88 | if indexPath.row % 2 == 0 { 89 | cell.backgroundColor = UIColor(white: 1, alpha: 0) 90 | } else { 91 | cell.backgroundColor = UIColor(white: 1, alpha: 0.1) 92 | } 93 | 94 | cell.textLabel?.backgroundColor = UIColor.clear 95 | cell.detailTextLabel?.backgroundColor = UIColor.clear 96 | cell.selectedBackgroundView = cellBGColorView 97 | cell.imageView?.image = image 98 | cell.textLabel?.text = (myFeed.object(at: indexPath.row) as AnyObject).object(forKey: "title") as? String 99 | cell.textLabel?.textColor = UIColor.white 100 | cell.textLabel?.numberOfLines = 0 101 | cell.textLabel?.lineBreakMode = .byWordWrapping 102 | cell.detailTextLabel?.text = (myFeed.object(at: indexPath.row) as AnyObject).object(forKey: "pubDate") as? String 103 | cell.detailTextLabel?.textColor = UIColor.white 104 | 105 | return cell 106 | } 107 | 108 | func UIColorFromRGB(rgbValue: UInt) -> UIColor { 109 | return UIColor( 110 | red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, 111 | green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, 112 | blue: CGFloat(rgbValue & 0x0000FF) / 255.0, 113 | alpha: CGFloat(1.0) 114 | ) 115 | } 116 | 117 | func resizeImage(image:UIImage, toTheSize size:CGSize)->UIImage{ 118 | 119 | let scale = CGFloat(max(size.width/image.size.width, 120 | size.height/image.size.height)) 121 | let width:CGFloat = image.size.width * scale 122 | let height:CGFloat = image.size.height * scale; 123 | 124 | let rr:CGRect = CGRect(x: 0, y: 0, width: width, height: height) 125 | 126 | UIGraphicsBeginImageContextWithOptions(size, false, 0); 127 | image.draw(in: rr) 128 | let newImage = UIGraphicsGetImageFromCurrentImageContext() 129 | UIGraphicsEndImageContext(); 130 | return newImage! 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | NSAppTransportSecurity 45 | 46 | NSAllowsArbitraryLoads 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/RSSwift.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | Rsswift.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/RSSwift.xcdatamodeld/RSSwift.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/XmlParserManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XmlParserManager.swift 3 | // Rsswift 4 | // 5 | // Created by Arled Kola on 18/11/2016. 6 | // Copyright © 2016 ArledKola. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class XmlParserManager: NSObject, XMLParserDelegate { 12 | 13 | var parser = XMLParser() 14 | var feeds = NSMutableArray() 15 | var elements = NSMutableDictionary() 16 | var element = NSString() 17 | var ftitle = NSMutableString() 18 | var link = NSMutableString() 19 | var img: [AnyObject] = [] 20 | var fdescription = NSMutableString() 21 | var fdate = NSMutableString() 22 | 23 | // initilise parser 24 | func initWithURL(_ url :URL) -> AnyObject { 25 | startParse(url) 26 | return self 27 | } 28 | 29 | func startParse(_ url :URL) { 30 | feeds = [] 31 | parser = XMLParser(contentsOf: url)! 32 | parser.delegate = self 33 | parser.shouldProcessNamespaces = false 34 | parser.shouldReportNamespacePrefixes = false 35 | parser.shouldResolveExternalEntities = false 36 | parser.parse() 37 | } 38 | 39 | func allFeeds() -> NSMutableArray { 40 | return feeds 41 | } 42 | 43 | func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String]) { 44 | element = elementName as NSString 45 | if (element as NSString).isEqual(to: "item") { 46 | elements = NSMutableDictionary() 47 | elements = [:] 48 | ftitle = NSMutableString() 49 | ftitle = "" 50 | link = NSMutableString() 51 | link = "" 52 | fdescription = NSMutableString() 53 | fdescription = "" 54 | fdate = NSMutableString() 55 | fdate = "" 56 | } else if (element as NSString).isEqual(to: "enclosure") { 57 | if let urlString = attributeDict["url"] { 58 | img.append(urlString as AnyObject) 59 | } 60 | } 61 | } 62 | 63 | func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) { 64 | 65 | if (elementName as NSString).isEqual(to: "item") { 66 | if ftitle != "" { 67 | elements.setObject(ftitle, forKey: "title" as NSCopying) 68 | } 69 | if link != "" { 70 | elements.setObject(link, forKey: "link" as NSCopying) 71 | } 72 | if fdescription != "" { 73 | elements.setObject(fdescription, forKey: "description" as NSCopying) 74 | } 75 | if fdate != "" { 76 | elements.setObject(fdate, forKey: "pubDate" as NSCopying) 77 | } 78 | feeds.add(elements) 79 | } 80 | } 81 | 82 | func parser(_ parser: XMLParser, foundCharacters string: String) { 83 | if element.isEqual(to: "title") { 84 | ftitle.append(string) 85 | } else if element.isEqual(to: "link") { 86 | link.append(string) 87 | } else if element.isEqual(to: "description") { 88 | fdescription.append(string) 89 | } else if element.isEqual(to: "pubDate") { 90 | fdate.append(string) 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /RSSwift/RSSwift/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arled/swift-rss-reader-example/3bdd48704b1550d8f5c73e8f1fbfaa8240bd223e/RSSwift/RSSwift/feed.png -------------------------------------------------------------------------------- /RSSwift/RSSwiftTests/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 | -------------------------------------------------------------------------------- /RSSwift/RSSwiftTests/RSSwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RsswiftTests.swift 3 | // RsswiftTests 4 | // 5 | // Created by Arled Kola on 18/11/2016. 6 | // Copyright © 2016 ArledKola. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Rsswift 11 | 12 | class RsswiftTests: 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 | -------------------------------------------------------------------------------- /RSSwift/RsswiftUITests/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 | -------------------------------------------------------------------------------- /RSSwift/RsswiftUITests/RsswiftUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RsswiftUITests.swift 3 | // RsswiftUITests 4 | // 5 | // Created by Arled Kola on 18/11/2016. 6 | // Copyright © 2016 ArledKola. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class RsswiftUITests: 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 | --------------------------------------------------------------------------------