From 4edfdb2c6771477f1903652d36be5a34cf8bb636 Mon Sep 17 00:00:00 2001 From: Earl Gaspard Date: Fri, 5 Apr 2019 15:43:03 -0500 Subject: [PATCH 1/2] Migrate to Swift 5.0 --- .travis.yml | 2 +- ...tainerViewController+ManagedChildren.swift | 4 +-- .../General/FileManager+Extensions.swift | 8 ++--- .../UtiliKit/General/UIView+Extensions.swift | 8 ++--- .../Instantiation/MKMapView+Extensions.swift | 6 ++-- .../UICollectionView+Extensions.swift | 18 ++++++------ .../UIStoryboard+Extensions.swift | 10 +++---- .../UITableView+Extensions.swift | 12 ++++---- .../TimelessDate/Date+Extensions.swift | 12 ++++---- .../UtiliKit/TimelessDate/TimelessDate.swift | 4 +-- .../UtiliKit/Version/Bundle+Extensions.swift | 6 ++-- UtiliKit.xcodeproj/project.pbxproj | 29 +++++++++++++------ 12 files changed, 65 insertions(+), 54 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2b836fb..472c0f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ # * http://www.objc.io/issue-6/travis-ci.html # * https://github.com/supermarin/xcpretty#usage -osx_image: xcode10.1 +osx_image: xcode10.2 language: swift env: global: diff --git a/Sources/UtiliKit/Container/ContainerViewController+ManagedChildren.swift b/Sources/UtiliKit/Container/ContainerViewController+ManagedChildren.swift index 707f3a2..8014f31 100644 --- a/Sources/UtiliKit/Container/ContainerViewController+ManagedChildren.swift +++ b/Sources/UtiliKit/Container/ContainerViewController+ManagedChildren.swift @@ -12,7 +12,7 @@ public extension ContainerViewController { //MARK: Finding a ManagedChild func index(ofChild controller: UIViewController) -> Int? { - return managedChildren.index(where: { $0.viewController === controller }) + return managedChildren.firstIndex(where: { $0.viewController === controller }) } func indexOfChild(following viewController: UIViewController) -> Int? { @@ -31,7 +31,7 @@ public extension ContainerViewController { // MARK: Removing a ManagedChild func removeChild(_ child: ManagedChild) { - let removed = managedChildren.index { $0.identifier == child.identifier }.flatMap { managedChildren.remove(at: $0) } + let removed = managedChildren.firstIndex { $0.identifier == child.identifier }.flatMap { managedChildren.remove(at: $0) } #if swift(>=4.2) removed?.viewController.removeFromParent() #else diff --git a/Sources/UtiliKit/General/FileManager+Extensions.swift b/Sources/UtiliKit/General/FileManager+Extensions.swift index e87b746..17f0df4 100644 --- a/Sources/UtiliKit/General/FileManager+Extensions.swift +++ b/Sources/UtiliKit/General/FileManager+Extensions.swift @@ -9,7 +9,7 @@ import Foundation public extension FileManager { /// The URL for the documents directory. - public var documentsDirectory: URL { + var documentsDirectory: URL { guard let documentDirectory = urls(for: .documentDirectory, in: .userDomainMask).first else { fatalError("Could not locate Documents Directory.") } @@ -18,7 +18,7 @@ public extension FileManager { } /// The URL for the chaches directory. - public var cachesDirectory: URL { + var cachesDirectory: URL { guard let cachesDirectory = urls(for: .cachesDirectory, in: .userDomainMask).first else { fatalError("Could not locate Caches Directory.") } @@ -27,7 +27,7 @@ public extension FileManager { } /// The URL for the application support directory. - public var applicationSupportDirectory: URL { + var applicationSupportDirectory: URL { guard let applicationSupportDirectory = urls(for: .applicationSupportDirectory, in: .userDomainMask).first else { fatalError("Could not locate Application Support Directory.") } @@ -41,7 +41,7 @@ public extension FileManager { - Parameter groupIdentifier: The group identifier for the app group. - Returns: The URL for the shared container. */ - public func sharedContainerURL(forSecurityApplicationGroupIdentifier groupIdentifier: String) -> URL { + func sharedContainerURL(forSecurityApplicationGroupIdentifier groupIdentifier: String) -> URL { guard let sharedContainerURL = containerURL(forSecurityApplicationGroupIdentifier: groupIdentifier) else { fatalError("Could not locate Shared Container URL.") } diff --git a/Sources/UtiliKit/General/UIView+Extensions.swift b/Sources/UtiliKit/General/UIView+Extensions.swift index 7d71e25..3e7092d 100644 --- a/Sources/UtiliKit/General/UIView+Extensions.swift +++ b/Sources/UtiliKit/General/UIView+Extensions.swift @@ -17,7 +17,7 @@ public extension UIView { - Parameter isUsingSafeArea: A Bool value used to determine the use of safeAreaLayoutGuides or superview anchors */ @available(iOS 11, *) - public func addSubview(_ subview: UIView, constrainedToSuperview: Bool, usingSafeArea isUsingSafeArea: Bool) { + func addSubview(_ subview: UIView, constrainedToSuperview: Bool, usingSafeArea isUsingSafeArea: Bool) { guard constrainedToSuperview else { addSubview(subview) return @@ -35,7 +35,7 @@ public extension UIView { - Parameter subview: The subview to add. - Parameter constrainedToSuperview: Whether or not you want the edges to be automatically constrained to the superview. If 'true', then 'translatesAutoresizingMaskIntoConstraints' will automatically be set to false for the given subview. */ - public func addSubview(_ subview: UIView, constrainedToSuperview: Bool) { + func addSubview(_ subview: UIView, constrainedToSuperview: Bool) { guard constrainedToSuperview else { addSubview(subview) return @@ -54,7 +54,7 @@ public extension UIView { - Parameter isUsingSafeArea: A Bool value used to determine the use of safeAreaLayoutGuides or superview anchors */ @available(iOS 11, *) - public func constrainEdgesToSuperview(with insets: UIEdgeInsets = .zero, usingSafeArea isUsingSafeArea: Bool) { + func constrainEdgesToSuperview(with insets: UIEdgeInsets = .zero, usingSafeArea isUsingSafeArea: Bool) { guard let superview = superview else { return } if isUsingSafeArea { @@ -72,7 +72,7 @@ public extension UIView { - Parameter insets: Defaults to UIEdgeInsets.zero, this parameter is used for the constant value of the constraints */ - public func constrainEdgesToSuperview(with insets: UIEdgeInsets = .zero) { + func constrainEdgesToSuperview(with insets: UIEdgeInsets = .zero) { guard let superview = superview else { return } superview.addConstraints([leadingAnchor.constraint(equalTo: superview.leadingAnchor, constant: insets.left), diff --git a/Sources/UtiliKit/Instantiation/MKMapView+Extensions.swift b/Sources/UtiliKit/Instantiation/MKMapView+Extensions.swift index 694c244..50c74dd 100644 --- a/Sources/UtiliKit/Instantiation/MKMapView+Extensions.swift +++ b/Sources/UtiliKit/Instantiation/MKMapView+Extensions.swift @@ -16,7 +16,7 @@ public extension MKMapView { - Parameter type: The type of the view being registered */ @available(iOS 11.0, *) - public func register(_ type: T.Type) { + func register(_ type: T.Type) { register(type, forAnnotationViewWithReuseIdentifier: T.reuseIdentifier) } @@ -28,7 +28,7 @@ public extension MKMapView { - Returns: An annotation view of type T. */ @available(iOS 11.0, *) - public func dequeueReusableAnnotationView(for annotation: MKAnnotation) -> T { + func dequeueReusableAnnotationView(for annotation: MKAnnotation) -> T { guard let annotationView = dequeueReusableAnnotationView(withIdentifier: T.reuseIdentifier, for: annotation) as? T else { fatalError("Could not dequeue a reusable annotation of type \(T.self) with identifier \(T.reuseIdentifier) for use in \(self)") } @@ -42,7 +42,7 @@ public extension MKMapView { - Parameter type: The type of the cell being registered. This should match the reuse identifier on the nib. - Returns: Either a reusable annotation view of type T or a new instance of it. */ - public func dequeueReusableAnnotationView() -> T { + func dequeueReusableAnnotationView() -> T { let annotationView: MKAnnotationView? = dequeueReusableAnnotationView(withIdentifier: T.reuseIdentifier) if let annotationView = annotationView { diff --git a/Sources/UtiliKit/Instantiation/UICollectionView+Extensions.swift b/Sources/UtiliKit/Instantiation/UICollectionView+Extensions.swift index 92f1d2a..a938f92 100644 --- a/Sources/UtiliKit/Instantiation/UICollectionView+Extensions.swift +++ b/Sources/UtiliKit/Instantiation/UICollectionView+Extensions.swift @@ -10,7 +10,7 @@ import UIKit public extension UICollectionView { /// Enum defining UICollectionElementKind - public enum SupplementaryElementKind { + enum SupplementaryElementKind { case sectionHeader case sectionFooter @@ -62,7 +62,7 @@ public extension UICollectionView { - Parameter type: The type of the cell being registered. */ - public func register(_ type: T.Type) { + func register(_ type: T.Type) { register(type, forCellWithReuseIdentifier: T.reuseIdentifier) } @@ -71,7 +71,7 @@ public extension UICollectionView { - Parameter type: The class of the nib being registered. This should match its reuse identifier. */ - public func registerNib(for type: T.Type) { + func registerNib(for type: T.Type) { register(UINib(nibName: T.nibName, bundle: Bundle(for: type)), forCellWithReuseIdentifier: T.reuseIdentifier) } @@ -80,7 +80,7 @@ public extension UICollectionView { - Parameter type: The type of the view being registered. */ - public func registerHeaderFooter(_ type: T.Type) { + func registerHeaderFooter(_ type: T.Type) { register(type, forSupplementaryViewOfKind: .sectionHeader) register(type, forSupplementaryViewOfKind: .sectionFooter) } @@ -91,7 +91,7 @@ public extension UICollectionView { - Parameter type: The type of the view being registered. - Parameter kind: The kind of supplementary view to make. */ - public func register(_ type: T.Type, forSupplementaryViewOfKind kind: SupplementaryElementKind) { + func register(_ type: T.Type, forSupplementaryViewOfKind kind: SupplementaryElementKind) { register(type, forSupplementaryViewOfKind: kind.type, withReuseIdentifier: T.reuseIdentifier) } @@ -100,7 +100,7 @@ public extension UICollectionView { - Parameter type: The type of the view being registered. */ - public func registerNib(forHeaderFooterView type: T.Type) { + func registerNib(forHeaderFooterView type: T.Type) { registerNib(forHeaderFooterView: type, forSupplementaryViewOfKind: .sectionHeader) registerNib(forHeaderFooterView: type, forSupplementaryViewOfKind: .sectionFooter) } @@ -111,7 +111,7 @@ public extension UICollectionView { - Parameter type: The type of the view being registered. - Parameter kind: The kind of supplementary view to make. */ - public func registerNib(forHeaderFooterView type: T.Type, forSupplementaryViewOfKind kind: SupplementaryElementKind) { + func registerNib(forHeaderFooterView type: T.Type, forSupplementaryViewOfKind kind: SupplementaryElementKind) { register(UINib(nibName: T.nibName, bundle: Bundle(for: type)), forSupplementaryViewOfKind: kind.type, withReuseIdentifier: T.reuseIdentifier) } @@ -122,7 +122,7 @@ public extension UICollectionView { - Parameter indexPath: The index path of the cell. - Returns: A collection view cell of type T. */ - public func dequeueReusableCell(for indexPath: IndexPath) -> T { + func dequeueReusableCell(for indexPath: IndexPath) -> T { guard let reusableCell = dequeueReusableCell(withReuseIdentifier: T.reuseIdentifier, for: indexPath) as? T else { fatalError("Could not dequeue a reusable cell of type \(T.self) with identifier \(T.reuseIdentifier) for use in \(self)") } @@ -137,7 +137,7 @@ public extension UICollectionView { - Parameter indexPath: The index path of the cell. - Returns: A collection view cell of type T. */ - public func dequeueReusableSupplementaryView(of kind: SupplementaryElementKind, for indexPath: IndexPath) -> T { + func dequeueReusableSupplementaryView(of kind: SupplementaryElementKind, for indexPath: IndexPath) -> T { guard let reusableView = dequeueReusableSupplementaryView(ofKind: kind.type, withReuseIdentifier: T.reuseIdentifier, for: indexPath) as? T else { fatalError("Could not dequeue a reusable supplementary view of type \(T.self) with identifier \(T.reuseIdentifier) for use in \(self)") } diff --git a/Sources/UtiliKit/Instantiation/UIStoryboard+Extensions.swift b/Sources/UtiliKit/Instantiation/UIStoryboard+Extensions.swift index 9fa5053..1994080 100644 --- a/Sources/UtiliKit/Instantiation/UIStoryboard+Extensions.swift +++ b/Sources/UtiliKit/Instantiation/UIStoryboard+Extensions.swift @@ -10,7 +10,7 @@ import UIKit public extension UIStoryboard { /// A small struct used to represent the name and bundle of a storyboad object. - public struct Identifier { + struct Identifier { public let name: String public let bundle: Bundle @@ -40,7 +40,7 @@ public extension UIStoryboard { - Returns: A view controller of type T. */ - public func instantiateInitialViewController() -> T { + func instantiateInitialViewController() -> T { guard let vc = instantiateInitialViewController() as? T else { fatalError("Unable to instantiate the initial view controller as \(T.self) from storyboard \(self)") } @@ -54,7 +54,7 @@ public extension UIStoryboard { - Parameter element: An element of the appropriate type, used to configure the view controller. - Returns: A view controller of type T. */ - public func instantiateInitialViewController(configuredWith element: T.ConfiguringType) -> T { + func instantiateInitialViewController(configuredWith element: T.ConfiguringType) -> T { let vc: T = instantiateInitialViewController() vc.configure(with: element) @@ -66,7 +66,7 @@ public extension UIStoryboard { - Returns: A view controller of type T. */ - public func instantiateViewController() -> T { + func instantiateViewController() -> T { guard let vc = instantiateViewController(withIdentifier: T.storyboardIdentifier) as? T else { fatalError("Unable to instantiate a view controller with identifier \(T.storyboardIdentifier) from storyboard \(self)") } @@ -80,7 +80,7 @@ public extension UIStoryboard { - Parameter element: An element of the appropriate type, used to configure the view controller. - Returns: A view controller of type T. */ - public func instantiateViewController(configuredWith element: T.ConfiguringType) -> T { + func instantiateViewController(configuredWith element: T.ConfiguringType) -> T { let vc: T = instantiateViewController() vc.configure(with: element) diff --git a/Sources/UtiliKit/Instantiation/UITableView+Extensions.swift b/Sources/UtiliKit/Instantiation/UITableView+Extensions.swift index eb77109..ef386cf 100644 --- a/Sources/UtiliKit/Instantiation/UITableView+Extensions.swift +++ b/Sources/UtiliKit/Instantiation/UITableView+Extensions.swift @@ -15,7 +15,7 @@ public extension UITableView { - Parameter type: The type of the cell being registered. */ - public func register(type: T.Type) { + func register(type: T.Type) { register(type, forCellReuseIdentifier: T.reuseIdentifier) } @@ -24,7 +24,7 @@ public extension UITableView { - Parameter type: The class of the nib being registered. This should match its reuse identifier. */ - public func registerNib(for type: T.Type) { + func registerNib(for type: T.Type) { register(UINib(nibName: T.nibName, bundle: Bundle(for: type)), forCellReuseIdentifier: T.reuseIdentifier) } @@ -33,7 +33,7 @@ public extension UITableView { - Parameter type: The type of the class being registered. */ - public func registerHeaderFooter(type: T.Type) { + func registerHeaderFooter(type: T.Type) { register(type, forHeaderFooterViewReuseIdentifier: T.reuseIdentifier) } @@ -42,7 +42,7 @@ public extension UITableView { - Parameter type: The class of the nib being registered. This should match its reuse identifier. */ - public func registerNib(forHeaderFooterView type: T.Type) { + func registerNib(forHeaderFooterView type: T.Type) { register(UINib(nibName: T.nibName, bundle: Bundle(for: type)), forHeaderFooterViewReuseIdentifier: T.reuseIdentifier) } @@ -53,7 +53,7 @@ public extension UITableView { - Parameter indexPath: The index path of the cell. - Returns: A table view cell of type T. */ - public func dequeueReusableCell(for indexPath: IndexPath) -> T { + func dequeueReusableCell(for indexPath: IndexPath) -> T { guard let reusableCell = dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as? T else { fatalError("Could not dequeue a reusable cell of type \(T.self) with identifier \(T.reuseIdentifier) for use in \(self)") } @@ -66,7 +66,7 @@ public extension UITableView { - Returns: A headerFooter view of type T. */ - public func dequeueReusableHeaderFooterView() -> T { + func dequeueReusableHeaderFooterView() -> T { guard let reusableView = dequeueReusableHeaderFooterView(withIdentifier: T.reuseIdentifier) as? T else { fatalError("Could not dequeue a reusable view of type \(T.self) with identifier \(T.reuseIdentifier) for use in \(self)") } diff --git a/Sources/UtiliKit/TimelessDate/Date+Extensions.swift b/Sources/UtiliKit/TimelessDate/Date+Extensions.swift index 374c483..365c0fb 100644 --- a/Sources/UtiliKit/TimelessDate/Date+Extensions.swift +++ b/Sources/UtiliKit/TimelessDate/Date+Extensions.swift @@ -10,13 +10,13 @@ import Foundation public extension Date { /// Current date and time. - public static var now: Date { return Date() } + static var now: Date { return Date() } /// Date and time of Midnight January 1, 2001. - public static var reference2001: Date { return Date(timeIntervalSinceReferenceDate: 0) } + static var reference2001: Date { return Date(timeIntervalSinceReferenceDate: 0) } /// Date and time of Midnight January 1, 1970. - public static var reference1970: Date { return Date(timeIntervalSince1970: 0) } + static var reference1970: Date { return Date(timeIntervalSince1970: 0) } /** Creates a Date initialized relative to another given date by a given number of days, hours, minutes, and seconds. @@ -29,7 +29,7 @@ public extension Date { - Parameter seconds: The number of seconds to be added. - Parameter date: The reference Date */ - public init?(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0, since date: Date) { + init?(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0, since date: Date) { var components = DateComponents() components.day = days components.hour = hours @@ -49,7 +49,7 @@ public extension Date { - Parameter seconds: The number of seconds to be added. - Returns: An optional Date with the given values added to it. */ - public func adding(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0) -> Date? { + func adding(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0) -> Date? { return Date(days: days, hours: hours, minutes: minutes, seconds: seconds, since: self) } @@ -62,7 +62,7 @@ public extension Date { - Parameter seconds: The number of seconds to be subtracted. - Returns: An optional Date with the given values subtracted to it. */ - public func subtracting(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0) -> Date? { + func subtracting(days: Int = 0, hours: Int = 0, minutes: Int = 0, seconds: Int = 0) -> Date? { return Date(days: -days, hours: -hours, minutes: -minutes, seconds: -seconds, since: self) } } diff --git a/Sources/UtiliKit/TimelessDate/TimelessDate.swift b/Sources/UtiliKit/TimelessDate/TimelessDate.swift index 8b75a7f..e1f65e6 100644 --- a/Sources/UtiliKit/TimelessDate/TimelessDate.swift +++ b/Sources/UtiliKit/TimelessDate/TimelessDate.swift @@ -152,8 +152,8 @@ public struct TimelessDate: Comparable, Equatable, Hashable { // MARK: Hashable - public var hashValue: Int { - return date.hashValue + public func hash(into hasher: inout Hasher) { + hasher.combine(date.hashValue) } // MARK: Math diff --git a/Sources/UtiliKit/Version/Bundle+Extensions.swift b/Sources/UtiliKit/Version/Bundle+Extensions.swift index 41366d8..ee99bef 100644 --- a/Sources/UtiliKit/Version/Bundle+Extensions.swift +++ b/Sources/UtiliKit/Version/Bundle+Extensions.swift @@ -11,7 +11,7 @@ import UIKit public extension Bundle { /// Error thrown when version lookup fails - public struct VersionLookupError: Error { + struct VersionLookupError: Error { public let versionKey: String public var localizedDescription: String { let localizedVersionString = NSLocalizedString("Could not find Info.plist key: '%@' of type \(String.self)", comment: "Version Lookup Error - %@ will be replaced with a the key used") @@ -27,7 +27,7 @@ public extension Bundle { - Parameter configuration: Defaults to the standard config. This struct defines the keys used for fetching the version number - Parameter isShortVersion: A Bool value used to switch between the short and long version */ - public func versionString(for configuration: VersionConfig = VersionConfig(), isShortVersion: Bool = false) throws -> String { + func versionString(for configuration: VersionConfig = VersionConfig(), isShortVersion: Bool = false) throws -> String { let key = isShortVersion ? configuration.shortVersionKey : configuration.primaryVersionKey guard let versionString = object(forInfoDictionaryKey: key) as? String else { throw VersionLookupError(versionKey: key) } @@ -43,7 +43,7 @@ public extension Bundle { - Parameter isShortVersion: A Bool value used to switch between the short and long version - Parameter showDebugSymbol: A Bool value used to determine the use of the bug symbol for debug builds */ - public func verboseVersionString(for configuration: VersionConfig = VersionConfig(), isShortVersion: Bool = false, showDebugSymbol: Bool = false) throws -> String { + func verboseVersionString(for configuration: VersionConfig = VersionConfig(), isShortVersion: Bool = false, showDebugSymbol: Bool = false) throws -> String { let version = try versionString(for: configuration, isShortVersion: isShortVersion) let environment = configuration.environmentName ?? "" diff --git a/UtiliKit.xcodeproj/project.pbxproj b/UtiliKit.xcodeproj/project.pbxproj index 0c028e6..26f4324 100644 --- a/UtiliKit.xcodeproj/project.pbxproj +++ b/UtiliKit.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 0ED9476420FD473700B642AB /* ContainerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ED9476220FD461300B642AB /* ContainerTests.swift */; }; 1D419DBD21235EE100B62D91 /* ManagedChild.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D419DBC21235EE100B62D91 /* ManagedChild.swift */; }; 1D419DBF21236CC300B62D91 /* UtiliKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8677313920601BB400C54343 /* UtiliKit.framework */; }; + 62F5256D2257F4F50052B8E7 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 62F5256C2257F4F50052B8E7 /* README.md */; }; + 62F5256F2257F4FE0052B8E7 /* CHANGELOG.md in Resources */ = {isa = PBXBuildFile; fileRef = 62F5256E2257F4FE0052B8E7 /* CHANGELOG.md */; }; 8677314220601BB400C54343 /* UtiliKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8677313920601BB400C54343 /* UtiliKit.framework */; }; 8677315720601D1A00C54343 /* UtiliKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 869826261FE87BFA0024B73D /* UtiliKitTests.swift */; }; 8677315820601D1A00C54343 /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 869826271FE87BFA0024B73D /* DateTests.swift */; }; @@ -81,6 +83,8 @@ 0EC8025B209CE9C90051F732 /* Configurable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configurable.swift; sourceTree = ""; }; 0ED9476220FD461300B642AB /* ContainerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainerTests.swift; sourceTree = ""; }; 1D419DBC21235EE100B62D91 /* ManagedChild.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManagedChild.swift; sourceTree = ""; }; + 62F5256C2257F4F50052B8E7 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 62F5256E2257F4FE0052B8E7 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 8677313920601BB400C54343 /* UtiliKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UtiliKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8677314120601BB400C54343 /* UtiliKit-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UtiliKit-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 8677315A20601DD800C54343 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -177,6 +181,8 @@ 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( + 62F5256C2257F4F50052B8E7 /* README.md */, + 62F5256E2257F4FE0052B8E7 /* CHANGELOG.md */, 8698CFCB2061A0FB0065AE20 /* Examples */, 8698CF9D20619EAD0065AE20 /* Sources */, 607FACE81AFB9204008FA782 /* Tests */, @@ -465,24 +471,25 @@ TargetAttributes = { 8677313820601BB400C54343 = { CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; 8677314020601BB400C54343 = { CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; 8698CFCF2061A19D0065AE20 = { CreatedOnToolsVersion = 9.2; DevelopmentTeam = 2UAV38D2MU; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "UtiliKit" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -505,6 +512,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 62F5256D2257F4F50052B8E7 /* README.md in Resources */, + 62F5256F2257F4FE0052B8E7 /* CHANGELOG.md in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -682,6 +691,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSION = 1.3.5; }; name = Debug; @@ -730,6 +740,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; VERSION = 1.3.5; }; @@ -761,7 +772,7 @@ PRODUCT_NAME = UtiliKit; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -792,7 +803,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "bottlerocketstudios.UtiliKit-iOS"; PRODUCT_NAME = UtiliKit; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -818,7 +829,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "bottlerocketstudios.UtiliKit-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -840,7 +851,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "bottlerocketstudios.UtiliKit-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -865,7 +876,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "bottlerocketstudios.UtiliKit-iOSExample"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -888,7 +899,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "bottlerocketstudios.UtiliKit-iOSExample"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; From af35028c97d63ca1f770f342f5cb583d4cbaa8ef Mon Sep 17 00:00:00 2001 From: Earl Gaspard Date: Fri, 5 Apr 2019 15:46:09 -0500 Subject: [PATCH 2/2] Add PR #53 changes to CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a778d3..050505e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ##### Enhancements -* None. +* Migrate to Swift 5.0. +[Earl Gaspard](https://github.com/earlgaspard) +[#53](https://github.com/BottleRocketStudios/iOS-UtiliKit/pull/53) ##### Bug Fixes