From 50cd8d71866faf07f61ebc486da92a9824a04493 Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Mon, 25 Nov 2019 16:00:40 -0800 Subject: [PATCH 1/6] add tvOS support --- Crossroad.xcodeproj/project.pbxproj | 262 +++++++++++++++++- .../xcschemes/Crossroad-tvOS.xcscheme | 77 +++++ .../xcshareddata/xcschemes/Crossroad.xcscheme | 26 +- Sources/Crossroad/Crossroad.h | 2 +- Tests/CrossroadTests/OpenURLOptionTests.swift | 6 +- Tests/CrossroadTests/ParsableTests.swift | 1 - Tests/CrossroadTests/PatternURLTests.swift | 1 - Tests/CrossroadTests/RouterTests.swift | 3 +- Tests/CrossroadTests/URLParserTests.swift | 3 +- 9 files changed, 351 insertions(+), 30 deletions(-) create mode 100644 Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad-tvOS.xcscheme diff --git a/Crossroad.xcodeproj/project.pbxproj b/Crossroad.xcodeproj/project.pbxproj index 2921c05..b5940d9 100644 --- a/Crossroad.xcodeproj/project.pbxproj +++ b/Crossroad.xcodeproj/project.pbxproj @@ -22,6 +22,23 @@ 54AB581A20B0B29700E2FD28 /* OpenURLOptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54AB581920B0B29700E2FD28 /* OpenURLOptionTests.swift */; }; 54D5D48722F8013F00317EBF /* Parsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D5D48622F8013E00317EBF /* Parsable.swift */; }; 54D5D48922F8015500317EBF /* ParsableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D5D48822F8015500317EBF /* ParsableTests.swift */; }; + FF4DE6FE238C9B7600FAC931 /* URLParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 079956D622F0304200FC48CF /* URLParser.swift */; }; + FF4DE6FF238C9B7600FAC931 /* OpenURLOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54AB581720B0AED300E2FD28 /* OpenURLOption.swift */; }; + FF4DE700238C9B7600FAC931 /* PatternURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB020B0991800923325 /* PatternURL.swift */; }; + FF4DE701238C9B7600FAC931 /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB320B0991900923325 /* Context.swift */; }; + FF4DE702238C9B7600FAC931 /* Parsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D5D48622F8013E00317EBF /* Parsable.swift */; }; + FF4DE703238C9B7600FAC931 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB520B0991900923325 /* Router.swift */; }; + FF4DE704238C9B7600FAC931 /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB620B0991900923325 /* Route.swift */; }; + FF4DE707238C9B7600FAC931 /* Crossroad.h in Headers */ = {isa = PBXBuildFile; fileRef = 546DEAB220B0991900923325 /* Crossroad.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FF4DE70E238C9F3000FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF4DE70C238C9B7600FAC931 /* Crossroad.framework */; }; + FF4DE713238CA19200FAC931 /* OpenURLOptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54AB581920B0B29700E2FD28 /* OpenURLOptionTests.swift */; }; + FF4DE714238CA19200FAC931 /* RouterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAAD20B0990500923325 /* RouterTests.swift */; }; + FF4DE715238CA19200FAC931 /* PatternURLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB420B0991900923325 /* PatternURLTests.swift */; }; + FF4DE716238CA19200FAC931 /* ContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CBB57320B705A600C272A5 /* ContextTests.swift */; }; + FF4DE717238CA19200FAC931 /* URLParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0751010B22F8270200DFA53F /* URLParserTests.swift */; }; + FF4DE718238CA19200FAC931 /* ParsableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D5D48822F8015500317EBF /* ParsableTests.swift */; }; + FF4DE71A238CA19200FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 546DEA7A20AD77F800923325 /* Crossroad.framework */; }; + FF4DE71B238CA19200FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF4DE70C238C9B7600FAC931 /* Crossroad.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -32,6 +49,13 @@ remoteGlobalIDString = 546DEA7920AD77F800923325; remoteInfo = Crossroad; }; + FF4DE711238CA19200FAC931 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 546DEA7120AD77F800923325 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 546DEA7920AD77F800923325; + remoteInfo = Crossroad; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -53,6 +77,8 @@ 54AB581920B0B29700E2FD28 /* OpenURLOptionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenURLOptionTests.swift; sourceTree = ""; }; 54D5D48622F8013E00317EBF /* Parsable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Parsable.swift; sourceTree = ""; }; 54D5D48822F8015500317EBF /* ParsableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParsableTests.swift; sourceTree = ""; }; + FF4DE70C238C9B7600FAC931 /* Crossroad.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Crossroad.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FF4DE720238CA19200FAC931 /* CrossroadTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "CrossroadTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,6 +94,23 @@ buildActionMask = 2147483647; files = ( 546DEA8420AD77F800923325 /* Crossroad.framework in Frameworks */, + FF4DE70E238C9F3000FAC931 /* Crossroad.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF4DE705238C9B7600FAC931 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF4DE719238CA19200FAC931 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FF4DE71A238CA19200FAC931 /* Crossroad.framework in Frameworks */, + FF4DE71B238CA19200FAC931 /* Crossroad.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,6 +131,8 @@ children = ( 546DEA7A20AD77F800923325 /* Crossroad.framework */, 546DEA8320AD77F800923325 /* CrossroadTests.xctest */, + FF4DE70C238C9B7600FAC931 /* Crossroad.framework */, + FF4DE720238CA19200FAC931 /* CrossroadTests-tvOS.xctest */, ); name = Products; sourceTree = ""; @@ -135,6 +180,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FF4DE706238C9B7600FAC931 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + FF4DE707238C9B7600FAC931 /* Crossroad.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -174,6 +227,42 @@ productReference = 546DEA8320AD77F800923325 /* CrossroadTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + FF4DE6FC238C9B7600FAC931 /* Crossroad-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = FF4DE709238C9B7600FAC931 /* Build configuration list for PBXNativeTarget "Crossroad-tvOS" */; + buildPhases = ( + FF4DE6FD238C9B7600FAC931 /* Sources */, + FF4DE705238C9B7600FAC931 /* Frameworks */, + FF4DE706238C9B7600FAC931 /* Headers */, + FF4DE708238C9B7600FAC931 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Crossroad-tvOS"; + productName = Crossroad; + productReference = FF4DE70C238C9B7600FAC931 /* Crossroad.framework */; + productType = "com.apple.product-type.framework"; + }; + FF4DE70F238CA19200FAC931 /* CrossroadTests-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = FF4DE71D238CA19200FAC931 /* Build configuration list for PBXNativeTarget "CrossroadTests-tvOS" */; + buildPhases = ( + FF4DE712238CA19200FAC931 /* Sources */, + FF4DE719238CA19200FAC931 /* Frameworks */, + FF4DE71C238CA19200FAC931 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + FF4DE710238CA19200FAC931 /* PBXTargetDependency */, + ); + name = "CrossroadTests-tvOS"; + productName = CrossroadTests; + productReference = FF4DE720238CA19200FAC931 /* CrossroadTests-tvOS.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -209,6 +298,8 @@ targets = ( 546DEA7920AD77F800923325 /* Crossroad */, 546DEA8220AD77F800923325 /* CrossroadTests */, + FF4DE6FC238C9B7600FAC931 /* Crossroad-tvOS */, + FF4DE70F238CA19200FAC931 /* CrossroadTests-tvOS */, ); }; /* End PBXProject section */ @@ -228,6 +319,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FF4DE708238C9B7600FAC931 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF4DE71C238CA19200FAC931 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -258,6 +363,33 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + FF4DE6FD238C9B7600FAC931 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FF4DE6FE238C9B7600FAC931 /* URLParser.swift in Sources */, + FF4DE6FF238C9B7600FAC931 /* OpenURLOption.swift in Sources */, + FF4DE700238C9B7600FAC931 /* PatternURL.swift in Sources */, + FF4DE701238C9B7600FAC931 /* Context.swift in Sources */, + FF4DE702238C9B7600FAC931 /* Parsable.swift in Sources */, + FF4DE703238C9B7600FAC931 /* Router.swift in Sources */, + FF4DE704238C9B7600FAC931 /* Route.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF4DE712238CA19200FAC931 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FF4DE713238CA19200FAC931 /* OpenURLOptionTests.swift in Sources */, + FF4DE714238CA19200FAC931 /* RouterTests.swift in Sources */, + FF4DE715238CA19200FAC931 /* PatternURLTests.swift in Sources */, + FF4DE716238CA19200FAC931 /* ContextTests.swift in Sources */, + FF4DE717238CA19200FAC931 /* URLParserTests.swift in Sources */, + FF4DE718238CA19200FAC931 /* ParsableTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -266,6 +398,11 @@ target = 546DEA7920AD77F800923325 /* Crossroad */; targetProxy = 546DEA8520AD77F800923325 /* PBXContainerItemProxy */; }; + FF4DE710238CA19200FAC931 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 546DEA7920AD77F800923325 /* Crossroad */; + targetProxy = FF4DE711238CA19200FAC931 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -324,9 +461,9 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -380,9 +517,9 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; + TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -411,6 +548,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.giginet.Crossroad; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -440,6 +578,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.giginet.Crossroad; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -452,7 +591,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Tests/CrossroadTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -462,6 +600,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.giginet.CrossroadTests; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -473,7 +612,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Tests/CrossroadTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -483,11 +621,109 @@ PRODUCT_BUNDLE_IDENTIFIER = org.giginet.CrossroadTests; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; + FF4DE70A238C9B7600FAC931 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/Crossroad/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.giginet.Crossroad; + PRODUCT_NAME = Crossroad; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + FF4DE70B238C9B7600FAC931 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/Crossroad/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.giginet.Crossroad; + PRODUCT_NAME = Crossroad; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + FF4DE71E238CA19200FAC931 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = Tests/CrossroadTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.giginet.CrossroadTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + FF4DE71F238CA19200FAC931 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = Tests/CrossroadTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = org.giginet.CrossroadTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -518,6 +754,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + FF4DE709238C9B7600FAC931 /* Build configuration list for PBXNativeTarget "Crossroad-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF4DE70A238C9B7600FAC931 /* Debug */, + FF4DE70B238C9B7600FAC931 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FF4DE71D238CA19200FAC931 /* Build configuration list for PBXNativeTarget "CrossroadTests-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FF4DE71E238CA19200FAC931 /* Debug */, + FF4DE71F238CA19200FAC931 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 546DEA7120AD77F800923325 /* Project object */; diff --git a/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad-tvOS.xcscheme b/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad-tvOS.xcscheme new file mode 100644 index 0000000..a0cb103 --- /dev/null +++ b/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad-tvOS.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad.xcscheme b/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad.xcscheme index bc89c14..c667ddf 100644 --- a/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad.xcscheme +++ b/Crossroad.xcodeproj/xcshareddata/xcschemes/Crossroad.xcscheme @@ -26,8 +26,17 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> + + + + @@ -40,17 +49,6 @@ - - - - - - - - +#import //! Project version number for Crossroad. FOUNDATION_EXPORT double CrossroadVersionNumber; diff --git a/Tests/CrossroadTests/OpenURLOptionTests.swift b/Tests/CrossroadTests/OpenURLOptionTests.swift index a3a57f3..f432065 100644 --- a/Tests/CrossroadTests/OpenURLOptionTests.swift +++ b/Tests/CrossroadTests/OpenURLOptionTests.swift @@ -1,9 +1,7 @@ #if os(iOS) - -import Foundation -import XCTest import UIKit -import Crossroad +import XCTest +@testable import Crossroad final class OpenURLOptionTests: XCTestCase { func testInit() { diff --git a/Tests/CrossroadTests/ParsableTests.swift b/Tests/CrossroadTests/ParsableTests.swift index ca07e0b..71fbe9a 100644 --- a/Tests/CrossroadTests/ParsableTests.swift +++ b/Tests/CrossroadTests/ParsableTests.swift @@ -1,4 +1,3 @@ -import Foundation import XCTest @testable import Crossroad diff --git a/Tests/CrossroadTests/PatternURLTests.swift b/Tests/CrossroadTests/PatternURLTests.swift index 1229762..b06b041 100644 --- a/Tests/CrossroadTests/PatternURLTests.swift +++ b/Tests/CrossroadTests/PatternURLTests.swift @@ -1,4 +1,3 @@ -import Foundation import XCTest @testable import Crossroad diff --git a/Tests/CrossroadTests/RouterTests.swift b/Tests/CrossroadTests/RouterTests.swift index 4ebd09b..d91bc65 100644 --- a/Tests/CrossroadTests/RouterTests.swift +++ b/Tests/CrossroadTests/RouterTests.swift @@ -1,6 +1,5 @@ -import Foundation import XCTest -import Crossroad +@testable import Crossroad final class RouterTest: XCTestCase { let scheme = "foobar" diff --git a/Tests/CrossroadTests/URLParserTests.swift b/Tests/CrossroadTests/URLParserTests.swift index 99bb110..14a6732 100644 --- a/Tests/CrossroadTests/URLParserTests.swift +++ b/Tests/CrossroadTests/URLParserTests.swift @@ -1,6 +1,5 @@ -import Foundation -import Crossroad import XCTest +@testable import Crossroad final class URLParserTests: XCTestCase { func testURLParser() { From d506824409869308c59d2eaa6fc8ce5301ae08a8 Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Mon, 25 Nov 2019 16:07:18 -0800 Subject: [PATCH 2/6] add tvOS to podspec and swift package --- Crossroad.podspec | 2 +- Package.swift | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Crossroad.podspec b/Crossroad.podspec index e061f37..9a1a11c 100644 --- a/Crossroad.podspec +++ b/Crossroad.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "giginet" => "giginet.net@gmail.com" } s.social_media_url = "http://twitter.com/giginet" - s.platform = :ios, "9.0" + s.platforms = { :ios => "9.0", :tvos => "9.0" } s.source = { :git => "https://github.com/giginet/Crossroad.git", :tag => "#{s.version}" } s.source_files = "Sources/Crossroad/**/*.{h,swift}" s.requires_arc = true diff --git a/Package.swift b/Package.swift index 54d42ad..1e91981 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "Crossroad", - platforms: [.iOS(.v9)], + platforms: [.iOS(.v9),.tvOS(.v9)], products: [ .library( name: "Crossroad", @@ -18,5 +18,11 @@ let package = Package( .testTarget( name: "CrossroadTests", dependencies: ["Crossroad"]), + .target( + name: "Crossroad-tvOS", + dependencies: []), + .testTarget( + name: "CrossroadTests-tvOS", + dependencies: ["Crossroad-tvOS"]), ] ) From 1d75f1f0f375ec4b7663f9c7ef4b4935c43722df Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Mon, 25 Nov 2019 16:11:32 -0800 Subject: [PATCH 3/6] add tvOS to top shield --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b31d7a0..3226f44 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Language](https://img.shields.io/static/v1.svg?label=language&message=Swift%205&color=FA7343&logo=swift&style=flat-square)](https://swift.org) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square)](https://github.com/Carthage/Carthage) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Crossroad.svg?style=flat-square)](http://cocoapods.org/pods/Crossroad) -[![Platform](https://img.shields.io/static/v1.svg?label=platform&message=iOS&color=grey&logo=apple&style=flat-square)](http://cocoapods.org/pods/Crossroad) +[![Platform](https://img.shields.io/static/v1.svg?label=platform&message=iOS|tvOS&color=grey&logo=apple&style=flat-square)](http://cocoapods.org/pods/Crossroad) [![License](https://img.shields.io/cocoapods/l/Crossroad.svg?style=flat-square)](https://github.com/giginet/Crossroad/blob/master/LICENSE) Route URL schemes easily. From f4bfb757ea7b68527a083210706d34bb7c6076fb Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Tue, 26 Nov 2019 11:43:51 -0800 Subject: [PATCH 4/6] add tvOS tests to the build matrix so tests run --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d90293b..952c46a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ before_script: - swiftlint --strict matrix: include: - - env: NAME=Xcode DESTINATION="platform=iOS Simulator,name=iPhone 8" + - env: NAME=Xcode DESTINATION="platform=iOS Simulator,name=iPhone 8" SCHEME="Crossroad" + - env: NAME=Xcode DESTINATION="platform=tvOS Simulator,name=Apple TV 4K" SCHEME="Crossroad-tvOS" script: -- xcodebuild test -project Crossroad.xcodeproj -scheme Crossroad -destination "${DESTINATION}" +- xcodebuild test -project Crossroad.xcodeproj -scheme "${SCHEME}" -destination "${DESTINATION}" From 65c33ad089e0c5d5c436adf6f501c0fa8ba44ded Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Tue, 26 Nov 2019 13:28:07 -0800 Subject: [PATCH 5/6] fix potentially mismatched dependencies for tvOS tests --- Crossroad.xcodeproj/project.pbxproj | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Crossroad.xcodeproj/project.pbxproj b/Crossroad.xcodeproj/project.pbxproj index b5940d9..9f589f5 100644 --- a/Crossroad.xcodeproj/project.pbxproj +++ b/Crossroad.xcodeproj/project.pbxproj @@ -30,14 +30,12 @@ FF4DE703238C9B7600FAC931 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB520B0991900923325 /* Router.swift */; }; FF4DE704238C9B7600FAC931 /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB620B0991900923325 /* Route.swift */; }; FF4DE707238C9B7600FAC931 /* Crossroad.h in Headers */ = {isa = PBXBuildFile; fileRef = 546DEAB220B0991900923325 /* Crossroad.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FF4DE70E238C9F3000FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF4DE70C238C9B7600FAC931 /* Crossroad.framework */; }; FF4DE713238CA19200FAC931 /* OpenURLOptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54AB581920B0B29700E2FD28 /* OpenURLOptionTests.swift */; }; FF4DE714238CA19200FAC931 /* RouterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAAD20B0990500923325 /* RouterTests.swift */; }; FF4DE715238CA19200FAC931 /* PatternURLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546DEAB420B0991900923325 /* PatternURLTests.swift */; }; FF4DE716238CA19200FAC931 /* ContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CBB57320B705A600C272A5 /* ContextTests.swift */; }; FF4DE717238CA19200FAC931 /* URLParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0751010B22F8270200DFA53F /* URLParserTests.swift */; }; FF4DE718238CA19200FAC931 /* ParsableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D5D48822F8015500317EBF /* ParsableTests.swift */; }; - FF4DE71A238CA19200FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 546DEA7A20AD77F800923325 /* Crossroad.framework */; }; FF4DE71B238CA19200FAC931 /* Crossroad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF4DE70C238C9B7600FAC931 /* Crossroad.framework */; }; /* End PBXBuildFile section */ @@ -49,12 +47,12 @@ remoteGlobalIDString = 546DEA7920AD77F800923325; remoteInfo = Crossroad; }; - FF4DE711238CA19200FAC931 /* PBXContainerItemProxy */ = { + FF4DE722238DCFE600FAC931 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 546DEA7120AD77F800923325 /* Project object */; proxyType = 1; - remoteGlobalIDString = 546DEA7920AD77F800923325; - remoteInfo = Crossroad; + remoteGlobalIDString = FF4DE6FC238C9B7600FAC931; + remoteInfo = "Crossroad-tvOS"; }; /* End PBXContainerItemProxy section */ @@ -94,7 +92,6 @@ buildActionMask = 2147483647; files = ( 546DEA8420AD77F800923325 /* Crossroad.framework in Frameworks */, - FF4DE70E238C9F3000FAC931 /* Crossroad.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -109,7 +106,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FF4DE71A238CA19200FAC931 /* Crossroad.framework in Frameworks */, FF4DE71B238CA19200FAC931 /* Crossroad.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -256,7 +252,7 @@ buildRules = ( ); dependencies = ( - FF4DE710238CA19200FAC931 /* PBXTargetDependency */, + FF4DE723238DCFE600FAC931 /* PBXTargetDependency */, ); name = "CrossroadTests-tvOS"; productName = CrossroadTests; @@ -398,10 +394,10 @@ target = 546DEA7920AD77F800923325 /* Crossroad */; targetProxy = 546DEA8520AD77F800923325 /* PBXContainerItemProxy */; }; - FF4DE710238CA19200FAC931 /* PBXTargetDependency */ = { + FF4DE723238DCFE600FAC931 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 546DEA7920AD77F800923325 /* Crossroad */; - targetProxy = FF4DE711238CA19200FAC931 /* PBXContainerItemProxy */; + target = FF4DE6FC238C9B7600FAC931 /* Crossroad-tvOS */; + targetProxy = FF4DE722238DCFE600FAC931 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ From 6aa743166ad44873dc1aeaa3fbbd3966084edc39 Mon Sep 17 00:00:00 2001 From: Matt Dyson Date: Tue, 14 Jan 2020 16:28:01 -0800 Subject: [PATCH 6/6] remove @testable where not necessary and remove unnecessary lines from Package.swift --- Package.swift | 6 ------ Tests/CrossroadTests/OpenURLOptionTests.swift | 2 +- Tests/CrossroadTests/ParsableTests.swift | 2 +- Tests/CrossroadTests/RouterTests.swift | 2 +- Tests/CrossroadTests/URLParserTests.swift | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Package.swift b/Package.swift index 1e91981..5dfc5fc 100644 --- a/Package.swift +++ b/Package.swift @@ -18,11 +18,5 @@ let package = Package( .testTarget( name: "CrossroadTests", dependencies: ["Crossroad"]), - .target( - name: "Crossroad-tvOS", - dependencies: []), - .testTarget( - name: "CrossroadTests-tvOS", - dependencies: ["Crossroad-tvOS"]), ] ) diff --git a/Tests/CrossroadTests/OpenURLOptionTests.swift b/Tests/CrossroadTests/OpenURLOptionTests.swift index f432065..a4b0b14 100644 --- a/Tests/CrossroadTests/OpenURLOptionTests.swift +++ b/Tests/CrossroadTests/OpenURLOptionTests.swift @@ -1,7 +1,7 @@ #if os(iOS) import UIKit import XCTest -@testable import Crossroad +import Crossroad final class OpenURLOptionTests: XCTestCase { func testInit() { diff --git a/Tests/CrossroadTests/ParsableTests.swift b/Tests/CrossroadTests/ParsableTests.swift index 71fbe9a..a6b48a6 100644 --- a/Tests/CrossroadTests/ParsableTests.swift +++ b/Tests/CrossroadTests/ParsableTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Crossroad +import Crossroad class RegularExpression: NSRegularExpression, Parsable { required public init?(from string: String) { diff --git a/Tests/CrossroadTests/RouterTests.swift b/Tests/CrossroadTests/RouterTests.swift index d91bc65..52aeb69 100644 --- a/Tests/CrossroadTests/RouterTests.swift +++ b/Tests/CrossroadTests/RouterTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Crossroad +import Crossroad final class RouterTest: XCTestCase { let scheme = "foobar" diff --git a/Tests/CrossroadTests/URLParserTests.swift b/Tests/CrossroadTests/URLParserTests.swift index 14a6732..286caa6 100644 --- a/Tests/CrossroadTests/URLParserTests.swift +++ b/Tests/CrossroadTests/URLParserTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Crossroad +import Crossroad final class URLParserTests: XCTestCase { func testURLParser() {