Need help with Strongify?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

krzysztofzablocki
429 Stars 14 Forks MIT License 19 Commits 0 Opened issues

Description

Strongify is a 1-file µframework providing a nicer API for avoiding weak-strong dance.

Services available

!
?

Need anything else?

Contributors list

# 14,156
Objecti...
Swift
iOS
codegen...
6 commits
# 376,130
Swift
wwdc
Shell
webp
3 commits
# 44,014
Swift
rxswift
swift4
swift3
2 commits
# 255,056
Swift
Objecti...
iOS
memory-...
1 commit
# 98,767
Kotlin
miniapp
iOS
keyboar...
1 commit

Strongify

1-file µframework that gets rid of weak-strong dancing in Swift.

Basically allows you to go from this:

target.closure = { [weak self, weak other] some, arguments in 
    guard let strongSelf = self, let strongOther = other else { return }
    /// ... code
}

To this:

target.closure = strongify(weak: self, other) { strongSelf, strongOther, some, arguments in
    /// ... code
}

Read more

Installation

Swift Package Manager

Add

.Package(url: "https://github.com/krzysztofzablocki/Strongify.git", majorVersion: 1)
to your Package.swift file's dependencies.

CocoaPods

Add

pod 'Strongify'
to your Podfile.

Carthage

Add github

"krzysztofzablocki/Strongify"
to your Cartfile.

License

Strongify is available under the MIT license. See LICENSE for more information.

Attributions

I've used SwiftPlate to generate xcodeproj compatible with SPM, CocoaPods and Carthage.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.