Swiftpack.co - swiftkits/CoreFoundationKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swiftkits.
swiftkits/CoreFoundationKit 0.1.1
Provides helpful extensions and rich features build on top of Foundation framework.
⭐️ 0
🕓 1 year ago
iOS
.package(url: "https://github.com/swiftkits/CoreFoundationKit.git", from: "0.1.1")

CoreFoundationKit

MIT license CoreUIKit CI workflow Pod Carthage SPM

CoreFoundationKit provides helpful extensions and rich features build on top of Foundation framework.

Installation

Cocoapods

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. Learn More!

pod 'CoreFoundationKit', '0.1.0'

Swift package manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. Learn More!

dependencies: [
    .package(url: "https://github.com/swiftkits/CoreFoundationKit.git", .upToNextMajor(from: "0.1.0"))
]

Carthage

A simple, decentralized dependency manager for Cocoa. Learn More!

github "CoreFoundationKit" ~> 0.1.0

Documentation

Examples

  • How to setup FileOperation
let manager = FileManager.default
let rootDir = try! manager.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)

let directoryOperation = FileDirectoryOperation(manager: manager, rootDir: rootDir)
let fileOperations = FileOperation(directoryManager: directoryOperation)
  • How to save file data into local file storage
let savedFile = try fileOperations.save(contentsOf: imageData, with: fileName)

//
// Returns
// FileItem with saved file info
//

savedFile.location // Local storage url of the file
savedFile.name     // Name of the file
savedFile.data     // data of the file

  • How delete file from local storage
try fileOperations.deleteFile(at: localFileURL)
  • How to fetch the saved file from local storage
try fileOperations.getFile(at: localFileURL)

Learn

Following are the useful links for learning about autolayout.

Author

Written By Manish Pandey.

GitHub

link
Stars: 0
Last commit: 40 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Version 0.1.1
1 year ago
  • Updated podspec links
  • Updated Readme links

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