BFKit-Swift: a collection of useful classes, structs and extensions to develop Apps faster
Features • Classes and Extensions Compatibility • Requirements • Communication • Contributing • Installing and Usage • Documentation • Changelog • Example • Todo • Author • License
Features
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
For example you can use every iOS font with just an enum!
It also adds some useful functions with Custom classes and extends Foundation, UIKit, AppKit and WatchKit classes.
Classes and Extensions Compatibility
BFKit
iOS | macOS | watchOS | Linux | |
---|---|---|---|---|
BFApp | ||||
BFBiometric | ||||
BFButton | ||||
BFDataStructures (List – Queue – Stack) |
||||
BFLog | ||||
BFPassword | ||||
BFSystemSound | ||||
BFTextField | ||||
BFTouchID |
Foundation
iOS | macOS | watchOS | Linux | |
---|---|---|---|---|
Array | ||||
Collection | ||||
Data | ||||
Date | ||||
FileManager | ||||
Number | ||||
NSObject | ||||
NSAttributedString | ||||
NSPointerArray | ||||
ProcessInfo | ||||
Set | ||||
String | ||||
Thread |
Core Graphics
iOS | macOS | watchOS | Linux | |
---|---|---|---|---|
CGPoint |
UIKit / AppKit
WebKit
iOS | macOS | watchOS | Linux | |
---|---|---|---|---|
UIWebView |
WatchKit
iOS | macOS | watchOS | Linux | |
---|---|---|---|---|
WKInterfaceController |
Requirements
*
With App Extension Support
Communication
- If you need help, open an issue
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, see Contributing section.
Contributing
See CONTRIBUTING.md file.
Installing and Usage
See Requirements section to check Swift, Xcode, BFKit-Swift and OS versions.
Manual
- Open and build the framework from the project (BFKit.xcodeproj)
- Import BFKit.framework into your project
- Import the framework with
import BFKit
- Enjoy!
CocoaPods
-
Create a Podfile in your project directory and write into:
platform :ios, '8.0' xcodeproj 'Project.xcodeproj' use_frameworks! pod 'BFKit-Swift'
-
Change “Project” with your real project name
-
Open Terminal, go to your project directory and type:
pod install
-
Import the framework with
import BFKit
-
Enjoy!
Carthage
-
Create a Cartfile in your project directory and write into:
github "FabrizioBrancati/BFKit-Swift"
-
Open Terminal, go to project directory and type:
carthage update
-
Include the created Framework in your project
-
Add Build Phase with the following contents:
/usr/local/bin/carthage copy-frameworks
Add the paths to the BFKit-Swift framework under Input Files
$(SRCROOT)/Carthage/Build/iOS/BFKit.framework
Add the paths to the copied frameworks to the Output Files
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/BFKit.framework
This script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files are copied when archiving
-
(Optional) Add Build Phase with the following contents
/usr/local/bin/carthage outdated --xcode-warnings
To automatically warn you when one of your dependencies is out of date
-
Import the framework with
import BFKit
-
Enjoy!
Swift Package Manager
-
Create a Package.swift file in your project directory and write into:
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "Project", products: [ .executable(name: "Project", targets: ["Project"]) ], dependencies: [ .package(url: "https://github.com/FabrizioBrancati/BFKit-Swift.git", .upToNextMajor(from: "4.0.0")) ], targets: [ .target(name: "Project", dependencies: ["BFKit"]) ] )
-
Change “Project” with your real project name
-
Open Terminal, go to project directory and type:
swift build
-
Import the framework with
import BFKit
-
Enjoy!
Documentation
Documentation
Jazzy generated documentation – 100% Documented
Changelog
To see what has changed in recent versions of BFKit-Swift, see the CHANGELOG.md file.
Example
Open and run the BFKitExample project in Example folder in this repo with Xcode and see BFKit-Swift in action!
Todo
- Add tvOS support
- Create a new Example App that shows all the functionalities of BFKit-Swift
- ~100% of code coverage with Unit Tests
- Improve code to get an A from codebeat
- Add macOS support
- Add watchOS support
- Create Unit Tests and add Codecov badge
- Add Linux support (Foundation extensions only)
- Add Carthage support
- Add to CocoaPods
- Create a great documentation
Author
Fabrizio Brancati
Website: https://www.fabriziobrancati.com
Email: [email protected]
License
BFKit-Swift is available under the MIT license. See the LICENSE file for more info.