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)
mutableUserInfoforNSNotificationNSPriorityNotification: Notifications with explicit priorityNSPriorityNotificationCenter: Dispatches notifications in priority order linked to NSNotificationCenter
BECharacterSetandBEMutableCharacterSet: Making a distinction betweenNSCharacterSetandNSMutableCharacterSet
- Metal helper utilities for converting MTLTextures to NSImage, and grey data to to XRGB
CIImage+BExtensionextension: 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
NSArrayandNSOrderedSet - 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 ofNSNumberNSNumber+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
NSObjectdynamic protocol conformance implemented by objects and classesNSObjectBlock-based selectors for instances and classes- Extensions for:
NSDictionarynumeric subscripts, object conversion, mapping, swapping, adding, and mergingNSMutableDictionarynumeric subscripts, filtering, swap, and recursive and nonrecursive adding and mergingNSArraymapping, and conversionNSMutableArrayremoveFirstObject, insert objects at index, and filteringNSSetconversion, and mappingNSMutableSetfilteringNSOrderedSetconversion, and mappingNSMutableOrderedSetconversion, removing first and last, and filteringNSStringstringValue (to align with NSNumber and other plist data types), is a specific type of data in string formatNSMutableStringdeleteAtIndex
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
BEFoundationsource 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 belisoful@icloud.com 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.