Skip to content

Releases: dragosrobertn/KNContacts

v.1.3.0 - Support for Swift Package Manager

02 May 12:28
299a9ee
Compare
Choose a tag to compare

Improvements

This release version adds support for Swift Package Manager. Once you have SPM set up, add this package to the dependencies.

dependencies: [
    .package(url: "https://github.com/dragosrobertn/KNContacts.git", .upToNextMajor(from: "1.3.0"))
]

v.1.2.3 - Localised formatting for KNDatesUtils

01 May 21:41
Compare
Choose a tag to compare

Improvements

  • All formatter methods in KNDatesUtils now accept a locale parameter to provide the formatted dates in the correct locale. Default is the device's current locale.

v.1.2.2 - Fix for birthdayIsUpcoming(in:startingdate:) to not consider current date

15 Jan 13:58
Compare
Choose a tag to compare

Improvements

  • New method birthdayMatches(date:) added to KNContact class to check if contact's birthday matches a particular date.

Bug fixes

  • Recent changes to birthdayIsUpcoming(in:startingdate:) have introduced a bug that was considering current date as an upcoming date. This has now been fixed. If you have been using that functionality and it was working as expected for you, please pass a starting date to birthdayIsUpcoming(in:startingdate:), or use isBirthdayToday() to achieve the same result.

v1.2.1 - Fix bug for isBirthdayComing date miscalculation

02 Jan 12:33
Compare
Choose a tag to compare

Bug fixes

  • This version a bug fix release for the KNContact.isBirthdayComing(in:) method which saw wrong results at certain times.

Improvements

  • Method signature changed to KNContact.isBirthdayComing(in: startingDate:) to accept a starting date from which to start counting instead of assuming current date. Default is current Date.

v1.2.0 - Swift 5 support, remove deprecated methods and bug fixes

28 Dec 03:24
Compare
Choose a tag to compare

Note: Upon further checks it looks like the date bug was not fixed properly in 1.2.0. Please use v1.2.1.

v1.2.0 features:

  • Support for Swift 5
  • It fixes a date bug caused by miscalculation when the date in the future would be in the following year.

v1.2.0 is a breaking change as:

Breaking changes

  • Drops support for Swift 4.2
  • Removes deprecated methods and warnings from v1.1.0

v.1.1.0 - Establish method naming convention.

30 Jun 23:53
Compare
Choose a tag to compare

Version 1.1.0 Introduces new methods and deprecates existing ones in favour of the new ones.

Mini-breaking changes

However, there will be small breaking changes, as follows:

  • KNDatesUtils and KNContactBookOrdering are now static structs and no longer require instantiation.

KNContact

Attributes

  • KNContact.details is deprecated in favour of KNContact.info

Methods

The following changes have been made:

  • KNContact.getAgeAsString(atNextBirthday: asOrdinal:) introduced and therefore:

    • KNContact.getAgeAsOrdinal() is deprecated.
    • KNContact.getAgeAtNextBirthday() is deprecated.
    • KNContact.getAgeAsOrdinalAtNextBirthday() is deprecated.
  • KNContact.formatBirthday(with: forCurrentYear:) introduced and therefore:

    • KNContact.formattedBirthday(with: currentYear:)
  • KNContact.getBirthday(forCurrentYear:) introduced and therefore:

    • KNContact.birthday(currentYear:) is deprecated

KNContactBook

Attributes

  • New read-only identifiers, contacts, contactsIdentifiers and count attributes introduced.

Methods

The following changes have been made:

  • KNContactBook.getContact(by:) and KNContactBook.getContacts(by:) introduced and therefore:

    • KNContactBook.updatedValues(for:) is deprecated
    • KNContactBook.get(forKey:) is deprecated
    • KNContactBook.getOptional(forKey:) is deprecated
  • As a result of the introduction of the contacts attribute, the KNContact.toArray() and KNContact.toArray(orderedBy:) are deprecated. Access the attribute directly and use sorted(by:) to achieve the same result.

  • As a result of the introduction of the identifiers attribute, the KNContact.keysArray() is deprecated. Access the attribute directly to retrieve the book keys.

KNContactsSchedule

Methods

The following changes have been made:

  • KNContactsSchedule.add(list:fromString:) is deprecated. To achieve the same result use KNContactsSchedule.add(list:to:) which signature's has now been modified.

KNTimeFormat

This enum has now been renamed to KNDateTimeFormat and has gained two type aliases for maintaining compatibility. Please use KNDateTimeFormat or KNFormat instead.

v.1.0.1 - Improvements to type safety and documentation.

30 Jun 12:34
Compare
Choose a tag to compare

This release maintain backwards compatibility with version 1.0.0.

Changes:

  • Improves type safety by removing potential nil values from certain return values.
  • Fully documented public classes and methods.