Advances in Foundation

Description: The Foundation framework provides a base layer of functionality for apps and frameworks that's used throughout the macOS, iOS, watchOS, and tvOS SDKs. Hear about valuable enhancements to Foundation collections, performance, internationalization features, and Swift integration.

New:

  • A native diffing algorithm
  • A native way to compress Data (zlib and more)
  • New Units:
    • UnitDuration: Added milliseconds, microseconds, nanoseconds, and picoseconds
    • UnitFrequency: Added framesPerSecond
    • UnitInformationStorage: Bits, Bytes, and more
  • MeasurementFormatter and ByteCountFormatter to display the new UnitInformationStorage
  • RelativeDateTimeFormatter: “one hour ago”, “in two weeks” etc
  • New ListFormatter
let string = ListFormatter.localizedString(byJoining: ["🐶","🐷","🦄"])

// en_US: "🐶, 🐷, and 🦄"
// es_ES: "🐶, 🐷 y 🦄"
// zh_TW: "🐶、🐷和🦄"
  • GDC Improvement: barriers: in concurrent threads/environments we can now use a barrier, which makes sure that no other tasks can run while the barrier operation is ongoing.

Missing anything? Corrections? Contributions are welcome 😃

Related

Written by

Federico Zanetello

Federico Zanetello

Software engineer with a strong passion for well-written code, thought-out composable architectures, automation, tests, and more.