SwifterSwift v5.0.0 Release Notes

Release Date: 2019-03-31 // about 5 years ago
  • โž• Added

    • ๐Ÿ‘ Swift 5.0 Support
      • Updated the project to Xcode 10.2
      • Removed unnecessary public statements.
    • ๐Ÿง Linux Support
      • Support for Linux running Swift 5.0 using Swift Package Manager.
    • UIApplication:
      • Added inferredEnvironment to get current inferred app environment. by omaralbeik
      • Added displayName to get application name. by omaralbeik
      • Added buildNumber to get application build number. by omaralbeik
      • Added version to get application version number. by omaralbeik
    • Optional:
      • Added nonEmpty to get the collection only if it is not nill and not empty. by omaralbeik
    • FileManager:
      • Added createTemporaryDirectory() to create a directory for saving temporary files. #615 by guykogus
    • UILabel:
      • Added init(text:style) to create a UILabel with a text and font style. #607 by marcocapano
    • UIViewController
      • Added presentPopover(_:sourcePoint:size:delegate:animated:completion:) method to quickly present a UIViewController as a popover. #593 by marcocapano
    • Sequence:
      • Added duplicates() for getting the duplicated elements in a sequence. #605 by dylancfe15
    • Date:
    • โž• Added tomorrow computed property to get tomorrow's date avoiding calling adding(_:value:) function. (Completes PR #578) #587 by AlexeiGitH
      • Added random(in:) and random(in:using:) to generate random dates using the built-in random functions added to Swift 4.2. #576 by guykogus
    • Dictionary:
      • Added Dictionary[path:] subscript for deep fetching/setting nested values. #574 by @calebkleveter
    • UIColor:
    • DispatchQueue:
      • Added isMainQueue to check if current queue is main queue. #585 by jianstm
      • Added isCurrent(_:) to check if current queue is specified queue. #585 by jianstm
    • BidirectionalCollection:
      • Added subscript[offset:] to get element with negative offset. #582 by jianstm
    • BinaryFloatingPointExtensions:
      • Added rounded(numberOfDecimalPlaces:rule:) to get the rounded floating number with the specified number of decimal places. #583 by jianstm
    • UIActivity:
      • Added ActivityType constants for iCloud Drive, WhatsApp, LinkedIn and XING. #580 by staffler-xyz
    • MKMapView
      • Added 'register(annotationViewWithClass:),dequeueReusableAnnotationView(withClass:)anddequeueReusableAnnotationView(withClass:annotation)` methods. #629 by staffler-xyz

    ๐Ÿ”„ Changed

    • Character:
    • String:
      • Added more cases to isEmoji. by omaralbeik
      • Made camelize, latinize, reverse, slice, trim, truncate, urlDecode, urlEncode, padStart, and padEnd return a discardableResult self. by omaralbeik
    • Examples:
      • Replaced Examples.md with Examples.playground to let users try some examples out of extensions. #596 by maxxx777
    • StringProtocol:
      • Removing Index constraint on commonSuffix extension and improving performance and tests. #606 by LucianoPAlmeida.
    • RangeReplaceableCollection:
      • Array extensions keep(while: ), take(while: ) and skip(while:) are now RangeReplaceableCollection extensions. #634 by LucianoPAlmeida.
    • Date:
      • Fixed yesterday computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(-86400) #641 by AlexeiGitH.

    ๐Ÿ›  Fixed

    • UIImageView:
      • Fixed download function to use unowned self. by omaralbeik
    • Installation:
      • Updated podspec to make the group paths in Pods project of SwifterSwift correct with Cocoapods installation. #590 by dklinzh
    • UIImage:
    • NSAttributedString:
    • Date:
      • Fixed yesterday computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(-86400) #641 by AlexeiGitH.
      • Fixed tomorrow computed property to be calculated using Calendar.date(byAdding:to:) instead of date.addingTimeInterval(86400) #642 by AlexeiGitH.

    โœ‚ Removed

    • SwifterSwift:
      • Breaking Change Removed SwifterSwift by omaralbeik.
    • Collection:
      • Removed firstIndex(where: ), firstIndex(of:), lastIndex(where: ), lastIndex(of:) which are no longer needed. #637 by marcocapano
    • Date:
      • Removed random(from:upTo:) in favor of random(in:) and random(in:using:). #576 by guykogus
      • Removed timeZone should never have been added because Dates are timezone-agnostic. This came to my attention during unit testing over daylight savings changes. #594 by guykogus

    CI

    • โšก๏ธ Updated Travis to use the new xcode10.2 osx_image.
    • โž• Added Fastlane to automate the releasing process for maintainers.