Skip to content

Commit b9dfe79

Browse files
committed
Merge branch 'feature/travis-ci' into develop
2 parents f910b15 + 21a1159 commit b9dfe79

File tree

7 files changed

+276
-3
lines changed

7 files changed

+276
-3
lines changed

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: objective-c
2+
osx_image: xcode7.3
3+
env:
4+
matrix:
5+
- VERSION=8.4
6+
- VERSION=latest
7+
cache:
8+
bundler: true
9+
directories:
10+
- vendor/bundle
11+
- Pods
12+
before_install:
13+
- export LANG=en_US.UTF-8
14+
install:
15+
- bundle install --without development --deployment --jobs=3 --retry=3
16+
- bundle exec pod install --no-repo-update
17+
script:
18+
- xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 6,OS=$VERSION" clean build | xcpretty -c
19+
- xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6,OS=$VERSION" clean test | xcpretty -c
20+
notifications:
21+
email: false

Example/Example.xcodeproj/project.pbxproj

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,29 @@
1010
154CE52873EEBDF8EF05A61F /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0DB1D3E89AB75183DB104E0 /* Pods_Example.framework */; };
1111
B548C5A71C8D55A8009D5AEE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */; };
1212
B548C5A91C8D6150009D5AEE /* ExampleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5A81C8D6150009D5AEE /* ExampleCell.swift */; };
13+
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */; };
1314
B5E9F8FF1C8D3B6E00443DC7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */; };
1415
B5E9F9011C8D3B6E00443DC7 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */; };
1516
B5E9F9061C8D3B6E00443DC7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9051C8D3B6E00443DC7 /* Assets.xcassets */; };
1617
B5E9F9091C8D3B6E00443DC7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5E9F9071C8D3B6E00443DC7 /* LaunchScreen.storyboard */; };
1718
/* End PBXBuildFile section */
1819

20+
/* Begin PBXContainerItemProxy section */
21+
B548C5C71C8E91B0009D5AEE /* PBXContainerItemProxy */ = {
22+
isa = PBXContainerItemProxy;
23+
containerPortal = B5E9F8F31C8D3B6E00443DC7 /* Project object */;
24+
proxyType = 1;
25+
remoteGlobalIDString = B5E9F8FA1C8D3B6E00443DC7;
26+
remoteInfo = Example;
27+
};
28+
/* End PBXContainerItemProxy section */
29+
1930
/* Begin PBXFileReference section */
2031
B548C5A61C8D55A8009D5AEE /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = "<group>"; };
2132
B548C5A81C8D6150009D5AEE /* ExampleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleCell.swift; sourceTree = "<group>"; };
33+
B548C5C21C8E91B0009D5AEE /* ICInputAccessoryUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ICInputAccessoryUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
34+
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICInputAccessoryUITests.swift; sourceTree = "<group>"; };
35+
B548C5C61C8E91B0009D5AEE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2236
B5E9F8FB1C8D3B6E00443DC7 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
2337
B5E9F8FE1C8D3B6E00443DC7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2438
B5E9F9001C8D3B6E00443DC7 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = "<group>"; };
@@ -31,6 +45,13 @@
3145
/* End PBXFileReference section */
3246

3347
/* Begin PBXFrameworksBuildPhase section */
48+
B548C5BF1C8E91B0009D5AEE /* Frameworks */ = {
49+
isa = PBXFrameworksBuildPhase;
50+
buildActionMask = 2147483647;
51+
files = (
52+
);
53+
runOnlyForDeploymentPostprocessing = 0;
54+
};
3455
B5E9F8F81C8D3B6E00443DC7 /* Frameworks */ = {
3556
isa = PBXFrameworksBuildPhase;
3657
buildActionMask = 2147483647;
@@ -59,11 +80,21 @@
5980
name = Frameworks;
6081
sourceTree = "<group>";
6182
};
83+
B548C5C31C8E91B0009D5AEE /* ICInputAccessoryUITests */ = {
84+
isa = PBXGroup;
85+
children = (
86+
B548C5C41C8E91B0009D5AEE /* ICInputAccessoryUITests.swift */,
87+
B548C5C61C8E91B0009D5AEE /* Info.plist */,
88+
);
89+
path = ICInputAccessoryUITests;
90+
sourceTree = "<group>";
91+
};
6292
B5E9F8F21C8D3B6E00443DC7 = {
6393
isa = PBXGroup;
6494
children = (
6595
B5E9F8FD1C8D3B6E00443DC7 /* Example */,
6696
5EEA7B5ACE2834D63EB8CB50 /* Frameworks */,
97+
B548C5C31C8E91B0009D5AEE /* ICInputAccessoryUITests */,
6798
2360BA848BFD7B4A1C83DD92 /* Pods */,
6899
B5E9F8FC1C8D3B6E00443DC7 /* Products */,
69100
);
@@ -73,6 +104,7 @@
73104
isa = PBXGroup;
74105
children = (
75106
B5E9F8FB1C8D3B6E00443DC7 /* Example.app */,
107+
B548C5C21C8E91B0009D5AEE /* ICInputAccessoryUITests.xctest */,
76108
);
77109
name = Products;
78110
sourceTree = "<group>";
@@ -94,6 +126,24 @@
94126
/* End PBXGroup section */
95127

96128
/* Begin PBXNativeTarget section */
129+
B548C5C11C8E91B0009D5AEE /* ICInputAccessoryUITests */ = {
130+
isa = PBXNativeTarget;
131+
buildConfigurationList = B548C5CB1C8E91B0009D5AEE /* Build configuration list for PBXNativeTarget "ICInputAccessoryUITests" */;
132+
buildPhases = (
133+
B548C5BE1C8E91B0009D5AEE /* Sources */,
134+
B548C5BF1C8E91B0009D5AEE /* Frameworks */,
135+
B548C5C01C8E91B0009D5AEE /* Resources */,
136+
);
137+
buildRules = (
138+
);
139+
dependencies = (
140+
B548C5C81C8E91B0009D5AEE /* PBXTargetDependency */,
141+
);
142+
name = ICInputAccessoryUITests;
143+
productName = ICInputAccessoryUITests;
144+
productReference = B548C5C21C8E91B0009D5AEE /* ICInputAccessoryUITests.xctest */;
145+
productType = "com.apple.product-type.bundle.ui-testing";
146+
};
97147
B5E9F8FA1C8D3B6E00443DC7 /* Example */ = {
98148
isa = PBXNativeTarget;
99149
buildConfigurationList = B5E9F90D1C8D3B6E00443DC7 /* Build configuration list for PBXNativeTarget "Example" */;
@@ -124,6 +174,10 @@
124174
LastUpgradeCheck = 0720;
125175
ORGANIZATIONNAME = "Polydice, Inc.";
126176
TargetAttributes = {
177+
B548C5C11C8E91B0009D5AEE = {
178+
CreatedOnToolsVersion = 7.2.1;
179+
TestTargetID = B5E9F8FA1C8D3B6E00443DC7;
180+
};
127181
B5E9F8FA1C8D3B6E00443DC7 = {
128182
CreatedOnToolsVersion = 7.2.1;
129183
};
@@ -143,11 +197,19 @@
143197
projectRoot = "";
144198
targets = (
145199
B5E9F8FA1C8D3B6E00443DC7 /* Example */,
200+
B548C5C11C8E91B0009D5AEE /* ICInputAccessoryUITests */,
146201
);
147202
};
148203
/* End PBXProject section */
149204

150205
/* Begin PBXResourcesBuildPhase section */
206+
B548C5C01C8E91B0009D5AEE /* Resources */ = {
207+
isa = PBXResourcesBuildPhase;
208+
buildActionMask = 2147483647;
209+
files = (
210+
);
211+
runOnlyForDeploymentPostprocessing = 0;
212+
};
151213
B5E9F8F91C8D3B6E00443DC7 /* Resources */ = {
152214
isa = PBXResourcesBuildPhase;
153215
buildActionMask = 2147483647;
@@ -209,6 +271,14 @@
209271
/* End PBXShellScriptBuildPhase section */
210272

211273
/* Begin PBXSourcesBuildPhase section */
274+
B548C5BE1C8E91B0009D5AEE /* Sources */ = {
275+
isa = PBXSourcesBuildPhase;
276+
buildActionMask = 2147483647;
277+
files = (
278+
B548C5C51C8E91B0009D5AEE /* ICInputAccessoryUITests.swift in Sources */,
279+
);
280+
runOnlyForDeploymentPostprocessing = 0;
281+
};
212282
B5E9F8F71C8D3B6E00443DC7 /* Sources */ = {
213283
isa = PBXSourcesBuildPhase;
214284
buildActionMask = 2147483647;
@@ -221,6 +291,14 @@
221291
};
222292
/* End PBXSourcesBuildPhase section */
223293

294+
/* Begin PBXTargetDependency section */
295+
B548C5C81C8E91B0009D5AEE /* PBXTargetDependency */ = {
296+
isa = PBXTargetDependency;
297+
target = B5E9F8FA1C8D3B6E00443DC7 /* Example */;
298+
targetProxy = B548C5C71C8E91B0009D5AEE /* PBXContainerItemProxy */;
299+
};
300+
/* End PBXTargetDependency section */
301+
224302
/* Begin PBXVariantGroup section */
225303
B548C5A51C8D55A8009D5AEE /* InfoPlist.strings */ = {
226304
isa = PBXVariantGroup;
@@ -241,6 +319,30 @@
241319
/* End PBXVariantGroup section */
242320

243321
/* Begin XCBuildConfiguration section */
322+
B548C5C91C8E91B0009D5AEE /* Debug */ = {
323+
isa = XCBuildConfiguration;
324+
buildSettings = {
325+
INFOPLIST_FILE = ICInputAccessoryUITests/Info.plist;
326+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
327+
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessoryUITests;
328+
PRODUCT_NAME = "$(TARGET_NAME)";
329+
TEST_TARGET_NAME = Example;
330+
USES_XCTRUNNER = YES;
331+
};
332+
name = Debug;
333+
};
334+
B548C5CA1C8E91B0009D5AEE /* Release */ = {
335+
isa = XCBuildConfiguration;
336+
buildSettings = {
337+
INFOPLIST_FILE = ICInputAccessoryUITests/Info.plist;
338+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
339+
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessoryUITests;
340+
PRODUCT_NAME = "$(TARGET_NAME)";
341+
TEST_TARGET_NAME = Example;
342+
USES_XCTRUNNER = YES;
343+
};
344+
name = Release;
345+
};
244346
B5E9F90B1C8D3B6E00443DC7 /* Debug */ = {
245347
isa = XCBuildConfiguration;
246348
buildSettings = {
@@ -351,6 +453,14 @@
351453
/* End XCBuildConfiguration section */
352454

353455
/* Begin XCConfigurationList section */
456+
B548C5CB1C8E91B0009D5AEE /* Build configuration list for PBXNativeTarget "ICInputAccessoryUITests" */ = {
457+
isa = XCConfigurationList;
458+
buildConfigurations = (
459+
B548C5C91C8E91B0009D5AEE /* Debug */,
460+
B548C5CA1C8E91B0009D5AEE /* Release */,
461+
);
462+
defaultConfigurationIsVisible = 0;
463+
};
354464
B5E9F8F61C8D3B6E00443DC7 /* Build configuration list for PBXProject "Example" */ = {
355465
isa = XCConfigurationList;
356466
buildConfigurations = (
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0720"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "B548C5C11C8E91B0009D5AEE"
20+
BuildableName = "ICInputAccessoryUITests.xctest"
21+
BlueprintName = "ICInputAccessoryUITests"
22+
ReferencedContainer = "container:Example.xcodeproj">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
<AdditionalOptions>
27+
</AdditionalOptions>
28+
</TestAction>
29+
<LaunchAction
30+
buildConfiguration = "Debug"
31+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
32+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
33+
launchStyle = "0"
34+
useCustomWorkingDirectory = "NO"
35+
ignoresPersistentStateOnLaunch = "NO"
36+
debugDocumentVersioning = "YES"
37+
debugServiceExtension = "internal"
38+
allowLocationSimulation = "YES">
39+
<AdditionalOptions>
40+
</AdditionalOptions>
41+
</LaunchAction>
42+
<ProfileAction
43+
buildConfiguration = "Release"
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
savedToolIdentifier = ""
46+
useCustomWorkingDirectory = "NO"
47+
debugDocumentVersioning = "YES">
48+
</ProfileAction>
49+
<AnalyzeAction
50+
buildConfiguration = "Debug">
51+
</AnalyzeAction>
52+
<ArchiveAction
53+
buildConfiguration = "Release"
54+
revealArchiveInOrganizer = "YES">
55+
</ArchiveAction>
56+
</Scheme>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
//
2+
// ICInputAccessoryUITests.swift
3+
// ICInputAccessoryUITests
4+
//
5+
// Created by Ben on 08/03/2016.
6+
// Copyright © 2016 Polydice, Inc.
7+
//
8+
// Permission is hereby granted, free of charge, to any person obtaining a copy
9+
// of this software and associated documentation files (the "Software"), to deal
10+
// in the Software without restriction, including without limitation the rights
11+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
// copies of the Software, and to permit persons to whom the Software is
13+
// furnished to do so, subject to the following conditions:
14+
//
15+
// The above copyright notice and this permission notice shall be included in all
16+
// copies or substantial portions of the Software.
17+
//
18+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
// SOFTWARE.
25+
//
26+
27+
import XCTest
28+
29+
class ICInputAccessoryUITests: XCTestCase {
30+
31+
override func setUp() {
32+
super.setUp()
33+
// In UI tests it is usually best to stop immediately when a failure occurs.
34+
continueAfterFailure = false
35+
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
36+
XCUIApplication().launch()
37+
}
38+
39+
override func tearDown() {
40+
// Put teardown code here. This method is called after the invocation of each test method in the class.
41+
super.tearDown()
42+
}
43+
44+
func testKeyboardDismissing() {
45+
let app = XCUIApplication()
46+
app.tables.cells.textFields["ICKeyboardDismissTextField"].tap()
47+
48+
let keyboardWindow = app.childrenMatchingType(.Window).elementBoundByIndex(1)
49+
let accessory = keyboardWindow.childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Other).elementBoundByIndex(0)
50+
accessory.childrenMatchingType(.Button).element.tap()
51+
}
52+
53+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
</dict>
24+
</plist>

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# ICInputAccessory
22

3+
A customized input accessory UI to dismiss keyboard.
4+
35
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
6+
[![Build Status](https://travis-ci.org/polydice/ICInputAccessory.svg?branch=develop)](https://travis-ci.org/polydice/ICInputAccessory)
47

58
## Installation
69

Rakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
task default: :build
22

33
desc "Build the framework target and the example project"
4-
task :build do
5-
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean build | xcpretty -c)
6-
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean build | xcpretty -c)
4+
task :build, [:os] do |t, args|
5+
version = args[:os] || "latest"
6+
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 5,OS=#{version}" clean build | xcpretty -c)
7+
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 5,OS=#{version}" clean build | xcpretty -c)
8+
end
9+
10+
desc "Run the UI tests in the example project"
11+
task :test do |t, args|
12+
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean test | xcpretty -c)
713
end

0 commit comments

Comments
 (0)