ObjectiveKit alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view ObjectiveKit alternatives based on common mentions on social networks and blogs.
-
swift-algorithm-club
Algorithms and data structures in Swift, with explanations! -
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
BlocksKit
The Objective-C block utilities you always wish you had. -
libextobjc
A Cocoa library to extend the Objective-C programming language. -
InAppSettingsKit
This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app. -
EKAlgorithms
EKAlgorithms contains some well known CS algorithms & data structures. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
EZSwiftExtensions
:smirk: How Swift standard types and classes were supposed to work. -
Reusable
A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…) -
ObjectiveSugar
ObjectiveC additions for humans. Ruby style. -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
BFKit-Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster. -
BFKit
BFKit is a collection of useful classes and categories to develop Apps faster. -
RateLimit
Simple utility for only executing code every so often. -
VTAcknowledgementsViewController
Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies. -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
SwiftFoundation
Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux) -
AssistantKit
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift. -
DeviceGuru
DeviceGuru is a simple lib (Swift) to know the exact type of the device, e.g. iPhone 6 or iPhone 6s. Please ⭐️ this repo on the top right corner to make this repo popular. -
SwiftyUtils
All the reusable code that we need in each project -
Retry
Haven't you wished for `try` to sometimes try a little harder? Meet `retry` -
YAML.framework
Proper YAML support for Objective-C. Based on recommended libyaml. -
Standard Template Protocols
Protocols for your every day iOS needs -
SBConstants
Generate a constants file by grabbing identifiers from storyboards in a project. -
ReflectableEnum
Reflection for enumerations in Objective-C. -
ZamzamKit
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks. -
XestiMonitors
An extensible monitoring framework written in Swift -
SwiftParsec
A parser combinator library written in the Swift programming language.
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ObjectiveKit or a related project?
README
ObjectiveKit
ObjectiveKit provides a Swift friendly API for a set of powerful Objective C runtime functions.
Usage
To use ObjectiveKit:
Import ObjectiveKit at the top of your Swift file:
import ObjectiveKit
The next step is to create an ObjectiveClass object typed for the class you want to modify or introspect:
let viewClass = ObjectiveClass<UIView>()
If using ObjectiveKit on a custom Swift class, make sure that it inherits at some point from NSObject and that it is exposed to the Objective C runtime using the @objc flag.
Introspection
You can learn more about classes at runtime with these handy introspection methods:
let mapViewClass = ObjectiveClass<MKMapView>()
let ivars = mapViewClass.ivars // An array of ivars.
let selectors = mapViewClass.selectors // An array of selectors.
let properties = mapViewClass.properties // An array of properties.
let protocols = mapViewClass.protocols // An array of protocols.
Modifying classes at runtime
Add a pre-existing selector from another class to your ObjectiveClass:
let viewClass = ObjectiveClass<UIView>()
viewClass.addSelector(#selector(testSelector), from: self.classForCoder)
let view = UIView()
view.perform(#selector(testSelector))
Add a custom method by providing the implementation with a closure:
let viewClass = ObjectiveClass<UIView>()
viewClass.addMethod(closureName, implementation: {
print("hello world")
})
let view = UIView()
view.performMethod(closureName)
ObjectiveKit also supports exchanging selectors in the same class:
let viewClass = ObjectiveClass<UIView>()
viewClass.exchangeSelector(#selector(UIView.layoutSubviews), with: #selector(UIView.xxx_layoutSubviews))
Creating classes at runtime
Lastly, you can also create a custom ObjC class at runtime:
let runtimeClass = RuntimeClass(superclass: UIView.self)
runtimeClass.addIvar(ivarName, type: .Float)
let runtimeObject = runtimeClass.allocate()
runtimeObject.setValue(4.0, forKey: ivarName)
Setting up
Setting up with CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
pod 'ObjectiveKit', '~> 0.2'
Setting up with Carthage
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate ObjectiveKit into your Xcode project using Carthage, specify it in your Cartfile
:
github "marmelroy/ObjectiveKit"