diff --git a/Dwifft.xcodeproj/project.pbxproj b/Dwifft.xcodeproj/project.pbxproj index 6542a34..b6e66a8 100644 --- a/Dwifft.xcodeproj/project.pbxproj +++ b/Dwifft.xcodeproj/project.pbxproj @@ -359,7 +359,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = jflinter; TargetAttributes = { 041EBB911B89679200E113B3 = { @@ -374,6 +374,8 @@ CreatedOnToolsVersion = 9.0; LastSwiftMigration = 0900; }; + 38E5B5D21F7BDB5400F33285 = { + }; 94783CAC1EFBA21900841579 = { CreatedOnToolsVersion = 9.0; LastSwiftMigration = 0910; @@ -382,10 +384,11 @@ }; buildConfigurationList = 041EBB8C1B89679200E113B3 /* Build configuration list for PBXProject "Dwifft" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 041EBB881B89679200E113B3; productRefGroup = 041EBB931B89679200E113B3 /* Products */; @@ -528,6 +531,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -536,14 +540,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -570,7 +577,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -586,6 +593,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -594,14 +602,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -621,7 +632,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_VERSION = 3.0.1; @@ -635,7 +646,9 @@ 041EBBA91B89679200E113B3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -653,7 +666,9 @@ 041EBBAA1B89679200E113B3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -672,6 +687,7 @@ 041EBBAC1B89679200E113B3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/iOS", @@ -691,6 +707,7 @@ 041EBBAD1B89679200E113B3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/iOS", @@ -713,7 +730,7 @@ CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "Apple Development"; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -732,7 +749,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.Dwifft-macOS"; PRODUCT_NAME = Dwifft; - SDKROOT = macosx10.13; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -749,7 +766,7 @@ CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_IDENTITY = "Apple Development"; COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -767,7 +784,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.Dwifft-macOS"; PRODUCT_NAME = Dwifft; - SDKROOT = macosx10.13; + SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.0; @@ -777,6 +794,7 @@ 38E5B5E01F7BDB5400F33285 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", @@ -789,7 +807,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.13; + SDKROOT = macosx; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; @@ -798,6 +816,7 @@ 38E5B5E11F7BDB5400F33285 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", @@ -806,7 +825,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.13; + SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; @@ -843,7 +862,7 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; }; name = Debug; }; @@ -876,7 +895,7 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; }; name = Release; }; diff --git a/Dwifft.xcodeproj/xcshareddata/xcschemes/Dwifft-macOS.xcscheme b/Dwifft.xcodeproj/xcshareddata/xcschemes/Dwifft-macOS.xcscheme index f1717bf..f3b5c11 100644 --- a/Dwifft.xcodeproj/xcshareddata/xcschemes/Dwifft-macOS.xcscheme +++ b/Dwifft.xcodeproj/xcshareddata/xcschemes/Dwifft-macOS.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - @@ -55,23 +54,11 @@ - - - - - - - - { let oldSectionedValues = sectionedValues let newSectionedValues = newValue let diff = Dwifft.diff(lhs: oldSectionedValues, rhs: newSectionedValues) - if (diff.count > 0) { - self.processChanges(newState: newSectionedValues, diff: diff) - } + self.processChanges(newState: newSectionedValues, diff: diff) } } diff --git a/Dwifft/Dwifft+AppKit.swift b/Dwifft/Dwifft+AppKit.swift index a3831a1..5e446b6 100644 --- a/Dwifft/Dwifft+AppKit.swift +++ b/Dwifft/Dwifft+AppKit.swift @@ -50,17 +50,32 @@ public final class TableViewDiffCalculator: AbstractDiffCalcul } override internal func processChanges(newState: SectionedValues, diff: [SectionedDiffStep]) { - guard let tableView = self.tableView else { return } - tableView.beginUpdates() self._sectionedValues = newState - for result in diff { - switch result { - case let .delete(_, row, _): tableView.removeRows(at: [row], withAnimation: self.deletionAnimation) - case let .insert(_, row, _): tableView.insertRows(at: [row], withAnimation: self.insertionAnimation) - default: fatalError("NSTableViews do not have sections") + guard let tableView = self.tableView else { return } + var updateAction = { + tableView.beginUpdates() + for result in diff { + switch result { + case let .delete(_, row, _): tableView.removeRows(at: [row], withAnimation: self.deletionAnimation) + case let .insert(_, row, _): tableView.insertRows(at: [row], withAnimation: self.insertionAnimation) + default: fatalError("NSTableViews do not have sections") + } + } + tableView.endUpdates() + } + if diff.count == 0 { + //There might be rows that need to be reloaded but we don't want to display a .insert animation for them. + //Update the internal _sectionedValues so that when we access the rows property, we get the updated rows + updateAction = { tableView.reloadData() } + } + if Thread.current.isMainThread { + updateAction() + } else { + DispatchQueue.main.sync { + updateAction() } } - tableView.endUpdates() + } } @@ -69,6 +84,7 @@ public final class TableViewDiffCalculator: AbstractDiffCalcul /// use a `SingleSectionCollectionViewDiffCalculator`. Note that this approach is not highly recommended, and you should /// do so only if it *really* doesn't make sense to just power your whole view with a `CollectionViewDiffCalculator`. /// You'll be less likely to mess up the index math :P +@available(OSX 10.11, *) public final class SingleSectionCollectionViewDiffCalculator { /// The collection view to be managed @@ -109,6 +125,7 @@ public final class SingleSectionCollectionViewDiffCalculator { /// This class manages a `NSCollectionView`'s items and sections. It will make the necessary /// calls to the collection view to ensure that its UI is kept in sync with the contents /// of the `sectionedValues` property. +@available(OSX 10.11, *) public final class CollectionViewDiffCalculator : AbstractDiffCalculator { /// The collection view to be managed. @@ -154,6 +171,7 @@ public final class CollectionViewDiffCalculator #endif diff --git a/Dwifft/Dwifft+UIKit.swift b/Dwifft/Dwifft+UIKit.swift index 752c528..96c4beb 100644 --- a/Dwifft/Dwifft+UIKit.swift +++ b/Dwifft/Dwifft+UIKit.swift @@ -28,7 +28,7 @@ public final class TableViewDiffCalculator /// You can change insertion/deletion animations like this! Fade works well. /// So does Top/Bottom. Left/Right/Middle are a little weird, but hey, do your thing. - public var insertionAnimation = UITableViewRowAnimation.automatic, deletionAnimation = UITableViewRowAnimation.automatic + public var insertionAnimation = UITableView.RowAnimation.automatic, deletionAnimation = UITableView.RowAnimation.automatic override internal func processChanges(newState: SectionedValues, diff: [SectionedDiffStep]) { guard let tableView = self.tableView else { return } @@ -106,13 +106,13 @@ public final class SingleSectionTableViewDiffCalculator { /// You can change insertion/deletion animations like this! Fade works well. /// So does Top/Bottom. Left/Right/Middle are a little weird, but hey, do your thing. - public var insertionAnimation = UITableViewRowAnimation.automatic { + public var insertionAnimation = UITableView.RowAnimation.automatic { didSet { self.internalDiffCalculator.insertionAnimation = self.insertionAnimation } } - public var deletionAnimation = UITableViewRowAnimation.automatic { + public var deletionAnimation = UITableView.RowAnimation.automatic { didSet { self.internalDiffCalculator.deletionAnimation = self.deletionAnimation } diff --git a/Dwifft/Dwifft.swift b/Dwifft/Dwifft.swift index 188d037..78e8b48 100644 --- a/Dwifft/Dwifft.swift +++ b/Dwifft/Dwifft.swift @@ -36,10 +36,10 @@ public enum DiffStep : CustomDebugStringConvertible { /// The value to be inserted or deleted. public var value: Value { switch(self) { - case let .insert(j): - return j.1 - case let .delete(j): - return j.1 + case let .insert(_, k): + return k + case let .delete(_, k): + return k } } } @@ -309,13 +309,13 @@ public extension Array where Element: Equatable { /// Deprecated in favor of `Dwifft.diff`. @available(*, deprecated) - public func diff(_ other: [Element]) -> [DiffStep] { + func diff(_ other: [Element]) -> [DiffStep] { return Dwifft.diff(self, other) } /// Deprecated in favor of `Dwifft.apply`. @available(*, deprecated) - public func apply(_ diff: [DiffStep]) -> [Element] { + func apply(_ diff: [DiffStep]) -> [Element] { return Dwifft.apply(diff: diff, toArray: self) } diff --git a/Dwifft/Info.plist b/Dwifft/Info.plist deleted file mode 100644 index d3de8ee..0000000 --- a/Dwifft/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Dwifft/SectionedValues.swift b/Dwifft/SectionedValues.swift index d87eac0..0556d90 100644 --- a/Dwifft/SectionedValues.swift +++ b/Dwifft/SectionedValues.swift @@ -72,7 +72,7 @@ public extension SectionedValues where Section: Hashable { /// should be sorted before the second. Used to sort the sections in the returned `SectionedValues`. /// - sortValues: A function that compares two values, and returns true if the first /// should be sorted before the second. Used to sort the values in each section of the returned `SectionedValues`. - public init( + init( values: [Value], valueToSection: ((Value) -> Section), sortSections: ((Section, Section) -> Bool), diff --git a/DwifftExample/DwifftExample.xcodeproj/project.pbxproj b/DwifftExample/DwifftExample.xcodeproj/project.pbxproj index a1c0d9f..d1c6193 100644 --- a/DwifftExample/DwifftExample.xcodeproj/project.pbxproj +++ b/DwifftExample/DwifftExample.xcodeproj/project.pbxproj @@ -296,7 +296,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0910; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = jflinter; TargetAttributes = { 045501F21B898C3200F5614D = { @@ -311,7 +311,7 @@ }; buildConfigurationList = 045501EE1B898C3200F5614D /* Build configuration list for PBXProject "DwifftExample" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -473,6 +473,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -481,14 +482,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -514,7 +518,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -526,6 +530,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -534,14 +539,17 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -560,7 +568,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -577,7 +585,7 @@ IBSC_NOTICES = NO; IBSC_WARNINGS = NO; INFOPLIST_FILE = "DwifftExample-iOS/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -595,7 +603,7 @@ IBSC_NOTICES = NO; IBSC_WARNINGS = NO; INFOPLIST_FILE = "DwifftExample-iOS/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.jflinter.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Package.swift b/Package.swift index d0d14aa..7fde369 100644 --- a/Package.swift +++ b/Package.swift @@ -1,14 +1,39 @@ +// swift-tools-version:5.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + import PackageDescription let package = Package( name: "Dwifft", - dependencies : [], - exclude: [ - "Carthage", - "DwifftTests", - "DwifftExample", - "docs", - "Dwifft.xcworkspace", - "scripts", - ] +// exclude: [ +// "Carthage", +// "DwifftTests", +// "DwifftExample", +// "docs", +// "Dwifft.xcworkspace", +// "scripts", +// ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "Dwifft", + targets: ["Dwifft"] + ) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "Dwifft", + dependencies: [], + path: "Dwifft"), +// .testTarget( +// name: "DwifftTests", +// dependencies: ["Dwifft"], +// path: "DwifftTests"), + ] )