Latest 1.0
Homepage https://github.com/tosbaha/SMLib
License MIT
Platforms osx 10.9, ios 8.0, watchos 2.0, tvos 9.0, requires ARC
Authors

Travis CI Code coverage status Carthage compatible CocoaPods Platform

SMLib is a small library which implements SuperMemo SM2 Algorithm.

  1. Requirements
  2. Integration
  3. Usage
  4. Contributions
  5. License

Requirements

  • iOS 8.0+ | macOS 10.10+ | tvOS 9.0+ | watchOS 2.0+
  • Xcode 8

Integration

CocoaPods (iOS 8+, OS X 10.9+)

You can use CocoaPods to install SMLibby adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'SMLib'
end

Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0:

Carthage (iOS 8+, OS X 10.9+)

You can use Carthage to install SMLib by adding it to your Cartfile:

github "tosbaha/SMLib"

Swift Package Manager

You can use The Swift Package Manager to install SMLib by adding the proper description to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/tosbaha/SMLib.git", majorVersion: 1),
    ]
)

Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page

Usage

import SMLib

let card = Flashcard(front: "Front", back: "Back")
let flashcardgrade = Grade.pass
let engine = SM2Engine()
let gradedCard = engine.gradeFlashcard(flashcard: card, grade: flashcardgrade, currentDatetime: NSDate().timeIntervalSince1970)

Please check Tests,Example and SuperMemo SM2 Algorithm page for the details of the algorithm.

Contributions

Contributions are welcome! Feel free to submit a pull request.

Credits

License

SMLib is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "SMLib",
    "version": "1.0",
    "summary": "SuperMemo 2 Algorithm",
    "homepage": "https://github.com/tosbaha/SMLib",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "tosbaha": "[email protected]"
    },
    "requires_arc": true,
    "platforms": {
        "osx": "10.9",
        "ios": "8.0",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/tosbaha/SMLib.git",
        "tag": "1.0"
    },
    "source_files": "Source/*.swift",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This