A simple example to use Swinject with unit tests
Swift Ruby
Switch branches/tags
Nothing to show
Clone or download
yoichitgy Merge pull request #6 from yoching/update-for-swinjectstoryboard-1.0.0
Update SwinjectStoryboard version to 1.0.0
Latest commit 786832a Feb 6, 2017



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)


  1. Download the source code or clone the repository.
  2. Run pod install.
  3. Get a free API key from OpenWeatherMap.
  4. Open OpenWeatherMap.swift and fill apiKey = "" with your own API key.

Blog Posts

The following blog posts demonstrate step-by-step development of the project introducing dependency injection and Swinject.


MIT license. See the LICENSE file for details.