commit
50b438c228
19 changed files with 1332 additions and 0 deletions
@ -0,0 +1,119 @@ |
|||
|
|||
# Created by https://www.gitignore.io/api/xcode,swift,macos,swiftpm,swiftpackagemanager,vscode,visualstudiocode |
|||
# Edit at https://www.gitignore.io/?templates=xcode,swift,macos,swiftpm,swiftpackagemanager,vscode,visualstudiocode |
|||
|
|||
### macOS ### |
|||
# General |
|||
.DS_Store |
|||
.AppleDouble |
|||
.LSOverride |
|||
|
|||
# Icon must end with two \r |
|||
Icon |
|||
|
|||
# Thumbnails |
|||
._* |
|||
|
|||
# Files that might appear in the root of a volume |
|||
.DocumentRevisions-V100 |
|||
.fseventsd |
|||
.Spotlight-V100 |
|||
.TemporaryItems |
|||
.Trashes |
|||
.VolumeIcon.icns |
|||
.com.apple.timemachine.donotpresent |
|||
|
|||
# Directories potentially created on remote AFP share |
|||
.AppleDB |
|||
.AppleDesktop |
|||
Network Trash Folder |
|||
Temporary Items |
|||
.apdisk |
|||
|
|||
|
|||
|
|||
### VisualStudioCode ### |
|||
.vscode/* |
|||
!.vscode/settings.json |
|||
!.vscode/tasks.json |
|||
!.vscode/launch.json |
|||
!.vscode/extensions.json |
|||
|
|||
### VisualStudioCode Patch ### |
|||
# Ignore all local history of files |
|||
.history |
|||
|
|||
#!! ERROR: vscode is undefined. Use list command to see defined gitignore types !!# |
|||
# Xcode |
|||
# |
|||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore |
|||
|
|||
.DS_Store |
|||
wildcat_settings |
|||
|
|||
## Build generated |
|||
build/ |
|||
DerivedData/ |
|||
|
|||
## Various settings |
|||
*.pbxuser |
|||
!default.pbxuser |
|||
*.mode1v3 |
|||
!default.mode1v3 |
|||
*.mode2v3 |
|||
!default.mode2v3 |
|||
*.perspectivev3 |
|||
!default.perspectivev3 |
|||
xcuserdata/ |
|||
|
|||
## Other |
|||
*.moved-aside |
|||
*.xccheckout |
|||
*.xcscmblueprint |
|||
|
|||
## Obj-C/Swift specific |
|||
*.hmap |
|||
*.ipa |
|||
*.dSYM.zip |
|||
*.dSYM |
|||
|
|||
## Playgrounds |
|||
timeline.xctimeline |
|||
playground.xcworkspace |
|||
|
|||
# Swift Package Manager |
|||
# |
|||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. |
|||
# Packages/ |
|||
# Package.pins |
|||
.build/ |
|||
|
|||
# CocoaPods |
|||
# |
|||
# We recommend against adding the Pods directory to your .gitignore. However |
|||
# you should judge for yourself, the pros and cons are mentioned at: |
|||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control |
|||
# |
|||
# Pods/ |
|||
|
|||
# Carthage |
|||
# |
|||
# Add this line if you want to avoid checking in source code from Carthage dependencies. |
|||
# Carthage/Checkouts |
|||
|
|||
Carthage/Build |
|||
|
|||
# fastlane |
|||
# |
|||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the |
|||
# screenshots whenever they are needed. |
|||
# For more information about the recommended setup visit: |
|||
# https://docs.fastlane.tools/best-practices/source-control/#source-control |
|||
|
|||
fastlane/report.xml |
|||
fastlane/Preview.html |
|||
fastlane/screenshots |
|||
fastlane/test_output |
|||
|
|||
.swiftpm/ |
|||
Index/ |
@ -0,0 +1,16 @@ |
|||
// swift-tools-version:5.1 |
|||
// The swift-tools-version declares the minimum version of Swift required to build this package. |
|||
|
|||
import PackageDescription |
|||
|
|||
let package = Package( |
|||
name: "SwiftPSL", |
|||
dependencies: [ |
|||
], |
|||
targets: [ |
|||
.systemLibrary(name: "psl", pkgConfig: "libpsl"), |
|||
.target(name: "SwiftPSL", dependencies: ["psl"]), |
|||
.target(name: "psl-app", dependencies: ["SwiftPSL"]), |
|||
.testTarget(name: "SwiftPSLTests", dependencies: ["SwiftPSL"]) |
|||
] |
|||
) |
@ -0,0 +1,9 @@ |
|||
# SwiftPSL |
|||
|
|||
A Swift wrapper for [`libpsl`](https://github.com/rockdaboot/libpsl) to work with internet domains in the context of the [Public Suffix List](https://publicsuffix.org/). |
|||
|
|||
Primarily created as an example Swift wrapper for an ultra-simple C library |
|||
|
|||
### TODO |
|||
|
|||
- enable extraction of host, subdomain, domain, and public suffix |
@ -0,0 +1,159 @@ |
|||
import psl |
|||
|
|||
enum SwiftPSLError : Error { |
|||
case FileNotFound |
|||
case Invalidarg |
|||
case Converter |
|||
case ToUTF16 |
|||
case ToLower |
|||
case ToUTF8 |
|||
case NoMem |
|||
} |
|||
|
|||
public final class SwiftPSL { |
|||
|
|||
public let pslVersion = PSL_VERSION |
|||
public let pslVersionMajor = PSL_VERSION_MAJOR |
|||
public let pslVersionMinor = PSL_VERSION_MINOR |
|||
public let pslVersionPatch = PSL_VERSION_PATCH |
|||
|
|||
public struct pslType { |
|||
static let ICANN : Int32 = PSL_TYPE_ICANN |
|||
static let NoStarRule : Int32 = PSL_TYPE_NO_STAR_RULE |
|||
static let ANY : Int32 = PSL_TYPE_ANY |
|||
static let Private : Int32 = PSL_TYPE_PRIVATE |
|||
} |
|||
|
|||
private var ctx : OpaquePointer? = psl_builtin() |
|||
private var isBuiltin = true |
|||
|
|||
// psl_error_t value. PSL_SUCCESS: Success PSL_ERR_INVALID_ARG: str is a NULL value. PSL_ERR_CONVERTER: Failed to open the unicode converter with name encoding PSL_ERR_TO_UTF16: Failed to convert str to unicode PSL_ERR_TO_LOWER: Failed to convert unicode to lowercase PSL_ERR_TO_UTF8: Failed to convert unicode to UTF-8 PSL_ERR_NO_MEM: Failed to allocate memory |
|||
|
|||
public func strToUTF8Lower(_ str : String, encoding : String = "utf-8", locale : String = "en") throws -> String? { |
|||
|
|||
var lower : UnsafeMutablePointer<Int8>? |
|||
|
|||
let ret = psl_str_to_utf8lower(str, encoding, locale, &lower) |
|||
|
|||
var dom : String? = nil |
|||
|
|||
switch ret { |
|||
case PSL_ERR_INVALID_ARG: throw SwiftPSLError.Invalidarg |
|||
case PSL_ERR_CONVERTER: throw SwiftPSLError.Converter |
|||
case PSL_ERR_TO_UTF16: throw SwiftPSLError.ToUTF16 |
|||
case PSL_ERR_TO_LOWER: throw SwiftPSLError.ToLower |
|||
case PSL_ERR_TO_UTF8: throw SwiftPSLError.ToUTF8 |
|||
case PSL_ERR_NO_MEM: throw SwiftPSLError.NoMem |
|||
default: dom = String(cString: lower!) |
|||
} |
|||
|
|||
psl_free_string(lower) |
|||
|
|||
return(dom) |
|||
|
|||
} |
|||
|
|||
public func publicSuffix(_ domain : String, encoding : String = "utf-8", locale : String = "en") -> String? { |
|||
let psl : OpaquePointer? = ctx |
|||
var lower : UnsafeMutablePointer<Int8>? |
|||
let dom : String? = (psl_str_to_utf8lower(domain, encoding, locale, &lower) == PSL_SUCCESS) ? String(cString: psl_unregistrable_domain(psl, lower)) : nil |
|||
psl_free_string(lower) |
|||
return(dom) |
|||
|
|||
} |
|||
|
|||
public func apexDomain(_ domain : String, encoding : String = "utf-8", locale : String = "en") -> String? { |
|||
let psl : OpaquePointer? = ctx |
|||
var lower : UnsafeMutablePointer<Int8>? |
|||
let dom : String? = (psl_str_to_utf8lower(domain, encoding, locale, &lower) == PSL_SUCCESS) ? String(cString: psl_registrable_domain(psl, lower)) : nil |
|||
psl_free_string(lower) |
|||
return(dom) |
|||
} |
|||
|
|||
public func isPublicSuffix(_ domain : String, encoding : String = "utf-8", locale : String = "en") -> Bool { |
|||
let psl : OpaquePointer? = ctx |
|||
var lower : UnsafeMutablePointer<Int8>? |
|||
let res : Bool = (psl_str_to_utf8lower(domain, encoding, locale, &lower) == PSL_SUCCESS) && (psl_is_public_suffix(psl, lower) == 1) |
|||
psl_free_string(lower) |
|||
return(res) |
|||
} |
|||
|
|||
public func isPublicSuffix(_ domain : String, type : Int32, encoding : String = "utf-8", locale : String = "en") -> Bool { |
|||
let psl : OpaquePointer? = ctx |
|||
var lower : UnsafeMutablePointer<Int8>? |
|||
let res : Bool = (psl_str_to_utf8lower(domain, encoding, locale, &lower) == PSL_SUCCESS) && (psl_is_public_suffix2(psl, lower, type) == 1) |
|||
psl_free_string(lower) |
|||
return(res) |
|||
} |
|||
|
|||
public func isCookieDomainAcceptable(_ hostname : String, cookieDomain : String) -> Bool { |
|||
|
|||
let psl : OpaquePointer? = ctx |
|||
var lower1 : UnsafeMutablePointer<Int8>? |
|||
var lower2 : UnsafeMutablePointer<Int8>? |
|||
|
|||
let rc1 = psl_str_to_utf8lower(hostname, "utf-8", "en", &lower1) |
|||
let rc2 = psl_str_to_utf8lower(cookieDomain, "utf-8", "en", &lower2) |
|||
|
|||
let res : Bool = (rc1 == PSL_SUCCESS) && (rc2 == PSL_SUCCESS) && (psl_is_cookie_domain_acceptable(psl, lower1, lower2) == 1) |
|||
|
|||
psl_free_string(lower1) |
|||
psl_free_string(lower2) |
|||
|
|||
return(res) |
|||
|
|||
} |
|||
|
|||
public init() {} |
|||
|
|||
public init(_ path: String) throws { |
|||
ctx = psl_load_file(path) |
|||
if (ctx == nil) { throw SwiftPSLError.FileNotFound } |
|||
isBuiltin = false |
|||
} |
|||
|
|||
public func free() { |
|||
if ((!isBuiltin) && (ctx != nil)) { |
|||
psl_free(ctx) |
|||
ctx = nil |
|||
} |
|||
} |
|||
|
|||
public func suffixCount() -> Int32 { |
|||
return(psl_suffix_count(ctx)) |
|||
} |
|||
|
|||
public func suffixWildcardCount() -> Int32 { |
|||
return(psl_suffix_wildcard_count(ctx)) |
|||
} |
|||
|
|||
public func suffixExceptionCount() -> Int32 { |
|||
return(psl_suffix_exception_count(ctx)) |
|||
} |
|||
|
|||
public func builtinDistFilename() -> String { |
|||
return(String(cString: psl_dist_filename())) |
|||
} |
|||
|
|||
public func builtinFilename() -> String { |
|||
return(String(cString: psl_builtin_filename())) |
|||
} |
|||
|
|||
public func builtinSHA1() -> String { |
|||
return(String(cString: psl_builtin_sha1sum())) |
|||
} |
|||
|
|||
public func isBuiltinOutdated() -> Bool { |
|||
return(psl_builtin_outdated() == 1) |
|||
} |
|||
|
|||
public func builtinTimestamp() -> Int { |
|||
let ft = psl_builtin_file_time() |
|||
return(ft) |
|||
} |
|||
|
|||
deinit { |
|||
free() |
|||
} |
|||
|
|||
} |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>CFBundleIdentifier</key> |
|||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,22 @@ |
|||
// |
|||
// main.swift |
|||
// psl-app |
|||
// |
|||
// Created by hrbrmstr on 9/15/19. |
|||
// |
|||
|
|||
import Foundation |
|||
import SwiftPSL |
|||
|
|||
var psl : SwiftPSL? |
|||
|
|||
psl = SwiftPSL() |
|||
|
|||
print("Using", psl!.builtinFilename()) |
|||
print("Suffix Count", psl!.suffixCount()) |
|||
print("TS", psl!.builtinTimestamp()) |
|||
|
|||
let arguments: [String] = CommandLine.arguments |
|||
if (arguments.count > 1) { print(psl!.apexDomain(arguments[1]) ?? arguments[1]) } |
|||
|
|||
psl = nil |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>com.apple.security.cs.disable-library-validation</key> |
|||
<true/> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,4 @@ |
|||
module psl { |
|||
umbrella header "psl.h" |
|||
link "psl" |
|||
} |
@ -0,0 +1 @@ |
|||
#include <libpsl.h> |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>CFBundleDevelopmentRegion</key> |
|||
<string>en</string> |
|||
<key>CFBundleExecutable</key> |
|||
<string>$(EXECUTABLE_NAME)</string> |
|||
<key>CFBundleIdentifier</key> |
|||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
|||
<key>CFBundleInfoDictionaryVersion</key> |
|||
<string>6.0</string> |
|||
<key>CFBundleName</key> |
|||
<string>$(PRODUCT_NAME)</string> |
|||
<key>CFBundlePackageType</key> |
|||
<string>BNDL</string> |
|||
<key>CFBundleShortVersionString</key> |
|||
<string>1.0</string> |
|||
<key>CFBundleSignature</key> |
|||
<string>????</string> |
|||
<key>CFBundleVersion</key> |
|||
<string>$(CURRENT_PROJECT_VERSION)</string> |
|||
<key>NSPrincipalClass</key> |
|||
<string></string> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>CFBundleDevelopmentRegion</key> |
|||
<string>en</string> |
|||
<key>CFBundleExecutable</key> |
|||
<string>$(EXECUTABLE_NAME)</string> |
|||
<key>CFBundleIdentifier</key> |
|||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
|||
<key>CFBundleInfoDictionaryVersion</key> |
|||
<string>6.0</string> |
|||
<key>CFBundleName</key> |
|||
<string>$(PRODUCT_NAME)</string> |
|||
<key>CFBundlePackageType</key> |
|||
<string>FMWK</string> |
|||
<key>CFBundleShortVersionString</key> |
|||
<string>1.0</string> |
|||
<key>CFBundleSignature</key> |
|||
<string>????</string> |
|||
<key>CFBundleVersion</key> |
|||
<string>$(CURRENT_PROJECT_VERSION)</string> |
|||
<key>NSPrincipalClass</key> |
|||
<string></string> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,711 @@ |
|||
// !$*UTF8*$! |
|||
{ |
|||
archiveVersion = 1; |
|||
classes = { |
|||
}; |
|||
objectVersion = 46; |
|||
objects = { |
|||
|
|||
/* Begin PBXAggregateTarget section */ |
|||
"SwiftPSL::SwiftPSLPackageTests::ProductTarget" /* SwiftPSLPackageTests */ = { |
|||
isa = PBXAggregateTarget; |
|||
buildConfigurationList = OBJ_39 /* Build configuration list for PBXAggregateTarget "SwiftPSLPackageTests" */; |
|||
buildPhases = ( |
|||
); |
|||
dependencies = ( |
|||
OBJ_42 /* PBXTargetDependency */, |
|||
); |
|||
name = SwiftPSLPackageTests; |
|||
productName = SwiftPSLPackageTests; |
|||
}; |
|||
/* End PBXAggregateTarget section */ |
|||
|
|||
/* Begin PBXBuildFile section */ |
|||
C422247C232F292D004E4C39 /* libpsl.5.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C422247B232F292D004E4C39 /* libpsl.5.dylib */; }; |
|||
OBJ_30 /* SwiftPSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* SwiftPSL.swift */; }; |
|||
OBJ_37 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; |
|||
OBJ_48 /* CoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* CoreTests.swift */; }; |
|||
OBJ_50 /* SwiftPSL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "SwiftPSL::SwiftPSL::Product" /* SwiftPSL.framework */; }; |
|||
OBJ_57 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* main.swift */; }; |
|||
OBJ_59 /* SwiftPSL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "SwiftPSL::SwiftPSL::Product" /* SwiftPSL.framework */; }; |
|||
/* End PBXBuildFile section */ |
|||
|
|||
/* Begin PBXContainerItemProxy section */ |
|||
C4222477232F28BC004E4C39 /* PBXContainerItemProxy */ = { |
|||
isa = PBXContainerItemProxy; |
|||
containerPortal = OBJ_1 /* Project object */; |
|||
proxyType = 1; |
|||
remoteGlobalIDString = "SwiftPSL::SwiftPSL"; |
|||
remoteInfo = SwiftPSL; |
|||
}; |
|||
C4222478232F28BC004E4C39 /* PBXContainerItemProxy */ = { |
|||
isa = PBXContainerItemProxy; |
|||
containerPortal = OBJ_1 /* Project object */; |
|||
proxyType = 1; |
|||
remoteGlobalIDString = "SwiftPSL::SwiftPSL"; |
|||
remoteInfo = SwiftPSL; |
|||
}; |
|||
C4222479232F28C0004E4C39 /* PBXContainerItemProxy */ = { |
|||
isa = PBXContainerItemProxy; |
|||
containerPortal = OBJ_1 /* Project object */; |
|||
proxyType = 1; |
|||
remoteGlobalIDString = "SwiftPSL::SwiftPSLTests"; |
|||
remoteInfo = SwiftPSLTests; |
|||
}; |
|||
/* End PBXContainerItemProxy section */ |
|||
|
|||
/* Begin PBXFileReference section */ |
|||
C422247B232F292D004E4C39 /* libpsl.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpsl.5.dylib; path = ../../../../usr/local/lib/libpsl.5.dylib; sourceTree = "<group>"; }; |
|||
OBJ_11 /* psl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = psl.h; sourceTree = "<group>"; }; |
|||
OBJ_12 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; }; |
|||
OBJ_14 /* psl-app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "psl-app.entitlements"; sourceTree = "<group>"; }; |
|||
OBJ_15 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
|||
OBJ_16 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; }; |
|||
OBJ_19 /* CoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreTests.swift; sourceTree = "<group>"; }; |
|||
OBJ_24 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; |
|||
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; }; |
|||
OBJ_9 /* SwiftPSL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftPSL.swift; sourceTree = "<group>"; }; |
|||
"SwiftPSL::SwiftPSL::Product" /* SwiftPSL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SwiftPSL.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
|||
"SwiftPSL::SwiftPSLTests::Product" /* SwiftPSLTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = SwiftPSLTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; |
|||
"SwiftPSL::psl-app::Product" /* psl-app */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = "psl-app"; sourceTree = BUILT_PRODUCTS_DIR; }; |
|||
/* End PBXFileReference section */ |
|||
|
|||
/* Begin PBXFrameworksBuildPhase section */ |
|||
OBJ_31 /* Frameworks */ = { |
|||
isa = PBXFrameworksBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
OBJ_49 /* Frameworks */ = { |
|||
isa = PBXFrameworksBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
OBJ_50 /* SwiftPSL.framework in Frameworks */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
OBJ_58 /* Frameworks */ = { |
|||
isa = PBXFrameworksBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
C422247C232F292D004E4C39 /* libpsl.5.dylib in Frameworks */, |
|||
OBJ_59 /* SwiftPSL.framework in Frameworks */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
/* End PBXFrameworksBuildPhase section */ |
|||
|
|||
/* Begin PBXGroup section */ |
|||
C422247A232F292D004E4C39 /* Frameworks */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
C422247B232F292D004E4C39 /* libpsl.5.dylib */, |
|||
); |
|||
name = Frameworks; |
|||
sourceTree = "<group>"; |
|||
}; |
|||
OBJ_10 /* psl */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_11 /* psl.h */, |
|||
OBJ_12 /* module.modulemap */, |
|||
); |
|||
name = psl; |
|||
path = Sources/psl; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
OBJ_13 /* psl-app */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_14 /* psl-app.entitlements */, |
|||
OBJ_15 /* Info.plist */, |
|||
OBJ_16 /* main.swift */, |
|||
); |
|||
name = "psl-app"; |
|||
path = "Sources/psl-app"; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
OBJ_17 /* Tests */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_18 /* SwiftPSLTests */, |
|||
); |
|||
name = Tests; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
OBJ_18 /* SwiftPSLTests */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_19 /* CoreTests.swift */, |
|||
); |
|||
name = SwiftPSLTests; |
|||
path = Tests/SwiftPSLTests; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
OBJ_20 /* Products */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
"SwiftPSL::psl-app::Product" /* psl-app */, |
|||
"SwiftPSL::SwiftPSLTests::Product" /* SwiftPSLTests.xctest */, |
|||
"SwiftPSL::SwiftPSL::Product" /* SwiftPSL.framework */, |
|||
); |
|||
name = Products; |
|||
sourceTree = BUILT_PRODUCTS_DIR; |
|||
}; |
|||
OBJ_5 /* */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_6 /* Package.swift */, |
|||
OBJ_7 /* Sources */, |
|||
OBJ_17 /* Tests */, |
|||
OBJ_20 /* Products */, |
|||
OBJ_24 /* README.md */, |
|||
C422247A232F292D004E4C39 /* Frameworks */, |
|||
); |
|||
name = ""; |
|||
sourceTree = "<group>"; |
|||
}; |
|||
OBJ_7 /* Sources */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_8 /* SwiftPSL */, |
|||
OBJ_10 /* psl */, |
|||
OBJ_13 /* psl-app */, |
|||
); |
|||
name = Sources; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
OBJ_8 /* SwiftPSL */ = { |
|||
isa = PBXGroup; |
|||
children = ( |
|||
OBJ_9 /* SwiftPSL.swift */, |
|||
); |
|||
name = SwiftPSL; |
|||
path = Sources/SwiftPSL; |
|||
sourceTree = SOURCE_ROOT; |
|||
}; |
|||
/* End PBXGroup section */ |
|||
|
|||
/* Begin PBXNativeTarget section */ |
|||
"SwiftPSL::SwiftPMPackageDescription" /* SwiftPSLPackageDescription */ = { |
|||
isa = PBXNativeTarget; |
|||
buildConfigurationList = OBJ_33 /* Build configuration list for PBXNativeTarget "SwiftPSLPackageDescription" */; |
|||
buildPhases = ( |
|||
OBJ_36 /* Sources */, |
|||
); |
|||
buildRules = ( |
|||
); |
|||
dependencies = ( |
|||
); |
|||
name = SwiftPSLPackageDescription; |
|||
productName = SwiftPSLPackageDescription; |
|||
productType = "com.apple.product-type.framework"; |
|||
}; |
|||
"SwiftPSL::SwiftPSL" /* SwiftPSL */ = { |
|||
isa = PBXNativeTarget; |
|||
buildConfigurationList = OBJ_26 /* Build configuration list for PBXNativeTarget "SwiftPSL" */; |
|||
buildPhases = ( |
|||
OBJ_29 /* Sources */, |
|||
OBJ_31 /* Frameworks */, |
|||
); |
|||
buildRules = ( |
|||
); |
|||
dependencies = ( |
|||
); |
|||
name = SwiftPSL; |
|||
productName = SwiftPSL; |
|||
productReference = "SwiftPSL::SwiftPSL::Product" /* SwiftPSL.framework */; |
|||
productType = "com.apple.product-type.framework"; |
|||
}; |
|||
"SwiftPSL::SwiftPSLTests" /* SwiftPSLTests */ = { |
|||
isa = PBXNativeTarget; |
|||
buildConfigurationList = OBJ_44 /* Build configuration list for PBXNativeTarget "SwiftPSLTests" */; |
|||
buildPhases = ( |
|||
OBJ_47 /* Sources */, |
|||
OBJ_49 /* Frameworks */, |
|||
); |
|||
buildRules = ( |
|||
); |
|||
dependencies = ( |
|||
OBJ_51 /* PBXTargetDependency */, |
|||
); |
|||
name = SwiftPSLTests; |
|||
productName = SwiftPSLTests; |
|||
productReference = "SwiftPSL::SwiftPSLTests::Product" /* SwiftPSLTests.xctest */; |
|||
productType = "com.apple.product-type.bundle.unit-test"; |
|||
}; |
|||
"SwiftPSL::psl-app" /* psl-app */ = { |
|||
isa = PBXNativeTarget; |
|||
buildConfigurationList = OBJ_53 /* Build configuration list for PBXNativeTarget "psl-app" */; |
|||
buildPhases = ( |
|||
OBJ_56 /* Sources */, |
|||
OBJ_58 /* Frameworks */, |
|||
); |
|||
buildRules = ( |
|||
); |
|||
dependencies = ( |
|||
OBJ_60 /* PBXTargetDependency */, |
|||
); |
|||
name = "psl-app"; |
|||
productName = psl_app; |
|||
productReference = "SwiftPSL::psl-app::Product" /* psl-app */; |
|||
productType = "com.apple.product-type.tool"; |
|||
}; |
|||
/* End PBXNativeTarget section */ |
|||
|
|||
/* Begin PBXProject section */ |
|||
OBJ_1 /* Project object */ = { |
|||
isa = PBXProject; |
|||
attributes = { |
|||
LastSwiftMigration = 9999; |
|||
LastUpgradeCheck = 9999; |
|||
TargetAttributes = { |
|||
"SwiftPSL::psl-app" = { |
|||
DevelopmentTeam = CBY22P58G8; |
|||
ProvisioningStyle = Manual; |
|||
}; |
|||
}; |
|||
}; |
|||
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "SwiftPSL" */; |
|||
compatibilityVersion = "Xcode 3.2"; |
|||
developmentRegion = en; |
|||
hasScannedForEncodings = 0; |
|||
knownRegions = ( |
|||
en, |
|||
); |
|||
mainGroup = OBJ_5 /* */; |
|||
productRefGroup = OBJ_20 /* Products */; |
|||
projectDirPath = ""; |
|||
projectRoot = ""; |
|||
targets = ( |
|||
"SwiftPSL::SwiftPSL" /* SwiftPSL */, |
|||
"SwiftPSL::SwiftPMPackageDescription" /* SwiftPSLPackageDescription */, |
|||
"SwiftPSL::SwiftPSLPackageTests::ProductTarget" /* SwiftPSLPackageTests */, |
|||
"SwiftPSL::SwiftPSLTests" /* SwiftPSLTests */, |
|||
"SwiftPSL::psl-app" /* psl-app */, |
|||
); |
|||
}; |
|||
/* End PBXProject section */ |
|||
|
|||
/* Begin PBXSourcesBuildPhase section */ |
|||
OBJ_29 /* Sources */ = { |
|||
isa = PBXSourcesBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
OBJ_30 /* SwiftPSL.swift in Sources */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
OBJ_36 /* Sources */ = { |
|||
isa = PBXSourcesBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
OBJ_37 /* Package.swift in Sources */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
OBJ_47 /* Sources */ = { |
|||
isa = PBXSourcesBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
OBJ_48 /* CoreTests.swift in Sources */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
OBJ_56 /* Sources */ = { |
|||
isa = PBXSourcesBuildPhase; |
|||
buildActionMask = 0; |
|||
files = ( |
|||
OBJ_57 /* main.swift in Sources */, |
|||
); |
|||
runOnlyForDeploymentPostprocessing = 0; |
|||
}; |
|||
/* End PBXSourcesBuildPhase section */ |
|||
|
|||
/* Begin PBXTargetDependency section */ |
|||
OBJ_42 /* PBXTargetDependency */ = { |
|||
isa = PBXTargetDependency; |
|||
target = "SwiftPSL::SwiftPSLTests" /* SwiftPSLTests */; |
|||
targetProxy = C4222479232F28C0004E4C39 /* PBXContainerItemProxy */; |
|||
}; |
|||
OBJ_51 /* PBXTargetDependency */ = { |
|||
isa = PBXTargetDependency; |
|||
target = "SwiftPSL::SwiftPSL" /* SwiftPSL */; |
|||
targetProxy = C4222478232F28BC004E4C39 /* PBXContainerItemProxy */; |
|||
}; |
|||
OBJ_60 /* PBXTargetDependency */ = { |
|||
isa = PBXTargetDependency; |
|||
target = "SwiftPSL::SwiftPSL" /* SwiftPSL */; |
|||
targetProxy = C4222477232F28BC004E4C39 /* PBXContainerItemProxy */; |
|||
}; |
|||
/* End PBXTargetDependency section */ |
|||
|
|||
/* Begin XCBuildConfiguration section */ |
|||
OBJ_27 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
ENABLE_TESTABILITY = YES; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/SwiftPSL_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
PRODUCT_BUNDLE_IDENTIFIER = SwiftPSL; |
|||
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; |
|||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; |
|||
SKIP_INSTALL = YES; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = SwiftPSL; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_28 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
ENABLE_TESTABILITY = YES; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/SwiftPSL_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
PRODUCT_BUNDLE_IDENTIFIER = SwiftPSL; |
|||
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; |
|||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; |
|||
SKIP_INSTALL = YES; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = SwiftPSL; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Release; |
|||
}; |
|||
OBJ_3 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CLANG_ENABLE_OBJC_ARC = YES; |
|||
COMBINE_HIDPI_IMAGES = YES; |
|||
COPY_PHASE_STRIP = NO; |
|||
DEBUG_INFORMATION_FORMAT = dwarf; |
|||
DYLIB_INSTALL_NAME_BASE = "@rpath"; |
|||
ENABLE_NS_ASSERTIONS = YES; |
|||
GCC_OPTIMIZATION_LEVEL = 0; |
|||
GCC_PREPROCESSOR_DEFINITIONS = ( |
|||
"$(inherited)", |
|||
"SWIFT_PACKAGE=1", |
|||
"DEBUG=1", |
|||
); |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
ONLY_ACTIVE_ARCH = YES; |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; |
|||
PRODUCT_NAME = "$(TARGET_NAME)"; |
|||
SDKROOT = macosx; |
|||
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG"; |
|||
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; |
|||
USE_HEADERMAP = NO; |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_34 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
LD = /usr/bin/true; |
|||
OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -package-description-version 5.1"; |
|||
SWIFT_VERSION = 5.0; |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_35 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
LD = /usr/bin/true; |
|||
OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -package-description-version 5.1"; |
|||
SWIFT_VERSION = 5.0; |
|||
}; |
|||
name = Release; |
|||
}; |
|||
OBJ_4 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CLANG_ENABLE_OBJC_ARC = YES; |
|||
COMBINE_HIDPI_IMAGES = YES; |
|||
COPY_PHASE_STRIP = YES; |
|||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
|||
DYLIB_INSTALL_NAME_BASE = "@rpath"; |
|||
GCC_OPTIMIZATION_LEVEL = s; |
|||
GCC_PREPROCESSOR_DEFINITIONS = ( |
|||
"$(inherited)", |
|||
"SWIFT_PACKAGE=1", |
|||
); |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; |
|||
PRODUCT_NAME = "$(TARGET_NAME)"; |
|||
SDKROOT = macosx; |
|||
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; |
|||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; |
|||
USE_HEADERMAP = NO; |
|||
}; |
|||
name = Release; |
|||
}; |
|||
OBJ_40 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_41 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
}; |
|||
name = Release; |
|||
}; |
|||
OBJ_45 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CLANG_ENABLE_MODULES = YES; |
|||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/SwiftPSLTests_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = SwiftPSLTests; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_46 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CLANG_ENABLE_MODULES = YES; |
|||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/SwiftPSLTests_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = SwiftPSLTests; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Release; |
|||
}; |
|||
OBJ_54 /* Debug */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CODE_SIGN_IDENTITY = "Developer ID Application"; |
|||
CODE_SIGN_STYLE = Manual; |
|||
DEVELOPMENT_TEAM = CBY22P58G8; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/psl_app_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
PROVISIONING_PROFILE_SPECIFIER = ""; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; |
|||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = "psl-app"; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Debug; |
|||
}; |
|||
OBJ_55 /* Release */ = { |
|||
isa = XCBuildConfiguration; |
|||
buildSettings = { |
|||
CODE_SIGN_IDENTITY = "Developer ID Application"; |
|||
CODE_SIGN_STYLE = Manual; |
|||
DEVELOPMENT_TEAM = CBY22P58G8; |
|||
FRAMEWORK_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(PLATFORM_DIR)/Developer/Library/Frameworks", |
|||
); |
|||
HEADER_SEARCH_PATHS = ( |
|||
"$(inherited)", |
|||
"$(SRCROOT)/Sources/psl", |
|||
); |
|||
INFOPLIST_FILE = SwiftPSL.xcodeproj/psl_app_Info.plist; |
|||
IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path"; |
|||
MACOSX_DEPLOYMENT_TARGET = 10.10; |
|||
OTHER_CFLAGS = ( |
|||
"$(inherited)", |
|||
"-I/usr/local/Cellar/libpsl/0.21.0_1/include", |
|||
); |
|||
OTHER_LDFLAGS = ( |
|||
"$(inherited)", |
|||
"-L/usr/local/Cellar/libpsl/0.21.0_1/lib", |
|||
"-lpsl", |
|||
); |
|||
OTHER_SWIFT_FLAGS = "$(inherited) -I/usr/local/Cellar/libpsl/0.21.0_1/include"; |
|||
PROVISIONING_PROFILE_SPECIFIER = ""; |
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; |
|||
SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES; |
|||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO; |
|||
SWIFT_VERSION = 5.0; |
|||
TARGET_NAME = "psl-app"; |
|||
TVOS_DEPLOYMENT_TARGET = 9.0; |
|||
WATCHOS_DEPLOYMENT_TARGET = 2.0; |
|||
}; |
|||
name = Release; |
|||
}; |
|||
/* End XCBuildConfiguration section */ |
|||
|
|||
/* Begin XCConfigurationList section */ |
|||
OBJ_2 /* Build configuration list for PBXProject "SwiftPSL" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_3 /* Debug */, |
|||
OBJ_4 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
OBJ_26 /* Build configuration list for PBXNativeTarget "SwiftPSL" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_27 /* Debug */, |
|||
OBJ_28 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
OBJ_33 /* Build configuration list for PBXNativeTarget "SwiftPSLPackageDescription" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_34 /* Debug */, |
|||
OBJ_35 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
OBJ_39 /* Build configuration list for PBXAggregateTarget "SwiftPSLPackageTests" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_40 /* Debug */, |
|||
OBJ_41 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
OBJ_44 /* Build configuration list for PBXNativeTarget "SwiftPSLTests" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_45 /* Debug */, |
|||
OBJ_46 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
OBJ_53 /* Build configuration list for PBXNativeTarget "psl-app" */ = { |
|||
isa = XCConfigurationList; |
|||
buildConfigurations = ( |
|||
OBJ_54 /* Debug */, |
|||
OBJ_55 /* Release */, |
|||
); |
|||
defaultConfigurationIsVisible = 0; |
|||
defaultConfigurationName = Release; |
|||
}; |
|||
/* End XCConfigurationList section */ |
|||
}; |
|||
rootObject = OBJ_1 /* Project object */; |
|||
} |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Workspace |
|||
version = "1.0"> |
|||
<FileRef |
|||
location = "self:"> |
|||
</FileRef> |
|||
</Workspace> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>IDEDidComputeMac32BitWarning</key> |
|||
<true/> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key> |
|||
<false/> |
|||
</dict> |
|||
</plist> |
@ -0,0 +1,82 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Scheme |
|||
LastUpgradeVersion = "9999" |
|||
version = "1.3"> |
|||
<BuildAction |
|||
parallelizeBuildables = "YES" |
|||
buildImplicitDependencies = "YES"> |
|||
<BuildActionEntries> |
|||
<BuildActionEntry |
|||
buildForTesting = "YES" |
|||
buildForRunning = "YES" |
|||
buildForProfiling = "YES" |
|||
buildForArchiving = "YES" |
|||
buildForAnalyzing = "YES"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::SwiftPSL" |
|||
BuildableName = "SwiftPSL.framework" |
|||
BlueprintName = "SwiftPSL" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</BuildActionEntry> |
|||
<BuildActionEntry |
|||
buildForTesting = "YES" |
|||
buildForRunning = "YES" |
|||
buildForProfiling = "YES" |
|||
buildForArchiving = "YES" |
|||
buildForAnalyzing = "YES"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::psl-app" |
|||
BuildableName = "psl-app" |
|||
BlueprintName = "psl-app" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</BuildActionEntry> |
|||
</BuildActionEntries> |
|||
</BuildAction> |
|||
<TestAction |
|||
buildConfiguration = "Debug" |
|||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
|||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
|||
shouldUseLaunchSchemeArgsEnv = "YES"> |
|||
<Testables> |
|||
<TestableReference |
|||
skipped = "NO"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::SwiftPSLTests" |
|||
BuildableName = "SwiftPSLTests.xctest" |
|||
BlueprintName = "SwiftPSLTests" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</TestableReference> |
|||
</Testables> |
|||
</TestAction> |
|||
<LaunchAction |
|||
buildConfiguration = "Debug" |
|||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
|||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
|||
launchStyle = "0" |
|||
useCustomWorkingDirectory = "NO" |
|||
ignoresPersistentStateOnLaunch = "NO" |
|||
debugDocumentVersioning = "YES" |
|||
debugServiceExtension = "internal" |
|||
allowLocationSimulation = "YES"> |
|||
</LaunchAction> |
|||
<ProfileAction |
|||
buildConfiguration = "Release" |
|||
shouldUseLaunchSchemeArgsEnv = "YES" |
|||
savedToolIdentifier = "" |
|||
useCustomWorkingDirectory = "NO" |
|||
debugDocumentVersioning = "YES"> |
|||
</ProfileAction> |
|||
<AnalyzeAction |
|||
buildConfiguration = "Debug"> |
|||
</AnalyzeAction> |
|||
<ArchiveAction |
|||
buildConfiguration = "Release" |
|||
revealArchiveInOrganizer = "YES"> |
|||
</ArchiveAction> |
|||
</Scheme> |
@ -0,0 +1,78 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<Scheme |
|||
LastUpgradeVersion = "9999" |
|||
version = "1.3"> |
|||
<BuildAction |
|||
parallelizeBuildables = "YES" |
|||
buildImplicitDependencies = "YES"> |
|||
<BuildActionEntries> |
|||
<BuildActionEntry |
|||
buildForTesting = "YES" |
|||
buildForRunning = "YES" |
|||
buildForProfiling = "YES" |
|||
buildForArchiving = "YES" |
|||
buildForAnalyzing = "YES"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::psl-app" |
|||
BuildableName = "psl-app" |
|||
BlueprintName = "psl-app" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</BuildActionEntry> |
|||
</BuildActionEntries> |
|||
</BuildAction> |
|||
<TestAction |
|||
buildConfiguration = "Debug" |
|||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
|||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
|||
shouldUseLaunchSchemeArgsEnv = "YES"> |
|||
<Testables> |
|||
<TestableReference |
|||
skipped = "NO"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::SwiftPSLTests" |
|||
BuildableName = "SwiftPSLTests.xctest" |
|||
BlueprintName = "SwiftPSLTests" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</TestableReference> |
|||
</Testables> |
|||
</TestAction> |
|||
<LaunchAction |
|||
buildConfiguration = "Debug" |
|||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
|||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
|||
launchStyle = "0" |
|||
useCustomWorkingDirectory = "NO" |
|||
ignoresPersistentStateOnLaunch = "NO" |
|||
debugDocumentVersioning = "YES" |
|||
debugServiceExtension = "internal" |
|||
allowLocationSimulation = "YES"> |
|||
<BuildableProductRunnable |
|||
runnableDebuggingMode = "0"> |
|||
<BuildableReference |
|||
BuildableIdentifier = "primary" |
|||
BlueprintIdentifier = "SwiftPSL::psl-app" |
|||
BuildableName = "psl-app" |
|||
BlueprintName = "psl-app" |
|||
ReferencedContainer = "container:SwiftPSL.xcodeproj"> |
|||
</BuildableReference> |
|||
</BuildableProductRunnable> |
|||
</LaunchAction> |
|||
<ProfileAction |
|||
buildConfiguration = "Release" |
|||
shouldUseLaunchSchemeArgsEnv = "YES" |
|||
savedToolIdentifier = "" |
|||
useCustomWorkingDirectory = "NO" |
|||
debugDocumentVersioning = "YES"> |
|||
</ProfileAction> |
|||
<AnalyzeAction |
|||
buildConfiguration = "Debug"> |
|||
</AnalyzeAction> |
|||
<ArchiveAction |
|||
buildConfiguration = "Release" |
|||
revealArchiveInOrganizer = "YES"> |
|||
</ArchiveAction> |
|||
</Scheme> |
@ -0,0 +1,6 @@ |
|||
import XCTest |
|||
@testable import SwiftPSLTests |
|||
|
|||
XCTMain([ |
|||
testCase(SwiftPSLTests.allTests), |
|||
]) |
@ -0,0 +1,36 @@ |
|||
import XCTest |
|||
|
|||
@testable import SwiftPSL |
|||
|
|||
let psl = SwiftPSL() |
|||
|
|||
class CoreTests : XCTestCase { |
|||
|
|||
func test_isPublicSuffix() { |
|||
XCTAssertFalse(psl.isPublicSuffix("www.example.com")) |
|||
XCTAssertTrue(psl.isPublicSuffix("com.ar")) |
|||
XCTAssertFalse(psl.isPublicSuffix("www.com.ar")) |
|||
XCTAssertTrue(psl.isPublicSuffix("cc.ar.us")) |
|||
XCTAssertTrue(psl.isPublicSuffix(".cc.ar.us")) |
|||
XCTAssertFalse(psl.isPublicSuffix("www.cc.ar.us")) |
|||
XCTAssertFalse(psl.isPublicSuffix("www.ck")) |
|||
XCTAssertFalse(psl.isPublicSuffix("abc.www.ck")) |
|||
XCTAssertTrue(psl.isPublicSuffix("xxx.ck")) |
|||
XCTAssertFalse(psl.isPublicSuffix("www.xxx.ck")) |
|||
XCTAssertTrue(psl.isPublicSuffix("name")) |
|||
XCTAssertTrue(psl.isPublicSuffix(".name")) |
|||
XCTAssertFalse(psl.isPublicSuffix("hpsl.is.name")) |
|||
XCTAssertFalse(psl.isPublicSuffix(".hpsl.is.name")) |
|||
XCTAssertFalse(psl.isPublicSuffix("forgot.hpsl.is.name")) |
|||
XCTAssertFalse(psl.isPublicSuffix(".forgot.hpsl.is.name")) |
|||
XCTAssertFalse(psl.isPublicSuffix("whoever.hpsl.is.name")) |
|||
XCTAssertFalse(psl.isPublicSuffix("whoever.forgot.hpsl.is.name")) |
|||
XCTAssertTrue(psl.isPublicSuffix(".")) |
|||
XCTAssertTrue(psl.isPublicSuffix("")) |
|||
XCTAssertTrue(psl.isPublicSuffix("adfhoweirh")) |
|||
XCTAssertTrue(psl.isPublicSuffix("compute.amazonaws.com")) |
|||
XCTAssertTrue(psl.isPublicSuffix("y.compute.amazonaws.com")) |
|||
XCTAssertFalse(psl.isPublicSuffix("x.y.compute.amazonaws.com")) |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue