Latest 1.0.0
Homepage https://github.com/jingx23/forex
License MIT
Platforms ios 9.0, requires ARC
Authors

Build status
Platform iOSSwift 4 compatible
Carthage compatible
CocoaPods compatible
License: MIT

By Jan Scheithauer.

Introduction

Foreign exchange rates and currency conversion framework. Small swift wrapper around Fixer

Usage

import Forex
//Specific exchange rate for a currency
Forex.shared.rate(value: 1.0, from: .EUR, to: .USD) { (exchange, error) in
    print("Name:(exchange?.currency.description) Rate: (exchange?.value)")
}

Forex.shared.rate(value: 1.0, from: .EUR, to: [.USD, .RUB]) { (exchanges, error) in
        for exchange in exchanges ?? [] {
            print("Name:(exchange.currency.description) Rate: (exchange.value)")
        }
}

//Same goes with date option
//Exchange rate for a specific date
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd"
let exchangeDate = dateFormatter.date(from: "2000-01-03")

Forex.shared.rate(value: 1.0, date: exchangeDate, from: .EUR, to: .USD) { (exchange, error) in
    print("Name:(exchange?.currency.description) Rate: (exchange?.value)")
}

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you found a bug or need help please check older issues before submitting an issue.

Before contribute check the CONTRIBUTING file for more info.

If you use Forex in your app We would love to hear about it! Drop us a line on Twitter.

Examples

Follow these 3 steps to run Example project: clone Forex repository, open Forex workspace and run the Example project.

You can also experiment and learn with the Forex Playground which is contained in Forex.workspace.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To install Forex, simply add the following line to your Podfile:

pod 'Forex', '~> 1.0'

Author

Changelog

See CHANGELOG.

Latest podspec

{
    "name": "Forex",
    "version": "1.0.0",
    "summary": "Foreign exchange rates and currency conversion framework",
    "homepage": "https://github.com/jingx23/forex",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jan Scheithauer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jingx23/forex.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/jingx23",
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "ios": {
        "source_files": "Sources/**/*.{swift}"
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This