[OBSOLETED] This example app is obsoleted and no longer follow the latest Xcode/Swift/Swinject versions.
This is an example project to demonstrate dependency injection and Swinject in a simple weather app that lists current weather information at some locations.
- Xcode 8 or later with Swift 3.0.x
- CocoaPods 1.1.0 or later
(Xcode 7 version with Swift 2.2 is here)
- Download the source code or clone the repository.
- Run
pod install
. - Get a free API key from OpenWeatherMap.
- Open
OpenWeatherMap.swift
and fillapiKey = ""
with your own API key.
The following blog posts demonstrate step-by-step development of the project introducing dependency injection and Swinject.
- Dependency Injection Framework for Swift - Simple Weather App Example with Swinject Part 1/2
- Dependency Injection Framework for Swift - Simple Weather App Example with Swinject Part 2/2
MIT license. See the LICENSE
file for details.