Swiftpack.co - Package - klassen-software-solutions/KSSCore

KSSCore

Miscellaneous non-UI Swift utilities

Description

This package is divided into a number of Swift Modules providing utility methods related to both UI and non-UI classes. At present only KSSFoundation and KSSTest are available on both Mac and Linux. The remaining modules are only available on Mac.

The modules provided by this package are the following:

  • KSSFoundation - items that depend on nothing but the Foundation classes
  • KSSTest - items that depend on XCTest

API Documentation

What Has Changed In Version 5

This was only going to be a minor change bringing us to V4.1, however the logging was becoming more and more cumbersome due to the limitations is OSX pre 10.12. So we have made 10.12 the new minimum for this library.

In addition this version includes the following:

  • Made the XCTest extension for expect more general and removed the older version of the API.
  • Added the ability to watch a file and obtain the change notifications. This is a wrapper around the Apple Core Services, hence is not available on Linux.
  • Added a simple version of os_log for Linux for internal use only. (So some items that were previously logged in OSX and silent on Linux, are now logged on Linux as well.)
  • Added an additional duration version that computes a duration from a given date. This is more accurate than the previous version, which still exists, which does not require a given date but uses approximate values for the length of a month and year.

What Has Changed In Version 4

The primary change from version 3 to 4 is that all the UI related items have been removed from this package into a separate package, KSSCoreUI. The primarily reason for this was to make it easier to deal with both Linux and Mac systems in the same library, without a lot of exceptions to our standard development tools.

In particular this eliminates the need for manually maintaining the Makefile when new modules are added since we no longer need to distinguish between Linux supported and non-Linux supported modules.

Module Availability

At present we support all modules in macOS, iOS, and Linux. Note that the only Linux we have tested on is Ubuntu.

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

Version 5.0.0 - 2020-09-15 19:09:45

This version changed the minimum OSX version to be 10.12. This was done as the pre-10.12 support was becoming more and more cumbersome.

In addition, we added some more items from HTTPMonitor:

  • #28 Added some internal os_log support for Linux
  • #48 Added a more accurate version of duration
  • #51 Added the ability to watch a file or directory
  • #52 Improved the expect tests and simplified the API

Version 4.0.0 - 2020-09-07 21:14:12

The primary change from version 3 to 4 is that all the UI related items have been removed from this package into a separate package, KSSCoreUI. The primarily reason for this was to make it easier to deal with both Linux and Mac systems in the same library, without a lot of exceptions to our standard development tools.

In particular this eliminates the need for manually maintaining the Makefile when new modules are added since we no longer need to distinguish between Linux supported and non-Linux supported modules.

Version 3.2.2 - 2020-08-27 01:22:46

This version adds iOS support, primarily by not compiling the portions not appropriate to iOS.

Version 3.2.1 - 2020-08-20 01:28:18

This is a non-code change that rebuilds the prereqs-licenses.json file using the latest version of the license scanner.

Version 3.2.0 - 2020-08-19 19:33:36

This version adds a number of items that were written for the HTTPMonitor application of Ebed Technologies Ltd.

It fixes the following bugs:

  • #33 NSApplication.buildNumber is failing a unit test

And adds the following new features:

  • #4 Adds the ability to wait for a condition in the test infrastructure (motivated by the Java Awaitility, but using Swift expectations)
  • #32 Additional items added to the Array extension
  • #35 Added the ability for an NSApplication to detect light vs. dark appearance
  • #37 Added a SwiftUI search text field based on NSSearchField
  • #38 Added View modifiers to allow the font and font size to be set in NSViewRepresentable views
  • #39 Added View modifiers to allow common button attributes to be set in NSButton based NSViewRepresentable views
  • #41 Added an errorHighlightColor constant to NSColor to allow a consistent appearance in our error highlighting
  • #43 Allow an NSImage to be resized

It also deprecates a number of items, which will be removed in the next major version change:

  • The common button attributes in NSButton based views should no longer be set in the constructor. Instead modifiers have been written to do the same thing in a more SwiftUI based manner.

Version 3.1.2 - 2020-07-16 20:47:53

This version fixes (or rather works around) a bug in the Apple XML formatting.

Fixes:

  • #30 The XML pretty printing is adding a "standalone" item when it should not.

Version 3.1.1 - 2020-07-09 23:15:12

This version adds support for Linux, at least for KSSFoundation.

Version 3.1.0 - 2020-07-07 16:57:26

This versions adds two utilities required by KSSDiff. Specifically it adds the following:

  • Ability to create a string directly from the contents of a stream. String.init?(contentsOfStream:, encoding:)
  • Ability to easily count members of an array given a lambda. Array.countMatches(_ (Element) -> Bool) -> Int

Version 3.0.1 - 2020-06-22 14:44:25

There are no changes in this release. It was created to test that the uploading of the API docs is working again.

Version 3.0.0 - 2020-06-18 16:16:33

This version refactors the code so that all MapKit dependent items are in a KSSMap library and all WebKit dependent items are in a KSSWeb library.

Although the API calls itself have not changed, only the required import statements, this does make the change a non-back-compatible binary, hence the switch to a new major version number.

Version 2.3.0 - 2020-06-16 20:43:19

This version adds some items used by WSTerminal. Specifically it adds the following:

  • #17 Version and build number may be easily obtained from an NSApplication bundle
  • #18 The full range of a string may now be obtained as an NSRange
  • #19 A utility has been added to easily obtain a capture from a regex as a substring

Version 2.2.0 - 2020-06-09 19:52:39

This version adds a couple more utilities used in WSTerminal. Specifically this completes the following:

  • #14 Add a means of easily creating TimeInterval based constants
  • #15 Add a means of easily printing dates in a specified time zone

Version 2.1.0 - 2020-03-16 22:20:16

This version adds a number of items for Ebed Technologies Ltd. that are used in their WSTerminal and PrettyPrinter applications. These include the following:

  • #10 - Ability to read a stream into a Data object
  • #11 - Ability to create an NSImage from an input stream
  • #12 - Added "find and replace" functionality to the KSSTextView object

Version 2.0.0 - 2020-03-05 22:13:20

This is a complete restructuring of the project into the Swift Module format. In addition we split the project into three separate modules and added a number of items used during the development of the Ebed Technologies WSTerminal project.