Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SwiftTemplateFramework Build Status Version Platforms Xcode 8.2+ Swift 3.0+

  • OS: iOS 10+
  • Languages: Written in Swift, supports apps in both Swift and Objective-C

A template framework that handles network requests in a generic way. Why? The idea is to remove your project dependencies on a single networking library. This project should allow the switching of network libraries, currently it support Siesta, but should be able to support many other libraries and keep the same interface.

This library is also a good example on how to move your common code into a seperate library, this way you can share this with many projects, maybe you decide to make a seperate iPad project? maybe just another project that uses the same api's, this way you can keep the logic in one place and share it.


Add to your current project pod file,

pod 'SwiftTemplateFramework', :git => ''

Initialise the network layer in your appDelegate method 'didFinishLaunchingWithOptions'

Urls.changeLocalConfig(newLocalConfig: [.all: ""]) NetworkRequestAdapter.sharedInstance.createNewInstancesOfServices(networkRequestAdapterDelegate: nil)

Then simply make a 'service' class which deals with the endpoint, e.g. userService, then you can make simple requests with one line calls:

NetworkRequestAdapter.performRequest(path: "/questions", onSuccess: onSuccess, onFailure: onFailure)


This repo includes a simple network example project. To download the example project, install its dependencies, and run it locally.

pod install


  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D


Andrew Reed -


  • Create example project using the framework.
You can’t perform that action at this time.