Releases: dragosrobertn/KNContacts
v.1.3.0 - Support for Swift Package Manager
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
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
Improvements
- New method
birthdayMatches(date:)
added toKNContact
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 tobirthdayIsUpcoming(in:startingdate:)
, or useisBirthdayToday()
to achieve the same result.
v1.2.1 - Fix bug for isBirthdayComing date miscalculation
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
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.
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
andKNContactBookOrdering
are now static structs and no longer require instantiation.
KNContact
Attributes
KNContact.details
is deprecated in favour ofKNContact.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
andcount
attributes introduced.
Methods
The following changes have been made:
-
KNContactBook.getContact(by:)
andKNContactBook.getContacts(by:)
introduced and therefore:KNContactBook.updatedValues(for:)
is deprecatedKNContactBook.get(forKey:)
is deprecatedKNContactBook.getOptional(forKey:)
is deprecated
-
As a result of the introduction of the
contacts
attribute, theKNContact.toArray()
andKNContact.toArray(orderedBy:)
are deprecated. Access the attribute directly and usesorted(by:)
to achieve the same result. -
As a result of the introduction of the
identifiers
attribute, theKNContact.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 useKNContactsSchedule.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.
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.