Pilgrim is a pure Swift successor to Typhoon

Overview

Pilgrim is a pure Swift successor to Typhoon!!

Typhoon 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.

Pilgrim (https://github.com/appsquickly/pilgrim) is a pure Swift successor to Typhoon. It is easy to migrate your Typhoon apps to Pilgrim. There's a pilgrim sample app here.


Pocket Forecast (Swift)

An example application built with Typhoon.

  • Looking for an Objective-C sample application? We have one here.

Features:

  • Returns weather reports from a remote cloud service
  • Caches weather reports locally, for later off-line use.
  • Stores (creates, reads, updates deletes) the cities that the user is interested in receiving reports for.
  • Can use metric or imperial units.
  • Displays a different theme (background image, colors, etc) on each run.

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.

Running the sample:

  • Clone this repository, open the Xcode project in your favorite IDE, and run it. It'll say you need an API key.
  • Get an API key from https://developer.worldweatheronline.com/
  • Using your API key, set the application configuration.
  • 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 to (Ha!). Now, proceed to the exercises below.

Exercises

  1. Study the core components, view controllers and themes. Notice how the framework allows you to group related components together. Notice how dependency injection allows for centralized configuration, at the same time as using aggressive memory management. (With default prototype-scope, components will go away whenever they're not being used).
  2. Study the test cases. Imagine that you needed to use one service URL for integration tests and another for production. How would you do it?
  3. Imagine that you decided to save the list of cities that the user wants to get reports for to iCloud, instead of locally on the device. Notice how you'd only need to change one line of code to supply your new implementation in place of the old one. And you'd be able to reuse the existing test cases.
  4. Imagine that you'd like to integrate with other weather data providers, and let the user choose at runtime. How would you do it?
  5. Try writing the same Application without dependency injection. What would the code look like?

The App

Weather Report Weather Report Weather Report

I'm blown away!

Typhoon 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 (@appsquickly). 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.

Typhoon is sponsored and lead by AppsQuick.ly with contributions from around the world.

***Thanks @hongcheng for the excellent Paperfold animation, and @michaeljbishop for the parallax effect. ***

Comments
  • Error in Xcode 6.2  date :2015.4.2   (Apr.)

    Error in Xcode 6.2 date :2015.4.2 (Apr.)

    It's a amazing app. But it crash when one url type was unwrapped. I can not find the error,so I would like you can run it in Xcode 6.2 to find it out . Thank you very much.

    opened by brandy2015 4
  • Xcode 9 Support

    Xcode 9 Support

    Unsupported Swift Version The targets “PocketForecastTests” and “PocketForecast” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets. Use Xcode 8.x to migrate the code to Swift 3.

    opened by JakeSc 1
  • Is it possible to inject using

    Is it possible to inject using "useInitializer" when method includes swift pure protocols?

    I have the following initializer

     init(database: DatabaseProtocol, deserializerFactory: DeserializerFactory ) {
            self.database = database
            self.deserializerFactory = deserializerFactory
    }

    and I try to inject parameters using

    definition.useInitializer("initWithDatabase:deserializerFactory:") {
             (initializer) in
                    
             initializer.injectParameterWith(self.dataStoreAssembly.database())
             initializer.injectParameterWith(self.dataStoreAssembly.deserializerFactory())
    }

    So far I understand, I should add @objc to DatabaseProtocol. Problem is that I can't do this since it has members that can't be represented in objective c

    opened by claudioredi 1
  • Error in the Swift 1.2 branch using Xcode 6.3

    Error in the Swift 1.2 branch using Xcode 6.3

    I've downloaded the project for the branch Swift 1.2 and run it in Xcode 6.3 but I have the following error:

    Initializer does not override a designated initializer from its superclass
    

    In the classes AddCityViewController and WeatherReportView in the lines 29 and 80 respectively.

    The branch isn't ready yet? How can I fix it?

    Thanks in advance.

    opened by Vkt0r 1
  • Working with v2 whether api with optional min/max temp for next days.

    Working with v2 whether api with optional min/max temp for next days.

    @jasperblues I create min and max temp optional values for the next days so now application works with test keys with v2 of the weather api.

    in the Configuration.plist there was api key that works with min and max temp. I removed it and I put $$YOUR_API_KEY_HERE$$. I tested with both cases - was ok - application don't crash.

    opened by lambovg 1
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • TyphoonStoryboard inject

    TyphoonStoryboard inject

    Unable to inject storyboard

    I'm getting error " definition!.injectProperty("homeStoryboard", with: self.homeStoryboard())" Error : objc[49398]: Class _NSZombie_FBSXPCMessage is implemented in both ?? (0x600000490b40) and ?? (0x600000490c60). One of the two will be used. Which one is undefined.

    @objc func appDelegate() -> AnyObject {
            return TyphoonDefinition.withClass(AppDelegate.self, configuration: {
                definition in
                definition!.injectProperty("homeStoryboard", with: self.homeStoryboard())
                definition!.injectProperty("loginStoryboard", with: self.loginStoryboard())
            }) as AnyObject
        }
    
        
        @objc func homeStoryboard() -> AnyObject {
            return TyphoonDefinition.withClass(TyphoonStoryboard.self, configuration: {
                definition in
                definition!.useInitializer(#selector(TyphoonStoryboard.init(name:factory:bundle:)), parameters: { initializer in
                    initializer!.injectParameter(with: "Home")
                    initializer!.injectParameter(with: self)
                    initializer!.injectParameter(with: Bundle.main)
                })
            }) as AnyObject
    
        }
        
        
        @objc func loginStoryboard() -> AnyObject {
            return TyphoonDefinition.withClass(TyphoonStoryboard.self, configuration: {
                definition in
                definition!.useInitializer(#selector(TyphoonStoryboard.init(name:factory:bundle:)), parameters: { initializer in
                    initializer!.injectParameter(with: "Login")
                    initializer!.injectParameter(with: self)
                    initializer!.injectParameter(with: Bundle.main)
                })
            }) as AnyObject
            
        }
    
    opened by yalamandarao 0
  • Runtime error: Value for config key days.to.retrieve is not configured. Make sure that you applied TyphoonConfigPostProcessor.

    Runtime error: Value for config key days.to.retrieve is not configured. Make sure that you applied TyphoonConfigPostProcessor.

    Xcode 7.2 (7C68) (latest as of 28 December 2015) Typhoon 3.4.4 (again, latest as of 28 December 2015)

    Pulled repo, changed API key, receive runtime error.

    FIX: Add "TyphoonGlobalConfigFilenames" to PocketForecast-Info.plist and point at the Configuration.plist:

    <key>TyphoonGlobalConfigFilenames</key>
    <array>
        <string>Configuration.plist</string>
    </array>
    

    I guess the Typhoon framework has changed and now required this rather than looking for it via filename convention..?

    opened by RussellWaite 0
  • AddCityViewController bug

    AddCityViewController bug

    fatal error: use of unimplemented initializer 'init(nibName:bundle:)' for class 'PocketForecast.AddCityViewController'

    Just mistake in initializer name required dynamic init(nibname : String?, bundle : NSBundle?)

    opened by W2N-git 2
  • Build errors with Xcode 6.1

    Build errors with Xcode 6.1

    Hi,

    I was just trying to run the project but there a countless issues regarding the use of Optionals and some other stuff that seems new with the evolution of Swift. Are you going to fix it or are you interested in a pull request?

    Kind regards, Sebastian

    opened by sebastianwr 11
Owner
AppsQuick.ly
We create beautiful digital media and mobile applications.
AppsQuick.ly
WWDC2020 Swift Student Challenge - TheHackOfRayTracing playground book

wwdc2021 My wwdc2021 submission The HackOf RayTracing How to run Install swift playground from App Store on your Mac or iPad Double clik TheHackOfRayT

haoboxuxu 20 May 20, 2022
Demo of a simple ASP.NET Core web API written in Swift

Welcome! This repo is a demo which shows the use of Llama Swift with ASP.NET Core. Llama is my exploratory project to compile "other languages" for .N

Eric Sink 14 Mar 2, 2022
[Accepted] My WWDC2021 Swift Student Challenge submission chosen as one of the 350 winners!

Genetic Algorithms | WWDC21 This project was entirely built with SwiftUI. To direct download this Playground and run it on your Mac or IPad, click he

Fred Lacis 2 Dec 22, 2021
My Winning Submission for Apple's WWDC 2021 Swift Student Challenge

Symmetries This playground book gives a quick insight into the symmetry groups of 3-dimensional objects like the platonic solids. The user can play ar

David 4 Apr 23, 2022
🎉 WWDC 2021 Swift Student Challenge Winner 🎉 Dance Party allows users to record choreography and play against other users to try and match the key poses!

?? Dance Party ?? ?? WWDC 2021 Swift Student Challenge Winner ?? Installation Steps (Works on iPad Only) Clone or Download Unzip the .playgroundbook.z

Alan Yan 7 Oct 17, 2022
Demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypaths ensure compile-time safety for all injectable services.

Injectable Demo Preliminary musings and demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypath

Michael Long 12 Aug 5, 2022
iOS Blogging app with renewable subscriptions powered by RevenueCat; Written in Swift

Subscription Blogging App: Thoughts for iOS 1. Overview A modern blogging iOS app written in Swift with subscription paywalls powered by RevenueCat. T

Afraz Siddiqui 32 Dec 16, 2022
Full featured Spotify iOS Client written in Swift 5

Spotify Client (iOS - Swift 5 - 2021) Full featured Spotify like app written in Swift 5 with MVVM architecture. Features Official Spotify API Use Play

Anton Tuzov 3 Dec 8, 2022
GoodAsOldPhones is the demo app of Swift tutorial on code school.

GoodAsOldPhones GoodAsOldPhones is the demo app of Swift tutorial on code school. This app demonstates basic use and implementation of tab bar control

Kushal Shingote 5 May 24, 2022
A sample iOS app built using the Clean Swift architecture

Main Purpose is to create a simple project for Clean-Swift This project wrote with using Clean-Swift and MVP Design Pattern

Eyup Cimen 8 Oct 24, 2022
OMDburner is a free and Open Source Application developed using Swift.

OMDburner is a free and Open Source Application developed using Swift.

Ayush Singh 4 Oct 19, 2021
Example Xcode swift iOS project for Core Data + iCloud syncing

iCloudCoreDataStarter Hello, I'm Chad. For the last several months I have been working on Sticker Doodle, an app you should go download right now! In

Chad Etzel 521 Dec 27, 2022
NasaAPOD App Built with swift

NasaAPOD Technical Description: App Runs on Swift 5 + iOS 15 (for testing only traget can be changed) App Folows MVVM+R pattern where R = router for n

Kalam 0 Dec 28, 2021
Code Swift iOS app showcasing basic movies list from Orange TV API.

iOS Code Test - Optiva Media Code Swift iOS app showcasing basic movies list from Orange TV API. Built using XCode 13.0 (Swift 5) How to run the examp

Manu Martinez 1 Oct 17, 2021
Instagram Clone Application Built Using Swift And Firebase

InstagramClone Bu instagram klon uygulamasında CoreLocation, Snapkit, Firebase, KingFisher, IQKeyboardManagerSwift kütüphaneleri kullanılmıştır. Kulla

Barış Can Akkaya 2 Oct 20, 2021
A basic todo app using swift

Toodoo A basic todo app Features Basics Today List Categorize Prioritize Future Tasks Support Pictures Reorder Tasks Cross platform Quick Entry Analyz

null 0 Nov 1, 2021
Simple examples that help you get started with Appwrite + Swift for Server (=❤️)

Playground for Swift Simple examples that help you get started with Appwrite + Swift (= ❤️ ) This is Appwrite server side integration with Swift. For

Appwrite 24 Dec 10, 2022
The Feed API challenge with swift

The Feed API challenge - iOSLeadEssentials.com It's time to put your skills to the test! You are called to implement the RemoteFeedLoader to load a co

Andrew Marmion 0 Oct 28, 2021