{"id":21870448,"url":"https://github.com/anscoder/weatherappdemo","last_synced_at":"2025-08-17T13:34:36.321Z","repository":{"id":103901865,"uuid":"60114781","full_name":"ANSCoder/WeatherAppDemo","owner":"ANSCoder","description":"A simple weather demo source code  in Swift 2.2 language.","archived":false,"fork":false,"pushed_at":"2016-09-12T18:01:29.000Z","size":1798,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T22:22:05.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ANSCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-31T18:47:34.000Z","updated_at":"2016-09-20T08:00:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfd57f18-0669-4948-bb18-1b0e103fd62c","html_url":"https://github.com/ANSCoder/WeatherAppDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ANSCoder/WeatherAppDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSCoder%2FWeatherAppDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSCoder%2FWeatherAppDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSCoder%2FWeatherAppDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSCoder%2FWeatherAppDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ANSCoder","download_url":"https://codeload.github.com/ANSCoder/WeatherAppDemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSCoder%2FWeatherAppDemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856563,"owners_count":24657688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T06:11:28.030Z","updated_at":"2025-08-17T13:34:36.275Z","avatar_url":"https://github.com/ANSCoder.png","language":"Swift","readme":"# Weather-App-Demo\n\n![](https://github.com/ANSCoder/Weather-App-Demo/blob/master/Images/Simulator%20Screen%20Shot%2001-Jun-2016%2C%2012.25.11%20AM.png) \n\n![](https://github.com/ANSCoder/Weather-App-Demo/blob/master/Images/Simulator%20Screen%20Shot%2001-Jun-2016%2C%2012.25.37%20AM.png)\n\n![](https://github.com/ANSCoder/Weather-App-Demo/blob/master/Images/Simulator%20Screen%20Shot%2001-Jun-2016%2C%2012.25.44%20AM.png)\n\n![](https://github.com/ANSCoder/Weather-App-Demo/blob/master/Images/Simulator%20Screen%20Shot%2001-Jun-2016%2C%2012.26.00%20AM.png)\n\nWeather-App-Demo is an weather app demo written in Swift.\n\n## Features\n\n- [x] XML/Soap Parsing\n- [x] Alamofire library use\n- [x] SWXMLHash parser use\n- [x] web view\n\nIn this demo i have added XML Parsing with Yahoo XML Api and getting weather details link and show on the \nweb view here.\n\n###For Parsing i used Alamofire and for XML parsing used SWXMLHash library.\n\n```bash\n$ gem install cocoapods\n```\n\n\u003e CocoaPods 0.39.0+ is required to build Alamofire 3.0.0+.\n\nTo integrate Alamofire and SWXMLHash into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\npod 'Alamofire', :git =\u003e 'https://github.com/Alamofire/Alamofire'\npod 'SWXMLHash', :git =\u003e 'https://github.com/drmohundro/SWXMLHash'\n\n```\n \nThen, run the following command:\n\n```bash\n$ pod install\n``` \n### Response Handling with the XML data \n \n```swift\nAlamofire.request(.GET, is_URL)\n            .responseJSON { response in\n                    let xmls = SWXMLHash.parse(response.data!)\n                    func enumerate(indexer: XMLIndexer, level: Int) {\n                        for child in indexer.children {\n                            let name:String? = child.element!.name\n                            print(\"\\(level) \\(name)\")\n                            // Take Link from XML data here \n                            if name! == \"link\" {\n                                let text = child.element!.text\n                                if text?.isEmpty == false{\n                                   print(text)\n                                  // Finish here Process\n                                  completion(result: text!)\n                                }\n                            }\n                            enumerate(child, level: level + 1)\n                        }\n                    }\n                enumerate(xmls, level: 0)\n            }\n       }\n``` \n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanscoder%2Fweatherappdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanscoder%2Fweatherappdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanscoder%2Fweatherappdemo/lists"}