Swiftpack.co -  vito-royeca/ManaKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
A database of Magic: The Gathering cards. Includes prices and images.
.package(url: "https://github.com/vito-royeca/ManaKit.git", from: "7.0.0")


CI Status Version License Platform

A Core Data implementation of Scryfall.


The singleton ManaKit class provides API methods for setting up theRealmdatabase, getting images embedded in the framework, and a lot more.

Set up ManaKit in your app delegate class:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    ManaKit.sharedInstance.configureTcgPlayer(partnerKey: "Your_Partner_Key", publicKey: nil, privateKey: nil)
    return true

To access the Realm database, you may use the realm of ManaKit:

ManaKit also provides methods to get MTG images.

Specific images:

open func imageFromFramework(imageName: ImageName) -> UIImage?

Casting Cost images:

open func manaImages(manaCost: String) -> [[String:UIImage]]

Card image:

open func downloadCardImage(_ card: CMCard, cropImage: Bool, completion: @escaping (_ card: CMCard, _ image: UIImage?, _ croppedImage: UIImage?, _ error: NSError?) -> Void)

TCG Player Hi-Mid-Low Pricing API.

open func fetchTCGPlayerPricing(card: CMCard, completion: @escaping (_ cardPricing: CMCardPricing?, _ error: Error?) -> Void)


To run the example project, clone the repo, and run pod install from the Example directory first.


ManaKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ManaKit"


Jovito Royeca vito.royeca@gmail.com


ManaKit is available under the MIT license. See the LICENSE file for more info.


Stars: 1
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API