Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILFoundation

ILFoundation: Extensions to the Foundation framework for iOS and macOS development.

From iStumbler Labs.

Contents

Goals

ILFoundation adds UTF8 and hex string encoding to NSString, adds RFC 2397 data: URL support to NSURL, and adds ILHashable and ILHashingInputStream for calculating hashs on Data and Streams

ILFoundation supports the CardView and Soup frameworks.

Categories

Categories are defined on Foundation classes to provide extensions for text processing and working with data urls.

  • ILHashable

    • Adds: methods for generating Message Digest and Secure Hashes from objects
  • NSData+ILFoundation

    • Adds: ILHashable methods to NSData
  • NSStream+ILFoundation

    • Adds: ILHashable methods to NSInputStream
    • Adds: ILHasingInputStream class to wrap NSInputStream objects and generate hash codes
  • NSString+ILFoundation

    • Adds: +UTFEncodingOfData: to auto-detect UTF formatted strings
    • Adds: +stringWithUTFData: and -initWithUTFData:
    • Adds: -dataWithByteOrderUTFEncoding:
    • Adds: +hexStringWithData: to generate hex output from NSData
    • Adds: -initHexStringWithData:
    • Adds: -linesWithMaxLen: to split a long string (hex or otherwise) into lines of a maximum length
  • NSURL+ILFoundation Adds methods for working with RFC 2397 data: URLs:

    • Adds: +dataURLWithData: and +dataURLwithData:mediaType:parameters:contentEncoding: for genrating data: URLs
    • Adds: -URLData and -URLDataWithMediaType:parameters:contentEncoding: for parsing data: URLs
      • Supports utf8, hex, and base64 encodings
    • Adds Data:x-type/... URLs for:
      • Date - +dataURLWithDate: and +dateWithDataURL:
      • Intervals - +dataURLWithDate:interval: and +dateWithDataURL:interval:
      • Points - +dataURLWithPoint: and +pointWithDataURL:
      • Sizes - +dataURLWithSize: and +sizeWithDataURL:
      • Rects - +dataURLWithRect: and +rectWithDataURL:
      • Ranges - +dataURLWithRange: and +rangeWithDataURL:
      • Vectors - +dataURLWithVector: and +vectorWithDataURL:
      • Measures - +dataURLWithMeasure: and +measureWithDataURL:
      • Regex - +dataURLWithRegex: and +regexWithDataURL:
    • Adds +URNWithUUID: and +UUIDWithURL: for UUID URNs
    • Adds: +URLWithUTTypeData: for unpacking URLs from pasteboard data with UTType public.url

To Do Items

  • implement ILHashingOutputStream
  • implement SHA3 and Skein Hash functions
  • implement +dataURLWithPredicate:... and +dataURLWithSort:... in NSURL

Version History

  • 1.2.0: 11 April 2026

  • 1.1.0: 20 April 2025

    • Added UTF8 Error detection and correction code from Athenstean
    • Improved Swift Interface <- this is a breaking change, but the major version is not incremented
    • Adds Data:x-type/... URLs for Date, Intervals, Points, Sizes, Rects, Ranges, Vectors, Measures, and Regex objects
    • Adds UUID URNs
    • Fixes iOS build by removing NSPoint
  • 1.0: 26 February 2025

    • Forked from KitBridge, added NSData hash code functions

Using ILFoundation in your App

  • Clone the latest sources: git clone https://github.com/iStumblerLabs/ILFoundation.git near or inside your application's project directory
  • Drag ILFoundation.xcodproj into your project
  • include the ILFoundation.framework in your applications Resources/Frameworks directory
    • link the appropriate version of ILFoundation.framework to all the targets which use it

Swift Package

A Swift Package is defined in Package.swift for projects using Swift Package Manager, you can include the following URL in your project to use it:

https://github.com/alfwatt/ILFoundation

License

The MIT License (MIT)

Copyright © 2017-2026 Alf Watt <alf@istumbler.net>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Extensions to the Foundation framework for iOS and macOS development

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages