WeakableSelf alternatives and similar libraries
Based on the "Code Quality" category.
Alternatively, view WeakableSelf alternatives based on common mentions on social networks and blogs.
-
chisel
Chisel is a collection of LLDB commands to assist debugging iOS apps. -
MLeaksFinder
Find memory leaks in your iOS app at develop time. -
SwiftFormat
A command-line tool and Xcode Extension for formatting Swift code -
FBRetainCycleDetector
iOS library to help detecting retain cycles in runtime. -
FBMemoryProfiler
iOS tool that helps with profiling iOS Memory usage. -
OCLint
A static source code analysis tool to improve quality and reduce defects for C, C++ and Objective-C -
CleanArchitectureRxSwift
Example of Clean Architecture of iOS app using RxSwift -
HeapInspector-for-iOS
Find memory issues & leaks in your iOS app without instruments -
Dotzu
iOS app debugger while using the app. Crash report, logs, network. -
dotenv-linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀 -
spacecommander
Commit fully-formatted Objective-C as a team without even trying. -
IBAnalyzer
Find common xib and storyboard-related problems without running your app or writing unit tests. -
ODUIThreadGuard
A guard to help you check if you make UI changes not in main thread -
DWURecyclingAlert
Optimizing UITableViewCell For Fast Scrolling -
SwiftCop
SwiftCop is a validation library fully written in Swift and inspired by the clarity of Ruby On Rails Active Record validations. -
Warnings-xcconfig
An xcconfig (Xcode configuration) file for easily turning on a boatload of warnings in your project or its targets. -
Marshroute
Marshroute is an iOS Library for making your Routers simple but extremely powerful -
PSTModernizer
Makes it easier to support older versions of iOS by fixing things and adding missing methods -
Trackable
Trackable is a simple analytics integration helper library. It’s especially designed for easy and comfortable integration with existing projects. -
DecouplingKit
decoupling between modules in your iOS Project. iOS模块化过程中模块间解耦方案 -
AnyLint
Lint anything by combining the power of scripts & regular expressions. -
UIBaseKit
This helps make the view's configuration code, hierarchy code, and constraint code neat. -
SwiftLinter
Share lint rules between projects and lint changed files with SwiftLint. -
Bugsee
In-app bug and crash reporting with video, logs, network traffic and traces.
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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 WeakableSelf or a related project?
README
WeakableSelf
Context
Closures are one of Swift must-have features, and Swift developers are aware of how tricky they can be when they capture the reference of an external object, especially when this object is self
.
To deal with this issue, developers are required to write additional code, using constructs such as [weak self]
and guard
, and the result looks like the following:
service.call(completion: { [weak self] result in
guard let self = self else { return }
// use weak non-optional `self` to handle `result`
})
Purpose of WeakableSelf
The purpose of this micro-framework is to provide the developer with a helper function weakify
that will allow him to declaratively indicate that he wishes to use a weak non-optional reference to self
in closure, and not worry about how this reference is provided.
Usage
Using this weakify
function, the code above will be transformed into the much more concise:
import WeakableSelf
service.call(completion: weakify { strongSelf, result in
// use weak non-optional `strongSelf` to handle `result`
})
weakify
works with closures that take up to 7 arguments.
Installation
Requirements
- Swift 4.2+
- Xcode 10+
CocoaPods
Add the following to your Podfile
:
pod "WeakableSelf"
Carthage
Add the following to your Cartfile
:
github "vincent-pradeilles/weakable-self"