Latest 0.2.1
License MIT
Platforms ios 8.0

TravisCI build status: master Cocoapods version: latest


A lightweight ensemble of nifty Swift collections that support weak references to their elements and provide some other supposedly helpful tiny interface additions.

// TODO: Currently the framework only contains a weak reference array.
The next additions are planned to be a dictionary, a set and a bidirectional dictionary.


This framework can be installed via Cocoapods, just add pod 'WeakRefCollections' to the target you’re planning to use it with.

Don’t forget to also add use_frameworks! if it isn’t in your Podfile yet.

// TODO: Integrate framework with SPM.

Latest podspec

    "name": "WeakRefCollections",
    "version": "0.2.1",
    "summary": "A lightweight ensemble of nifty Swift Collections that support weak references to their elements.",
    "description": "Unfortunately, Swift does not (yet?) have built-in (native) Collections (As in 'the Collection protocol'n-> Arrays, Sets, Dictionaries) that support weak references to their elements. Sure, there's NSMapTablenand NSHashTable. Have you ever tried to work with these? for-in iteration? Nope. .forEach()? Nope.nNifty functional programming with higher order functions like .map(), .reduce() and .filter()? Nope.nnBy using .allObjects or resorting to NSEnumerators, you can achieve these functionalities, too, you might say...nBut you're using Swift now. You don't want to have to do that, do you? You want lightweight, readable syntax,nno annoying hacks and workarounds. Maybe you're even writing a server application, so you don't want to havento import Foundation.nnThis framework is (will be) a humble attempt to provide Collections that properly support weak referencesnto their elements. Not only a pseudo-Set (NSHashTable) and a convoluted Dictionary (NSMapTable).nAn Array, a Set, a Dictionary, a bidirectional Dictionary and the protocol-conformances one wouldnexpect from those types.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Jan Nash": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "v0.2.1"
    "source_files": "WeakRefCollections/Sources/**/*.swift",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This