{"id":13489124,"url":"https://github.com/appsquickly/Typhoon-Swift-Example","last_synced_at":"2025-03-28T04:30:54.654Z","repository":{"id":20544260,"uuid":"23823792","full_name":"appsquickly/Typhoon-Swift-Example","owner":"appsquickly","description":"Swift example application for Typhoon","archived":true,"fork":false,"pushed_at":"2021-01-01T23:31:32.000Z","size":9646,"stargazers_count":352,"open_issues_count":8,"forks_count":73,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-05-13T20:23:28.015Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appsquickly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-09T07:30:17.000Z","updated_at":"2023-12-04T22:33:33.000Z","dependencies_parsed_at":"2022-09-11T01:12:33.321Z","dependency_job_id":null,"html_url":"https://github.com/appsquickly/Typhoon-Swift-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsquickly%2FTyphoon-Swift-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsquickly%2FTyphoon-Swift-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsquickly%2FTyphoon-Swift-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsquickly%2FTyphoon-Swift-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appsquickly","download_url":"https://codeload.github.com/appsquickly/Typhoon-Swift-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245970336,"owners_count":20702390,"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","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-07-31T19:00:17.572Z","updated_at":"2025-03-28T04:30:53.074Z","avatar_url":"https://github.com/appsquickly.png","language":"Swift","funding_links":[],"categories":["Swift","Weather","Demo Apps / 示例程序","Demo Apps"],"sub_categories":["Notes","iOS"],"readme":"# [Pilgrim](https://pilgrim.ph) is a pure Swift successor to Typhoon!!\n\nTyphoon uses the Objective-C runtime to collect metadata and instantiate objects. It powers thousands of Objective-C applications but it is not all that great for modern Swift. \n\n**Pilgrim (https://github.com/appsquickly/pilgrim) is a pure Swift successor to Typhoon. It is easy to migrate your Typhoon apps to [Pilgrim](https://pilgrim.ph).**  There's a pilgrim sample app [here](https://github.com/appsquickly/pilgrim-starter). \n\n----\n\nPocket Forecast (Swift)\n==========================\n\nAn example application built with \u003ca href =\"http://typhoonframework.org/\"\u003eTyphoon\u003c/a\u003e.\n\n* Looking for an Objective-C sample application? We \u003ca href=\"https://github.com/appsquickly/typhoon-example\"\u003ehave one here\u003c/a\u003e. \n\n### Features: \n\n* Returns weather reports from a remote cloud service\n* Caches weather reports locally, for later off-line use. \n* Stores (creates, reads, updates deletes) the cities that the user is interested in receiving reports for. \n* Can use metric or imperial units. \n* Displays a different theme (background image, colors, etc) on each run. \n\n\n***NB: The free weather API that we were using no longer includes forecast information, so this won't be displayed in the app until we find an alternative. The concepts remain the same.***\n\n### Running the sample:\n\n* Clone this repository, open the Xcode project in your favorite IDE, and run it. It'll say you need an API key.\n* Get an API key from https://developer.worldweatheronline.com/ \n* Using your API key, set the \u003ca href=\"https://github.com/typhoon-framework/Typhoon-example/blob/master/PocketForecast/Assembly/Configuration.plist\"\u003eapplication configuration\u003c/a\u003e.\n* Run the App in the simulator or on your device. Look up the weather in your town, and put a jacket on, if you need \nto (Ha!). Now, proceed to the exercises below. \n\n### Exercises\n\n1. Study the \u003ca href=\"https://github.com/typhoon-framework/Typhoon-Swift-Example/blob/master/PocketForecast/Assembly/CoreComponents.swift\"\u003ecore components\u003c/a\u003e, \n\u003ca href=\"https://github.com/typhoon-framework/Typhoon-Swift-Example/blob/master/PocketForecast/Assembly/ApplicationAssembly.swift\"\u003eview controllers\u003c/a\u003e and \u003ca href=\"https://github.com/typhoon-framework/Typhoon-Swift-Example/blob/master/PocketForecast/Assembly/ThemeAssembly.swift\"\u003ethemes\u003c/a\u003e. \nNotice how the framework allows you to group related components together. Notice how dependency injection allows for \ncentralized configuration, at the same time as using aggressive memory management. (With default prototype-scope, components will go away \nwhenever they're not being used). \n1. Study the \u003ca href=\"https://github.com/typhoon-framework/Typhoon-Swift-Example/tree/master/PocketForecastTests/Integration\"\u003etest cases\u003c/a\u003e.\nImagine that you needed to use one service URL for integration tests and another for production. How would you do it?\n1. Imagine that you decided to save the list of cities that the user wants to get reports for to iCloud, instead of \nlocally on the device. Notice how you'd only need to change one line of code to supply your new implementation in \nplace of the old one. And you'd be able to reuse the existing test cases. \n1. Imagine that you'd like to integrate with other weather data providers, and let the user choose at runtime. How would you do it? \n1. Try writing the same Application without dependency injection. What would the code look like? \n\n\n\n### The App \n![Weather Report](http://appsquickly.github.io/typhoon/images/portfolio/PocketForecast3.gif)\n![Weather Report](http://appsquickly.github.io/typhoon/images/portfolio/pf-beach1.png)\n![Weather Report](http://appsquickly.github.io/typhoon/images/portfolio/pf-lights1.png)\n\n### I'm blown away!\n\nTyphoon is a non-profit, community driven project. We only ask that if you've found it useful to star us on Github or send a tweet mentioning us (\u003ca href=\"https://twitter.com/appsquickly\"\u003e@appsquickly\u003c/a\u003e). If you've written Typhoon related blog or tutorial, or published a new Typhoon powered app, we'd certainly be happy to hear about that too. \n\nTyphoon is sponsored and lead by \u003ca href=\"http://appsquick.ly\"\u003eAppsQuick.ly\u003c/a\u003e with \u003ca href=\"https://github.com/appsquickly/Typhoon/graphs/contributors\"\u003econtributions from around the world\u003c/a\u003e. \n\n***Thanks @hongcheng for the excellent \u003ca href=\"https://github.com/honcheng/PaperFold-for-iOS\"\u003ePaperfold\u003c/a\u003e animation, and @michaeljbishop for the \u003ca href=\"https://github.com/michaeljbishop/NGAParallaxMotion\"\u003eparallax effect\u003c/a\u003e. ***\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsquickly%2FTyphoon-Swift-Example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsquickly%2FTyphoon-Swift-Example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsquickly%2FTyphoon-Swift-Example/lists"}