Skip to content

Integration

Zhiyu Zhu/朱智语 edited this page Sep 11, 2019 · 4 revisions

To integrate EFStorage into your project, you can use

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/EFPrefix/EFStorage.git", .upToNextMajor(from: "0.0.2"))
],
targets: [
    .target(
        name: "YourTarget",
        dependencies: ["EFStorageCore", "EFStorageUserDefaults"/*, ...*/]),
]

Each individual component is its own module, so you'll need to import each module that you want to use like this:

import EFStorageUserDefaults
import EFStorageKeychainAccess

CocoaPods

pod 'EFStorage'
# or, specify subspecs that you are interested in:
pod 'EFStorage/UserDefaults'

Since all subspecs are combined into one single module, you just need to import that:

import EFStorage
Clone this wiki locally