Skip to content

Instantly share code, notes, and snippets.

View anishparajuli555's full-sized avatar
😎

Anish Parajuli anishparajuli555

😎
  • Melbourne, Australia
View GitHub Profile
@anishparajuli555
anishparajuli555 / ImageCacheHelper.swift
Created January 6, 2016 08:15
Cache Image Locally
//
// UIImageExtension.swift
// EddyCab
//
// Created by Anish on 1/4/16.
// Copyright © 2016 Esig. All rights reserved.
//
import Foundation
import Alamofire
@anishparajuli555
anishparajuli555 / KeyChainWrapper.swift
Created January 4, 2017 05:04
This gist demonstrates how to save authentication token on Keychain
//SAMPLE CODE FROM APPLE
//https://developer.apple.com/library/content/samplecode/GenericKeychain/Listings/README_md.html
enum Key {
//...
//....
enum Headers {
static let Authorization = "Authorization"
static let ContentType = "Content-Type"
//I have a location manager class. This class just holds user current location so that it can be used later in the project.
//This will be singleton class later.Since singletons are hard to test(Because of no DI injection mechanism).I have not
implemented yet for now.The problem is at the end.
class HelperLocationManager:NSObject{
let locationManager:CLLocationManager
init(mgr:CLLocationManager) {