Skip to content

Commit f910b15

Browse files
committed
Merge branch 'feature/carthage-support' into develop
2 parents b1b591e + a342c74 commit f910b15

File tree

8 files changed

+137
-15
lines changed

8 files changed

+137
-15
lines changed

Example/Example.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@
328328
buildSettings = {
329329
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
330330
INFOPLIST_FILE = Example/Info.plist;
331+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
331332
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
332333
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessoryExample;
333334
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -340,6 +341,7 @@
340341
buildSettings = {
341342
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
342343
INFOPLIST_FILE = Example/Info.plist;
344+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
343345
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
344346
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessoryExample;
345347
PRODUCT_NAME = "$(TARGET_NAME)";

Example/Example/ExampleCell.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ class ExampleCell: UITableViewCell {
3535
contentView.addSubview(displayingView)
3636
displayingView.translatesAutoresizingMaskIntoConstraints = false
3737

38-
displayingView.topAnchor.constraintEqualToAnchor(contentView.topAnchor).active = true
39-
displayingView.leftAnchor.constraintEqualToAnchor(contentView.leftAnchor).active = true
40-
displayingView.bottomAnchor.constraintEqualToAnchor(contentView.bottomAnchor).active = true
41-
displayingView.rightAnchor.constraintEqualToAnchor(contentView.rightAnchor).active = true
38+
if #available(iOS 9.0, *) {
39+
displayingView.topAnchor.constraintEqualToAnchor(contentView.topAnchor).active = true
40+
displayingView.leftAnchor.constraintEqualToAnchor(contentView.leftAnchor).active = true
41+
displayingView.bottomAnchor.constraintEqualToAnchor(contentView.bottomAnchor).active = true
42+
displayingView.rightAnchor.constraintEqualToAnchor(contentView.rightAnchor).active = true
43+
} else {
44+
let views = ["view": displayingView]
45+
contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[view]|", options: [], metrics: nil, views: views))
46+
contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[view]|", options: [], metrics: nil, views: views))
47+
}
4248
}
4349
}
4450
}

Example/Example/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>0.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

ICInputAccessory.xcodeproj/project.pbxproj

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88

99
/* Begin PBXBuildFile section */
1010
B548C5AD1C8D69A5009D5AEE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B548C5AC1C8D69A5009D5AEE /* Images.xcassets */; };
11+
B548C5EE1C8EB9E2009D5AEE /* ICKeyboardDismissTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B548C5ED1C8EB9E2009D5AEE /* ICKeyboardDismissTextField.swift */; };
1112
B56BC42E1C89A7EA00C20AD6 /* ICInputAccessory.h in Headers */ = {isa = PBXBuildFile; fileRef = B56BC42D1C89A7EA00C20AD6 /* ICInputAccessory.h */; settings = {ATTRIBUTES = (Public, ); }; };
1213
B56BC4361C89A8D800C20AD6 /* ICKeyboardDismissAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56BC4351C89A8D800C20AD6 /* ICKeyboardDismissAccessoryView.swift */; };
1314
/* End PBXBuildFile section */
1415

1516
/* Begin PBXFileReference section */
1617
B548C5AC1C8D69A5009D5AEE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Source/Images.xcassets; sourceTree = SOURCE_ROOT; };
18+
B548C5ED1C8EB9E2009D5AEE /* ICKeyboardDismissTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ICKeyboardDismissTextField.swift; path = Source/ICKeyboardDismissTextField.swift; sourceTree = SOURCE_ROOT; };
1719
B56BC42A1C89A7EA00C20AD6 /* ICInputAccessory.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ICInputAccessory.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1820
B56BC42D1C89A7EA00C20AD6 /* ICInputAccessory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ICInputAccessory.h; path = Source/ICInputAccessory.h; sourceTree = SOURCE_ROOT; };
1921
B56BC42F1C89A7EA00C20AD6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -52,6 +54,7 @@
5254
children = (
5355
B56BC42D1C89A7EA00C20AD6 /* ICInputAccessory.h */,
5456
B56BC4351C89A8D800C20AD6 /* ICKeyboardDismissAccessoryView.swift */,
57+
B548C5ED1C8EB9E2009D5AEE /* ICKeyboardDismissTextField.swift */,
5558
B548C5AC1C8D69A5009D5AEE /* Images.xcassets */,
5659
B56BC42F1C89A7EA00C20AD6 /* Info.plist */,
5760
);
@@ -72,9 +75,9 @@
7275
/* End PBXHeadersBuildPhase section */
7376

7477
/* Begin PBXNativeTarget section */
75-
B56BC4291C89A7EA00C20AD6 /* ICInputAccessory */ = {
78+
B56BC4291C89A7EA00C20AD6 /* ICInputAccessory-iOS */ = {
7679
isa = PBXNativeTarget;
77-
buildConfigurationList = B56BC4321C89A7EA00C20AD6 /* Build configuration list for PBXNativeTarget "ICInputAccessory" */;
80+
buildConfigurationList = B56BC4321C89A7EA00C20AD6 /* Build configuration list for PBXNativeTarget "ICInputAccessory-iOS" */;
7881
buildPhases = (
7982
B56BC4251C89A7EA00C20AD6 /* Sources */,
8083
B56BC4261C89A7EA00C20AD6 /* Frameworks */,
@@ -85,7 +88,7 @@
8588
);
8689
dependencies = (
8790
);
88-
name = ICInputAccessory;
91+
name = "ICInputAccessory-iOS";
8992
productName = ICInputAccessory;
9093
productReference = B56BC42A1C89A7EA00C20AD6 /* ICInputAccessory.framework */;
9194
productType = "com.apple.product-type.framework";
@@ -116,7 +119,7 @@
116119
projectDirPath = "";
117120
projectRoot = "";
118121
targets = (
119-
B56BC4291C89A7EA00C20AD6 /* ICInputAccessory */,
122+
B56BC4291C89A7EA00C20AD6 /* ICInputAccessory-iOS */,
120123
);
121124
};
122125
/* End PBXProject section */
@@ -138,6 +141,7 @@
138141
buildActionMask = 2147483647;
139142
files = (
140143
B56BC4361C89A8D800C20AD6 /* ICKeyboardDismissAccessoryView.swift in Sources */,
144+
B548C5EE1C8EB9E2009D5AEE /* ICKeyboardDismissTextField.swift in Sources */,
141145
);
142146
runOnlyForDeploymentPostprocessing = 0;
143147
};
@@ -243,9 +247,10 @@
243247
DYLIB_INSTALL_NAME_BASE = "@rpath";
244248
INFOPLIST_FILE = ICInputAccessory/Info.plist;
245249
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
250+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
246251
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
247252
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessory;
248-
PRODUCT_NAME = "$(TARGET_NAME)";
253+
PRODUCT_NAME = ICInputAccessory;
249254
SKIP_INSTALL = YES;
250255
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
251256
};
@@ -261,9 +266,10 @@
261266
DYLIB_INSTALL_NAME_BASE = "@rpath";
262267
INFOPLIST_FILE = ICInputAccessory/Info.plist;
263268
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
269+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
264270
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
265271
PRODUCT_BUNDLE_IDENTIFIER = com.polydice.ICInputAccessory;
266-
PRODUCT_NAME = "$(TARGET_NAME)";
272+
PRODUCT_NAME = ICInputAccessory;
267273
SKIP_INSTALL = YES;
268274
};
269275
name = Release;
@@ -280,7 +286,7 @@
280286
defaultConfigurationIsVisible = 0;
281287
defaultConfigurationName = Release;
282288
};
283-
B56BC4321C89A7EA00C20AD6 /* Build configuration list for PBXNativeTarget "ICInputAccessory" */ = {
289+
B56BC4321C89A7EA00C20AD6 /* Build configuration list for PBXNativeTarget "ICInputAccessory-iOS" */ = {
284290
isa = XCConfigurationList;
285291
buildConfigurations = (
286292
B56BC4331C89A7EA00C20AD6 /* Debug */,
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "B56BC4291C89A7EA00C20AD6"
18+
BuildableName = "ICInputAccessory.framework"
19+
BlueprintName = "ICInputAccessory-iOS"
20+
ReferencedContainer = "container:ICInputAccessory.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<AdditionalOptions>
33+
</AdditionalOptions>
34+
</TestAction>
35+
<LaunchAction
36+
buildConfiguration = "Debug"
37+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39+
launchStyle = "0"
40+
useCustomWorkingDirectory = "NO"
41+
ignoresPersistentStateOnLaunch = "NO"
42+
debugDocumentVersioning = "YES"
43+
debugServiceExtension = "internal"
44+
allowLocationSimulation = "YES">
45+
<MacroExpansion>
46+
<BuildableReference
47+
BuildableIdentifier = "primary"
48+
BlueprintIdentifier = "B56BC4291C89A7EA00C20AD6"
49+
BuildableName = "ICInputAccessory.framework"
50+
BlueprintName = "ICInputAccessory-iOS"
51+
ReferencedContainer = "container:ICInputAccessory.xcodeproj">
52+
</BuildableReference>
53+
</MacroExpansion>
54+
<AdditionalOptions>
55+
</AdditionalOptions>
56+
</LaunchAction>
57+
<ProfileAction
58+
buildConfiguration = "Release"
59+
shouldUseLaunchSchemeArgsEnv = "YES"
60+
savedToolIdentifier = ""
61+
useCustomWorkingDirectory = "NO"
62+
debugDocumentVersioning = "YES">
63+
<MacroExpansion>
64+
<BuildableReference
65+
BuildableIdentifier = "primary"
66+
BlueprintIdentifier = "B56BC4291C89A7EA00C20AD6"
67+
BuildableName = "ICInputAccessory.framework"
68+
BlueprintName = "ICInputAccessory-iOS"
69+
ReferencedContainer = "container:ICInputAccessory.xcodeproj">
70+
</BuildableReference>
71+
</MacroExpansion>
72+
</ProfileAction>
73+
<AnalyzeAction
74+
buildConfiguration = "Debug">
75+
</AnalyzeAction>
76+
<ArchiveAction
77+
buildConfiguration = "Release"
78+
revealArchiveInOrganizer = "YES">
79+
</ArchiveAction>
80+
</Scheme>

ICInputAccessory/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>0.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
# ICInputAccessory
1+
# ICInputAccessory
2+
3+
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
4+
5+
## Installation
6+
7+
### Install via [Carthage](https://github.com/Carthage/Carthage)
8+
9+
* Create a `Cartfile` with the following specification and run `carthage update`.
10+
11+
```
12+
github "polydice/ICInputAccessory"
13+
```
14+
15+
* On your application targets' **General** settings tab, in the **Linked Frameworks and Libraries** section, drag and drop `ICInputAccessory.framework` from the Carthage/Build directory.
16+
17+
* On your application targets’ **Build Phases** settings tab, click the **+** icon and choose **New Run Script Phase**. Create a Run Script with the following contents:
18+
19+
```
20+
/usr/local/bin/carthage copy-frameworks
21+
```
22+
23+
and add the following path to **Input Files**:
24+
25+
```
26+
$(SRCROOT)/Carthage/Build/iOS/ICInputAccessory.framework
27+
```
28+
29+
* For more information, please check out the [Carthage Documentation](https://github.com/Carthage/Carthage#if-youre-building-for-ios).

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ task default: :build
22

33
desc "Build the framework target and the example project"
44
task :build do
5-
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean build | xcpretty -c)
5+
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean build | xcpretty -c)
66
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6,OS=latest" clean build | xcpretty -c)
77
end

0 commit comments

Comments
 (0)