BEFoundation is a powerful Objective-C framework that enhances Apple's Foundation framework with advanced, reusable components. It provides a comprehensive set of utilities for notification management, runtime manipulation, number and data handling, image processing, data structures, and more — all designed for robustness, clarity, and testability.
- BEFoundation.framework.zip v1.0.0rc2 (Universal: arm64 x86_64)
- BEFoundation.framework.zip v1.0.0rc2 (arm64)
mutableUserInfo
forNSNotification
NSPriorityNotification
: Notifications with explicit priorityNSPriorityNotificationCenter
: Dispatches notifications in priority order linked to NSNotificationCenter
BECharacterSet
andBEMutableCharacterSet
: Making a distinction betweenNSCharacterSet
andNSMutableCharacterSet
- Metal helper utilities for converting MTLTextures to NSImage, and grey data to to XRGB
CIImage+BExtension
extension: overlay images with alpha, render text
- Mutable and Collection classes have their own protocols for distinction
- Runtime extensions to add selectors implemented by blocks to specific objects and classes
- Runtime extensions to add protocols implemented by objects or classes to specific objects and classes
- Global object registry with weak references to track object lifetimes
- Singleton pattern macro
- Array-based Stack and Queue
- Priority ordering extensions for
NSArray
andNSOrderedSet
- FxTime object to encapsulate CMTime and methods
- Path watcher class to observe file system changes
NSCoder+AtIndex
: Indexed encoding/decoding with key control (string or numeric)NSCoder+HalfFloat
: 16-bit float encoding/decodingNSMutableNumber
: Mutable variant ofNSNumber
NSNumber+Primes16b
: Contains all 16-bit prime numbers with roundingNSDateFormatterRFC3339
: Proper RFC 3339 date formatting initalization and setting
BEPredicateRule
: Evaluation system that can accept, reject, or remain neutral based on predicate evaluation
NSObject
dynamic protocol conformance implemented by objects and classesNSObject
Block-based selectors for instances and classes- Extensions for:
NSDictionary
numeric subscripts, object conversion, mapping, swapping, adding, and mergingNSMutableDictionary
numeric subscripts, filtering, swap, and recursive and nonrecursive adding and mergingNSArray
mapping, and conversionNSMutableArray
removeFirstObject, insert objects at index, and filteringNSSet
conversion, and mappingNSMutableSet
filteringNSOrderedSet
conversion, and mappingNSMutableOrderedSet
conversion, removing first and last, and filteringNSString
stringValue (to align with NSNumber and other plist data types), is a specific type of data in string formatNSMutableString
deleteAtIndex
BEFoundation includes comprehensive unit tests for all major components, using XCTest
. Tests cover behavior, edge cases, runtime behaviors, and error conditions.
- Download the BEFoundation.framework ZIP file for your project.
- Unzip the file.
- Include the BEFoundation.framework in your Project Target under the General Tab and "Framework and Libraries" section.
- Under the "Embed" dropdown select "Embed & Sign" or "Embed Without Signing".
- Import the Headers you'd like to use.
- Clone or download this repository.
- Add the
BEFoundation
source folder to your Xcode project. - Link against required frameworks:
Foundation
,CoreImage
,Metal
, etc. - Ensure ARC is enabled (where applicable).
Note: CocoaPods and SPM support can be added if needed — contact the maintainer or open a PR.
BEFoundation was initially conceived and engineered by [email protected] to resolve the lack of [NSString stringValue] and implementing a selector for an object (and instances) with a block. These requirements came about in working with Apple's FxPlug API in developing an advanced framework around it. The FxPlug buttons require an object method be implemented per button which is not directly possible in Objective C. The buttons need to be parameterized for an FxPlug framework.
- http://gcpdot.com Fully created by @belisoful in about year 2000.
- https://github.com/pradosoft/prado Implementing Advanced Features like the TCronModule.