Merge pull request #2 from orospakr/swift-pm-4 Swift tools 4.x support (Swift PM 4)
Merge pull request #2 from orospakr/swift-pm-4
Swift tools 4.x support (Swift PM 4)
SMLib is a small library which implements SuperMemo SM2 Algorithm.
You can use CocoaPods to install SMLibby adding it to your Podfile:
SMLib
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:
You can use Carthage to install SMLib by adding it to your Cartfile:
Cartfile
github "tosbaha/SMLib"
You can use The Swift Package Manager to install SMLib by adding the proper description to your Package.swift file:
Package.swift
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
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 are welcome! Feel free to submit a pull request.
SMLib is released under the MIT license. See LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SMLib
SMLib is a small library which implements SuperMemo SM2 Algorithm.
Requirements
Integration
CocoaPods (iOS 8+, OS X 10.9+)
You can use CocoaPods to install
SMLib
by adding it to yourPodfile
: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 yourCartfile
:Swift Package Manager
You can use The Swift Package Manager to install
SMLib
by adding the proper description to yourPackage.swift
file:Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page
Usage
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.