Initial commit
This commit is contained in:
commit
97af07a58d
|
@ -0,0 +1,90 @@
|
|||
|
||||
# Created by https://www.gitignore.io/api/macos,swift
|
||||
|
||||
### macOS ###
|
||||
*.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
|
||||
|
||||
### Swift ###
|
||||
# Xcode
|
||||
#
|
||||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
|
||||
|
||||
## 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 - Refactored to standalone file
|
||||
|
||||
# Carthage - Refactored to standalone file
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# End of https://www.gitignore.io/api/macos,swift
|
|
@ -0,0 +1 @@
|
|||
4.0
|
|
@ -0,0 +1,12 @@
|
|||
osx_image: xcode9.2
|
||||
language: objective-c
|
||||
# cache: cocoapods
|
||||
# podfile: Example/Podfile
|
||||
# before_install:
|
||||
# - gem install cocoapods # Since Travis is not always on latest version
|
||||
# - pod install --project-directory=Example
|
||||
# before_script:
|
||||
|
||||
script:
|
||||
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -project TMSwiftUtilities.xcodeproj -scheme TMSwiftUtilities-Package -sdk iphonesimulator11.2 -destination 'platform=iOS Simulator,name=iPhone X,OS=11.2' ONLY_ACTIVE_ARCH=NO | xcpretty
|
||||
- pod lib lint
|
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2018 417.72KI <417.72ki@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,28 @@
|
|||
// swift-tools-version:4.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "TMSwiftUtilities",
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "TMSwiftUtilities",
|
||||
targets: ["TMSwiftUtilities"]),
|
||||
],
|
||||
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: "TMSwiftUtilities",
|
||||
dependencies: []),
|
||||
.testTarget(
|
||||
name: "TMSwiftUtilitiesTests",
|
||||
dependencies: ["TMSwiftUtilities"]),
|
||||
]
|
||||
)
|
|
@ -0,0 +1,29 @@
|
|||
# TMSwiftUtilities
|
||||
|
||||
[](https://travis-ci.org/417-72KI/SwiftUtilities)
|
||||
[](http://cocoapods.org/pods/TMSwiftUtilities)
|
||||
[](http://cocoapods.org/pods/TMSwiftUtilities)
|
||||
[](http://cocoapods.org/pods/TMSwiftUtilities)
|
||||
|
||||
## Example
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
||||
|
||||
## Requirements
|
||||
|
||||
## Installation
|
||||
|
||||
TMSwiftUtilities is available through [CocoaPods](http://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
```ruby
|
||||
pod 'TMSwiftUtilities'
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
417.72KI, 417.72ki@gmail.com
|
||||
|
||||
## License
|
||||
|
||||
TMSwiftUtilities is available under the MIT license. See the LICENSE file for more info.
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// ArrayExtension.swift
|
||||
// TMSwiftUtilitiesPackageDescription
|
||||
//
|
||||
// Created by 417.72KI on 2018/04/05.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Array where Element: Hashable {
|
||||
|
||||
func unique() -> [Element] {
|
||||
var r = [Element]()
|
||||
for i in self {
|
||||
r += !r.contains(i) ? [i] : []
|
||||
}
|
||||
return r
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// UIColorExtension.swift
|
||||
// TMSwiftUtilitiesPackageDescription
|
||||
//
|
||||
// Created by 417.72KI on 2018/04/05.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIColor {
|
||||
|
||||
/// Initializes and returns a color object using red, green, blue and alpha values.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - r: red(0-255)
|
||||
/// - g: green(0-255)
|
||||
/// - b: blue(0-255)
|
||||
/// - a: alpha
|
||||
convenience init(r: Int, g: Int, b: Int, a: CGFloat) {
|
||||
self.init(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.0, alpha: a)
|
||||
}
|
||||
|
||||
/// Initializes and returns a color object using color code
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - decimal: hex color code
|
||||
/// - alpha: alpha
|
||||
convenience init(decimal: Int, alpha: CGFloat = 1.0) {
|
||||
self.init(r: ((decimal & 0xFF0000) >> 16), g: ((decimal & 0x00FF00) >> 8), b: ((decimal & 0x0000FF) >> 0), a: alpha)
|
||||
}
|
||||
|
||||
class func rgb(r: Int, g: Int, b: Int, a: CGFloat) -> UIColor {
|
||||
return UIColor(red: CGFloat(r) / 255.0, green: CGFloat(g) / 255.0, blue: CGFloat(b) / 255.0, alpha:a)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// StringExtension.swift
|
||||
// TMSwiftUtilitiesPackageDescription
|
||||
//
|
||||
// Created by 417.72KI on 2018/04/05.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension String {
|
||||
|
||||
/// returns `NSString.lastPathComponent` directly
|
||||
var lastPathComponent: String {
|
||||
return (self as NSString).lastPathComponent
|
||||
}
|
||||
|
||||
/// returns `NSString.pathExtension` directly
|
||||
var pathExtension: String {
|
||||
return (self as NSString).pathExtension
|
||||
}
|
||||
}
|
||||
|
||||
extension String{
|
||||
|
||||
/// その文字列がメールアドレスかどうか調べる
|
||||
func isEmailFormat() -> Bool {
|
||||
let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"
|
||||
let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
|
||||
let result = emailTest.evaluate(with: self)
|
||||
return result
|
||||
}
|
||||
|
||||
/// 半角英数と.のみ許可する
|
||||
func isUserCodeFormat() -> Bool {
|
||||
let userCodeRegEx = "[A-Z0-9a-z.]+"
|
||||
let userCodeTest = NSPredicate(format:"SELF MATCHES %@", userCodeRegEx)
|
||||
let result = userCodeTest.evaluate(with: self)
|
||||
return result
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
//
|
||||
// UIView+Utilities.swift
|
||||
// TMSwiftUtilitiesPackageDescription
|
||||
//
|
||||
// Created by 417.72KI on 2018/04/05.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIView {
|
||||
|
||||
static func view<T: UIView>() -> T {
|
||||
guard let view = Bundle.main.loadNibNamed(NSStringFromClass(self), owner: nil, options: nil)?.first as? T else {
|
||||
abort()
|
||||
}
|
||||
return view
|
||||
}
|
||||
|
||||
func resizeForAspectFit(width: CGFloat = CGFloat.greatestFiniteMagnitude, height: CGFloat = CGFloat.greatestFiniteMagnitude) {
|
||||
resizeForAspectFit(size: CGSize(width: width, height: height))
|
||||
}
|
||||
|
||||
func resizeForAspectFit(size: CGSize) {
|
||||
let widthRatio = size.width / self.frame.width
|
||||
let heightRatio = size.height / self.frame.height
|
||||
let ratio = (widthRatio < heightRatio) ? widthRatio : heightRatio
|
||||
if ratio == CGFloat.infinity {
|
||||
return
|
||||
}
|
||||
let resizedSize = CGSize(width: self.frame.size.width * ratio, height: self.frame.size.height * ratio)
|
||||
self.frame.size = resizedSize
|
||||
}
|
||||
|
||||
func toImage() -> UIImage {
|
||||
UIGraphicsBeginImageContextWithOptions(bounds.size, false, UIScreen.main.scale)
|
||||
drawHierarchy(in: self.bounds, afterScreenUpdates: true)
|
||||
let image = UIGraphicsGetImageFromCurrentImageContext()
|
||||
UIGraphicsEndImageContext()
|
||||
return image!
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TMSwiftUtilities'
|
||||
s.version = '0.1.0-alpha'
|
||||
s.summary = 'Frequently used functions in Swift.'
|
||||
s.homepage = 'https://github.com/417-72KI/SwiftUtilities'
|
||||
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { '417.72KI' => '417.72ki@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/417-72KI/SwiftUtilities.git', :tag => s.version.to_s }
|
||||
s.social_media_url = 'https://twitter.com/417_72ki'
|
||||
|
||||
s.ios.deployment_target = '9.0'
|
||||
s.source_files = 'Sources/TMSwiftUtilities/**/*'
|
||||
|
||||
# s.public_header_files = 'Pod/Classes/**/*.h'
|
||||
# s.frameworks = 'UIKit', 'MapKit'
|
||||
# s.dependency 'AFNetworking', '~> 2.3'
|
||||
end
|
|
@ -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,485 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesPackageTests::ProductTarget" /* TMSwiftUtilitiesPackageTests */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = OBJ_39 /* Build configuration list for PBXAggregateTarget "TMSwiftUtilitiesPackageTests" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
OBJ_42 /* PBXTargetDependency */,
|
||||
);
|
||||
name = TMSwiftUtilitiesPackageTests;
|
||||
productName = TMSwiftUtilitiesPackageTests;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
21CE9A98207627AC00A51A87 /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CE9A952076262600A51A87 /* StringExtension.swift */; };
|
||||
21CE9AB92077268C00A51A87 /* ArrayExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CE9AA4207724FF00A51A87 /* ArrayExtension.swift */; };
|
||||
21CE9ABA2077268C00A51A87 /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CE9A9A207724FE00A51A87 /* ColorExtension.swift */; };
|
||||
21CE9ABC2077268C00A51A87 /* UIView+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21CE9AA7207724FF00A51A87 /* UIView+Utilities.swift */; };
|
||||
OBJ_21 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; };
|
||||
OBJ_27 /* TMSwiftUtilitiesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* TMSwiftUtilitiesTests.swift */; };
|
||||
OBJ_29 /* TMSwiftUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "TMSwiftUtilities::TMSwiftUtilities::Product" /* TMSwiftUtilities.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
21CE9A93207625F500A51A87 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = OBJ_1 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = "TMSwiftUtilities::TMSwiftUtilities";
|
||||
remoteInfo = TMSwiftUtilities;
|
||||
};
|
||||
21CE9A94207625F500A51A87 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = OBJ_1 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = "TMSwiftUtilities::TMSwiftUtilitiesTests";
|
||||
remoteInfo = TMSwiftUtilitiesTests;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
21CE9A952076262600A51A87 /* StringExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtension.swift; sourceTree = "<group>"; };
|
||||
21CE9A9A207724FE00A51A87 /* ColorExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = "<group>"; };
|
||||
21CE9AA4207724FF00A51A87 /* ArrayExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArrayExtension.swift; sourceTree = "<group>"; };
|
||||
21CE9AA7207724FF00A51A87 /* UIView+Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Utilities.swift"; sourceTree = "<group>"; };
|
||||
OBJ_12 /* TMSwiftUtilitiesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TMSwiftUtilitiesTests.swift; sourceTree = "<group>"; };
|
||||
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
|
||||
"TMSwiftUtilities::TMSwiftUtilities::Product" /* TMSwiftUtilities.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TMSwiftUtilities.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesTests::Product" /* TMSwiftUtilitiesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = TMSwiftUtilitiesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
OBJ_28 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 0;
|
||||
files = (
|
||||
OBJ_29 /* TMSwiftUtilities.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
OBJ_37 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
21CE9ABD20776AD100A51A87 /* Util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21CE9AA7207724FF00A51A87 /* UIView+Utilities.swift */,
|
||||
);
|
||||
path = Util;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
21CE9ABE20776AD800A51A87 /* Extension */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21CE9A952076262600A51A87 /* StringExtension.swift */,
|
||||
21CE9AA4207724FF00A51A87 /* ArrayExtension.swift */,
|
||||
21CE9A9A207724FE00A51A87 /* ColorExtension.swift */,
|
||||
);
|
||||
path = Extension;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
OBJ_10 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
OBJ_11 /* TMSwiftUtilitiesTests */,
|
||||
);
|
||||
path = Tests;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
OBJ_11 /* TMSwiftUtilitiesTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
OBJ_12 /* TMSwiftUtilitiesTests.swift */,
|
||||
);
|
||||
name = TMSwiftUtilitiesTests;
|
||||
path = Tests/TMSwiftUtilitiesTests;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
OBJ_13 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesTests::Product" /* TMSwiftUtilitiesTests.xctest */,
|
||||
"TMSwiftUtilities::TMSwiftUtilities::Product" /* TMSwiftUtilities.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
OBJ_5 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
OBJ_6 /* Package.swift */,
|
||||
OBJ_7 /* Sources */,
|
||||
OBJ_10 /* Tests */,
|
||||
OBJ_13 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
OBJ_7 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
OBJ_8 /* TMSwiftUtilities */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
OBJ_8 /* TMSwiftUtilities */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21CE9ABE20776AD800A51A87 /* Extension */,
|
||||
21CE9ABD20776AD100A51A87 /* Util */,
|
||||
);
|
||||
name = TMSwiftUtilities;
|
||||
path = Sources/TMSwiftUtilities;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
"TMSwiftUtilities::SwiftPMPackageDescription" /* TMSwiftUtilitiesPackageDescription */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = OBJ_17 /* Build configuration list for PBXNativeTarget "TMSwiftUtilitiesPackageDescription" */;
|
||||
buildPhases = (
|
||||
OBJ_20 /* Sources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = TMSwiftUtilitiesPackageDescription;
|
||||
productName = TMSwiftUtilitiesPackageDescription;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
"TMSwiftUtilities::TMSwiftUtilities" /* TMSwiftUtilities */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = OBJ_32 /* Build configuration list for PBXNativeTarget "TMSwiftUtilities" */;
|
||||
buildPhases = (
|
||||
OBJ_35 /* Sources */,
|
||||
OBJ_37 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = TMSwiftUtilities;
|
||||
productName = TMSwiftUtilities;
|
||||
productReference = "TMSwiftUtilities::TMSwiftUtilities::Product" /* TMSwiftUtilities.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesTests" /* TMSwiftUtilitiesTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = OBJ_23 /* Build configuration list for PBXNativeTarget "TMSwiftUtilitiesTests" */;
|
||||
buildPhases = (
|
||||
OBJ_26 /* Sources */,
|
||||
OBJ_28 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
OBJ_30 /* PBXTargetDependency */,
|
||||
);
|
||||
name = TMSwiftUtilitiesTests;
|
||||
productName = TMSwiftUtilitiesTests;
|
||||
productReference = "TMSwiftUtilities::TMSwiftUtilitiesTests::Product" /* TMSwiftUtilitiesTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
OBJ_1 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 9999;
|
||||
};
|
||||
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "TMSwiftUtilities" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = OBJ_5;
|
||||
productRefGroup = OBJ_13 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
"TMSwiftUtilities::SwiftPMPackageDescription" /* TMSwiftUtilitiesPackageDescription */,
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesTests" /* TMSwiftUtilitiesTests */,
|
||||
"TMSwiftUtilities::TMSwiftUtilities" /* TMSwiftUtilities */,
|
||||
"TMSwiftUtilities::TMSwiftUtilitiesPackageTests::ProductTarget" /* TMSwiftUtilitiesPackageTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
OBJ_20 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 0;
|
||||
files = (
|
||||
OBJ_21 /* Package.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
OBJ_26 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 0;
|
||||
files = (
|
||||
OBJ_27 /* TMSwiftUtilitiesTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
OBJ_35 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 0;
|
||||
files = (
|
||||
21CE9ABA2077268C00A51A87 /* ColorExtension.swift in Sources */,
|
||||
21CE9A98207627AC00A51A87 /* StringExtension.swift in Sources */,
|
||||
21CE9AB92077268C00A51A87 /* ArrayExtension.swift in Sources */,
|
||||
21CE9ABC2077268C00A51A87 /* UIView+Utilities.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
OBJ_30 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = "TMSwiftUtilities::TMSwiftUtilities" /* TMSwiftUtilities */;
|
||||
targetProxy = 21CE9A93207625F500A51A87 /* PBXContainerItemProxy */;
|
||||
};
|
||||
OBJ_42 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = "TMSwiftUtilities::TMSwiftUtilitiesTests" /* TMSwiftUtilitiesTests */;
|
||||
targetProxy = 21CE9A94207625F500A51A87 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
OBJ_18 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD = /usr/bin/true;
|
||||
OTHER_SWIFT_FLAGS = "-swift-version 4 -I /Applications/Xcode 9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode 9.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
OBJ_19 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD = /usr/bin/true;
|
||||
OTHER_SWIFT_FLAGS = "-swift-version 4 -I /Applications/Xcode 9.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode 9.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
|
||||
SWIFT_VERSION = 4.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
OBJ_24 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = TMSwiftUtilities.xcodeproj/TMSwiftUtilitiesTests_Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGET_NAME = TMSwiftUtilitiesTests;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
OBJ_25 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = TMSwiftUtilities.xcodeproj/TMSwiftUtilitiesTests_Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGET_NAME = TMSwiftUtilitiesTests;
|
||||
};
|
||||
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;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
USE_HEADERMAP = NO;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
OBJ_33 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ENABLE_TESTABILITY = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = TMSwiftUtilities.xcodeproj/TMSwiftUtilities_Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = TMSwiftUtilities;
|
||||
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGET_NAME = TMSwiftUtilities;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
OBJ_34 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ENABLE_TESTABILITY = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = TMSwiftUtilities.xcodeproj/TMSwiftUtilities_Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = TMSwiftUtilities;
|
||||
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGET_NAME = TMSwiftUtilities;
|
||||
};
|
||||
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;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
OTHER_SWIFT_FLAGS = "-DXcode";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
USE_HEADERMAP = NO;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
OBJ_40 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
OBJ_41 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
OBJ_17 /* Build configuration list for PBXNativeTarget "TMSwiftUtilitiesPackageDescription" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
OBJ_18 /* Debug */,
|
||||
OBJ_19 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
OBJ_2 /* Build configuration list for PBXProject "TMSwiftUtilities" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
OBJ_3 /* Debug */,
|
||||
OBJ_4 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
OBJ_23 /* Build configuration list for PBXNativeTarget "TMSwiftUtilitiesTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
OBJ_24 /* Debug */,
|
||||
OBJ_25 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
OBJ_32 /* Build configuration list for PBXNativeTarget "TMSwiftUtilities" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
OBJ_33 /* Debug */,
|
||||
OBJ_34 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
OBJ_39 /* Build configuration list for PBXAggregateTarget "TMSwiftUtilitiesPackageTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
OBJ_40 /* Debug */,
|
||||
OBJ_41 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* 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,83 @@
|
|||
<?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 = "TMSwiftUtilities::TMSwiftUtilities"
|
||||
BuildableName = "TMSwiftUtilities.framework"
|
||||
BlueprintName = "TMSwiftUtilities"
|
||||
ReferencedContainer = "container:TMSwiftUtilities.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "TMSwiftUtilities::TMSwiftUtilitiesTests"
|
||||
BuildableName = "TMSwiftUtilitiesTests.xctest"
|
||||
BlueprintName = "TMSwiftUtilitiesTests"
|
||||
ReferencedContainer = "container:TMSwiftUtilities.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "TMSwiftUtilities::TMSwiftUtilities"
|
||||
BuildableName = "TMSwiftUtilities.framework"
|
||||
BlueprintName = "TMSwiftUtilities"
|
||||
ReferencedContainer = "container:TMSwiftUtilities.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</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,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>TMSwiftUtilities-Package.xcscheme</key>
|
||||
<dict></dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict></dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,6 @@
|
|||
import XCTest
|
||||
@testable import TMSwiftUtilitiesTests
|
||||
|
||||
XCTMain([
|
||||
testCase(TMSwiftUtilitiesTests.allTests),
|
||||
])
|
|
@ -0,0 +1,24 @@
|
|||
import XCTest
|
||||
@testable import TMSwiftUtilities
|
||||
|
||||
class TMSwiftUtilitiesTests: XCTestCase {
|
||||
|
||||
func test_StringExtension() {
|
||||
XCTAssertEqual("/var/lib/www".lastPathComponent, "www")
|
||||
XCTAssertEqual("~/Documents/hoge.txt".pathExtension, "txt")
|
||||
}
|
||||
|
||||
func test_ArrayExtension() {
|
||||
XCTAssertEqual(["a", "b", "c", "b"].unique(), ["a", "b", "c"])
|
||||
}
|
||||
|
||||
func test_ColorExtension() {
|
||||
XCTAssertEqual(["a", "b", "c", "b"].unique(), ["a", "b", "c"])
|
||||
}
|
||||
|
||||
static var allTests = [
|
||||
("StringExtension", test_StringExtension),
|
||||
("ArrayExtension", test_ArrayExtension),
|
||||
("ColorExtension", test_ColorExtension)
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue