diff --git a/Configurations/Framework.xcconfig b/Configurations/Framework.xcconfig index 08c5c577..6a677d9c 100644 --- a/Configurations/Framework.xcconfig +++ b/Configurations/Framework.xcconfig @@ -18,6 +18,6 @@ LD_RUNPATH_SEARCH_PATHS[sdk=watchsimulator*] = $(inherited) @executable_path/F DEFINES_MODULE = YES FRAMEWORK_VERSION = A -INFOPLIST_FILE = Freddy/Info.plist +INFOPLIST_FILE = Sources/Info.plist PRODUCT_BUNDLE_IDENTIFIER = com.bignerdranch.$(TARGET_NAME) PRODUCT_NAME = Freddy diff --git a/Configurations/Tests.xcconfig b/Configurations/Tests.xcconfig index 99fafbb7..bfc965c6 100644 --- a/Configurations/Tests.xcconfig +++ b/Configurations/Tests.xcconfig @@ -6,6 +6,6 @@ LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) @executable_path/F LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*] = $(inherited) @executable_path/Frameworks @loader_path/Frameworks LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*] = $(inherited) @executable_path/Frameworks @loader_path/Frameworks -INFOPLIST_FILE = FreddyTests/Info.plist +INFOPLIST_FILE = Tests/Info.plist PRODUCT_BUNDLE_IDENTIFIER = com.bignerdranch.$(TARGET_NAME) PRODUCT_NAME = $(TARGET_NAME) diff --git a/Freddy.podspec b/Freddy.podspec index f2a80912..ac7c0fc8 100644 --- a/Freddy.podspec +++ b/Freddy.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Freddy" - s.version = "2.0.0b1" + s.version = "2.0.1" s.summary = "A JSON parsing library written in Swift" s.description = <<-DESC @@ -17,14 +17,14 @@ Pod::Spec.new do |s| s.authors = {"Matt Mathias" => "mattm@bignerdranch.com", "John Gallagher" => "jgallagher@bignerdranch.com", - "Zachary Waldowski" => "zachary@bignerdranch.com"} + "Zachary Waldowski" => "zachary@bignerdranch.com" } s.ios.deployment_target = "8.0" s.osx.deployment_target = "10.10" s.watchos.deployment_target = "2.0" - s.source = {:git => "https://github.com/bignerdranch/Freddy.git", :tag => "v#{s.version}"} - s.source_files = "Freddy/*.swift" + s.source = {:git => "https://github.com/bignerdranch/Freddy.git", :tag => "#{s.version}"} + s.source_files = "Sources/**/*.swift" s.requires_arc = true diff --git a/Freddy.xcodeproj/project.pbxproj b/Freddy.xcodeproj/project.pbxproj index cf18429e..d9121172 100644 --- a/Freddy.xcodeproj/project.pbxproj +++ b/Freddy.xcodeproj/project.pbxproj @@ -676,6 +676,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF801C23617500D77BF1 /* Debug.xcconfig */; buildSettings = { + ENABLE_TESTABILITY = YES; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; @@ -692,12 +694,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -706,10 +703,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -719,7 +712,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = iphoneos; }; name = Debug; @@ -728,7 +720,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = iphoneos; }; name = Release; @@ -737,12 +728,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; }; @@ -750,10 +736,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = macosx; }; name = Release; @@ -762,7 +744,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = macosx; }; name = Debug; @@ -771,7 +752,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = macosx; }; name = Release; @@ -780,12 +760,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = appletvos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = 3; }; name = Debug; @@ -794,10 +769,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; }; @@ -807,7 +778,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = appletvos; }; name = Debug; @@ -816,7 +786,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF831C23617500D77BF1 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; SDKROOT = appletvos; }; name = Release; @@ -825,12 +794,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = watchos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = 4; }; name = Debug; @@ -839,10 +803,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DB6ADF811C23617500D77BF1 /* Framework.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - INFOPLIST_FILE = Sources/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; SDKROOT = watchos; TARGETED_DEVICE_FAMILY = 4; }; diff --git a/README.md b/README.md index f458d91e..71a79282 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,18 @@ Then run `pod install`. ### Swift Package Manager -We've [not yet](https://github.com/bignerdranch/Freddy/issues/110) reorganized the project as a Swift module. [Pull requests](https://github.com/bignerdranch/Freddy/pulls) are welcome! +Add us to your `Package.swift`: + +``` +import PackageDescription + +let package = Package( + name: "My Nerdy App", + dependencies: [ + .Package(url: "https://github.com/bignerdranch/Freddy.git", majorVersion: 2), + ] +) +``` ## Setting Breakpoint Errors diff --git a/Sources/JSONEncodingDetector.swift b/Sources/JSONEncodingDetector.swift index fc209bf7..933bc0c2 100644 --- a/Sources/JSONEncodingDetector.swift +++ b/Sources/JSONEncodingDetector.swift @@ -55,7 +55,7 @@ public struct JSONEncodingDetector { //// xx xx xx xx UTF-8 //// //// - parameter header: The front Slice of data being read and evaluated. - //// - returns: The a tuple containing the detected Unicode encoding and the lenght of the byte order mark. + //// - returns: A tuple containing the detected Unicode encoding and the lenght of the byte order mark. static func detectEncoding(header: Slice>) -> ByteStreamPrefixInformation { guard let prefix = prefixFromHeader(header) else {