Skip to content

Commit d9d64fd

Browse files
committed
Plugin Support and Examples
1 parent 6c5f881 commit d9d64fd

23 files changed

+1759
-25
lines changed

Example/Podfile

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ platform :ios, '9.0'
22

33
target 'Example' do
44
use_frameworks!
5+
56
pod 'MessageInputBar', :path => '../'
7+
pod 'MessageInputBar/AttachmentManager', :path => '../'
8+
pod 'MessageInputBar/AutocompleteManager', :path => '../'
69

710
end

Example/Podfile.lock

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
PODS:
2-
- MessageInputBar (0.1.0)
2+
- MessageInputBar (0.1.0):
3+
- MessageInputBar/AttachmentManager (= 0.1.0)
4+
- MessageInputBar/AutocompleteManager (= 0.1.0)
5+
- MessageInputBar/AttachmentManager (0.1.0)
6+
- MessageInputBar/AutocompleteManager (0.1.0)
37

48
DEPENDENCIES:
59
- MessageInputBar (from `../`)
10+
- MessageInputBar/AttachmentManager (from `../`)
11+
- MessageInputBar/AutocompleteManager (from `../`)
612

713
EXTERNAL SOURCES:
814
MessageInputBar:
915
:path: "../"
1016

1117
SPEC CHECKSUMS:
12-
MessageInputBar: 3e04412ea8a386b41088012f8c9bd67e665a70c1
18+
MessageInputBar: 355bc391ea24f79b0eb47e278aa3a94165d63f53
1319

14-
PODFILE CHECKSUM: 226791787b6af407d42da6f779d208a2567eec5a
20+
PODFILE CHECKSUM: 59ceff645e2e779969697ee2390f43a1a67332f9
1521

1622
COCOAPODS: 1.5.2

MessageInputBar.podspec

+34-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
Pod::Spec.new do |s|
22

3-
# 1 - Specs
4-
s.platform = :ios
5-
s.name = 'MessageInputBar'
6-
s.summary = 'A powerful InputAccessoryView ideal for messaging applications.'
7-
s.source = { :git => 'https://github.com/MessageKit/MessageInputBar.git', :tag => s.version }
8-
s.homepage = 'https://github.com/MessageKit/MessageInputBar'
9-
s.requires_arc = true
10-
11-
# 2 - Version
12-
s.version = '0.1.0'
13-
s.pod_target_xcconfig = {
3+
# 1 - Specs
4+
s.platform = :ios
5+
s.name = 'MessageInputBar'
6+
s.summary = 'A powerful InputAccessoryView ideal for messaging applications.'
7+
s.source = { :git => 'https://github.com/MessageKit/MessageInputBar.git', :tag => s.version }
8+
s.homepage = 'https://github.com/MessageKit/MessageInputBar'
9+
s.requires_arc = true
10+
11+
# 2 - Version
12+
s.version = '0.1.0'
13+
s.pod_target_xcconfig = {
1414
"SWIFT_VERSION" => "4.0",
15-
}
16-
s.ios.deployment_target = '9.0'
15+
}
16+
s.ios.deployment_target = '9.0'
17+
18+
# 3 - License
19+
s.license = { :type => "MIT", :file => "LICENSE.md" }
20+
21+
# 4 - Author
22+
s.social_media_url = 'https://twitter.com/nathantannar4'
23+
s.author = { "Nathan Tannar" => "[email protected]" }
24+
25+
# 5 - Source Files
26+
s.default_subspecs = 'Core'
1727

18-
# 3 - License
19-
s.license = { :type => "MIT", :file => "LICENSE.md" }
28+
s.subspec 'Core' do |ss|
29+
ss.source_files = 'Sources/**/*.swift'
30+
end
2031

21-
# 4 - Author
22-
s.social_media_url = 'https://twitter.com/nathantannar4'
23-
s.author = { "Nathan Tannar" => "[email protected]" }
32+
s.subspec 'AttachmentManager' do |b|
33+
b.source_files = "Plugins/AttachmentManager/**/*.swift"
34+
b.dependency 'MessageInputBar/Core'
35+
end
2436

25-
# 5 - Source Files
26-
s.source_files = 'Sources/**/*.swift'
37+
s.subspec 'AutocompleteManager' do |c|
38+
c.source_files = "Plugins/AutocompleteManager/**/*.swift"
39+
c.dependency 'MessageInputBar/Core'
40+
end
2741

2842
end

MessageInputBar.xcodeproj/project.pbxproj

+140
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@
88

99
/* Begin PBXBuildFile section */
1010
380F6E7520C4A9A80095975F /* InputItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E7420C4A9A80095975F /* InputItem.swift */; };
11+
380F6E7C20C4BB0E0095975F /* InputPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E7B20C4BB0E0095975F /* InputPlugin.swift */; };
12+
380F6E8020C4BB950095975F /* AutocompleteManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E7E20C4BB950095975F /* AutocompleteManager.swift */; };
13+
380F6E8520C4BD480095975F /* AutocompleteCompletion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8420C4BD480095975F /* AutocompleteCompletion.swift */; };
14+
380F6E8720C4BD720095975F /* AutocompleteSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8620C4BD720095975F /* AutocompleteSession.swift */; };
15+
380F6E8A20C4BE5C0095975F /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8820C4BE5C0095975F /* String+Extensions.swift */; };
16+
380F6E8B20C4BE5C0095975F /* UITextView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8920C4BE5C0095975F /* UITextView+Extensions.swift */; };
17+
380F6E8E20C4BE6F0095975F /* AutocompleteManagerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8C20C4BE6E0095975F /* AutocompleteManagerDelegate.swift */; };
18+
380F6E8F20C4BE6F0095975F /* AutocompleteManagerDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E8D20C4BE6E0095975F /* AutocompleteManagerDataSource.swift */; };
19+
380F6E9420C4BE980095975F /* AutocompleteTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9320C4BE980095975F /* AutocompleteTableView.swift */; };
20+
380F6E9620C4BEA60095975F /* AutocompleteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9520C4BEA50095975F /* AutocompleteCell.swift */; };
21+
380F6E9920C4BF0E0095975F /* NSMutableAttributedString+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9820C4BF0D0095975F /* NSMutableAttributedString+Extensions.swift */; };
22+
380F6E9C20C4D84A0095975F /* AttachmentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9A20C4D84A0095975F /* AttachmentCell.swift */; };
23+
380F6E9D20C4D84A0095975F /* ImageAttachmentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9B20C4D84A0095975F /* ImageAttachmentCell.swift */; };
24+
380F6E9F20C4D8530095975F /* AttachmentCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6E9E20C4D8530095975F /* AttachmentCollectionView.swift */; };
25+
380F6EA220C4D85A0095975F /* AttachmentManagerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6EA020C4D85A0095975F /* AttachmentManagerDelegate.swift */; };
26+
380F6EA320C4D85A0095975F /* AttachmentManagerDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6EA120C4D85A0095975F /* AttachmentManagerDataSource.swift */; };
27+
380F6EA520C4D86D0095975F /* AttachmentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 380F6EA420C4D86D0095975F /* AttachmentManager.swift */; };
1128
386FB18620C496C1006A93BA /* MessageInputBar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 386FB17C20C496C1006A93BA /* MessageInputBar.framework */; };
1229
386FB18D20C496C1006A93BA /* MessageInputBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 386FB17F20C496C1006A93BA /* MessageInputBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
1330
386FB19C20C499B3006A93BA /* InputBarButtonItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FB19620C499B2006A93BA /* InputBarButtonItem.swift */; };
@@ -38,6 +55,23 @@
3855
380F6E7020C4A6FE0095975F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3956
380F6E7120C4A6FE0095975F /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
4057
380F6E7420C4A9A80095975F /* InputItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputItem.swift; sourceTree = "<group>"; };
58+
380F6E7B20C4BB0E0095975F /* InputPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputPlugin.swift; sourceTree = "<group>"; };
59+
380F6E7E20C4BB950095975F /* AutocompleteManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutocompleteManager.swift; sourceTree = "<group>"; };
60+
380F6E8420C4BD480095975F /* AutocompleteCompletion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutocompleteCompletion.swift; sourceTree = "<group>"; };
61+
380F6E8620C4BD720095975F /* AutocompleteSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutocompleteSession.swift; sourceTree = "<group>"; };
62+
380F6E8820C4BE5C0095975F /* String+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
63+
380F6E8920C4BE5C0095975F /* UITextView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextView+Extensions.swift"; sourceTree = "<group>"; };
64+
380F6E8C20C4BE6E0095975F /* AutocompleteManagerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutocompleteManagerDelegate.swift; sourceTree = "<group>"; };
65+
380F6E8D20C4BE6E0095975F /* AutocompleteManagerDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutocompleteManagerDataSource.swift; sourceTree = "<group>"; };
66+
380F6E9320C4BE980095975F /* AutocompleteTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutocompleteTableView.swift; sourceTree = "<group>"; };
67+
380F6E9520C4BEA50095975F /* AutocompleteCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutocompleteCell.swift; sourceTree = "<group>"; };
68+
380F6E9820C4BF0D0095975F /* NSMutableAttributedString+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSMutableAttributedString+Extensions.swift"; sourceTree = "<group>"; };
69+
380F6E9A20C4D84A0095975F /* AttachmentCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentCell.swift; sourceTree = "<group>"; };
70+
380F6E9B20C4D84A0095975F /* ImageAttachmentCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageAttachmentCell.swift; sourceTree = "<group>"; };
71+
380F6E9E20C4D8530095975F /* AttachmentCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentCollectionView.swift; sourceTree = "<group>"; };
72+
380F6EA020C4D85A0095975F /* AttachmentManagerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentManagerDelegate.swift; sourceTree = "<group>"; };
73+
380F6EA120C4D85A0095975F /* AttachmentManagerDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentManagerDataSource.swift; sourceTree = "<group>"; };
74+
380F6EA420C4D86D0095975F /* AttachmentManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttachmentManager.swift; sourceTree = "<group>"; };
4175
386FB17C20C496C1006A93BA /* MessageInputBar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MessageInputBar.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4276
386FB17F20C496C1006A93BA /* MessageInputBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageInputBar.h; sourceTree = "<group>"; };
4377
386FB18020C496C1006A93BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -79,6 +113,7 @@
79113
isa = PBXGroup;
80114
children = (
81115
380F6E7420C4A9A80095975F /* InputItem.swift */,
116+
380F6E7B20C4BB0E0095975F /* InputPlugin.swift */,
82117
386FB19920C499B3006A93BA /* MessageInputBarDelegate.swift */,
83118
);
84119
path = Protocols;
@@ -88,6 +123,7 @@
88123
isa = PBXGroup;
89124
children = (
90125
386FB1A420C49B39006A93BA /* UIView+Extensions.swift */,
126+
380F6E9820C4BF0D0095975F /* NSMutableAttributedString+Extensions.swift */,
91127
);
92128
path = Extensions;
93129
sourceTree = "<group>";
@@ -118,12 +154,99 @@
118154
path = Models;
119155
sourceTree = "<group>";
120156
};
157+
380F6E7D20C4BB730095975F /* Plugins */ = {
158+
isa = PBXGroup;
159+
children = (
160+
380F6E8220C4BBAD0095975F /* AttachmentManager */,
161+
380F6E8320C4BBB50095975F /* AutocompleteManager */,
162+
);
163+
path = Plugins;
164+
sourceTree = "<group>";
165+
};
166+
380F6E8220C4BBAD0095975F /* AttachmentManager */ = {
167+
isa = PBXGroup;
168+
children = (
169+
380F6EA420C4D86D0095975F /* AttachmentManager.swift */,
170+
380F6EA620C4D8750095975F /* Views */,
171+
380F6EA720C4D87C0095975F /* Protocols */,
172+
);
173+
path = AttachmentManager;
174+
sourceTree = "<group>";
175+
};
176+
380F6E8320C4BBB50095975F /* AutocompleteManager */ = {
177+
isa = PBXGroup;
178+
children = (
179+
380F6E7E20C4BB950095975F /* AutocompleteManager.swift */,
180+
380F6E9720C4BEA90095975F /* Views */,
181+
380F6E9220C4BE7E0095975F /* Models */,
182+
380F6E9120C4BE780095975F /* Protocols */,
183+
380F6E9020C4BE720095975F /* Extensions */,
184+
);
185+
path = AutocompleteManager;
186+
sourceTree = "<group>";
187+
};
188+
380F6E9020C4BE720095975F /* Extensions */ = {
189+
isa = PBXGroup;
190+
children = (
191+
380F6E8820C4BE5C0095975F /* String+Extensions.swift */,
192+
380F6E8920C4BE5C0095975F /* UITextView+Extensions.swift */,
193+
);
194+
path = Extensions;
195+
sourceTree = "<group>";
196+
};
197+
380F6E9120C4BE780095975F /* Protocols */ = {
198+
isa = PBXGroup;
199+
children = (
200+
380F6E8D20C4BE6E0095975F /* AutocompleteManagerDataSource.swift */,
201+
380F6E8C20C4BE6E0095975F /* AutocompleteManagerDelegate.swift */,
202+
);
203+
path = Protocols;
204+
sourceTree = "<group>";
205+
};
206+
380F6E9220C4BE7E0095975F /* Models */ = {
207+
isa = PBXGroup;
208+
children = (
209+
380F6E8420C4BD480095975F /* AutocompleteCompletion.swift */,
210+
380F6E8620C4BD720095975F /* AutocompleteSession.swift */,
211+
);
212+
path = Models;
213+
sourceTree = "<group>";
214+
};
215+
380F6E9720C4BEA90095975F /* Views */ = {
216+
isa = PBXGroup;
217+
children = (
218+
380F6E9520C4BEA50095975F /* AutocompleteCell.swift */,
219+
380F6E9320C4BE980095975F /* AutocompleteTableView.swift */,
220+
);
221+
path = Views;
222+
sourceTree = "<group>";
223+
};
224+
380F6EA620C4D8750095975F /* Views */ = {
225+
isa = PBXGroup;
226+
children = (
227+
380F6E9A20C4D84A0095975F /* AttachmentCell.swift */,
228+
380F6E9B20C4D84A0095975F /* ImageAttachmentCell.swift */,
229+
380F6E9E20C4D8530095975F /* AttachmentCollectionView.swift */,
230+
);
231+
path = Views;
232+
sourceTree = "<group>";
233+
};
234+
380F6EA720C4D87C0095975F /* Protocols */ = {
235+
isa = PBXGroup;
236+
children = (
237+
380F6EA020C4D85A0095975F /* AttachmentManagerDelegate.swift */,
238+
380F6EA120C4D85A0095975F /* AttachmentManagerDataSource.swift */,
239+
);
240+
path = Protocols;
241+
sourceTree = "<group>";
242+
};
121243
386FB17220C496C1006A93BA = {
122244
isa = PBXGroup;
123245
children = (
124246
380F6E7020C4A6FE0095975F /* README.md */,
125247
380F6E7120C4A6FE0095975F /* CHANGELOG.md */,
126248
380F6E6F20C4A6FE0095975F /* MessageInputBar.podspec */,
249+
380F6E7D20C4BB730095975F /* Plugins */,
127250
386FB17E20C496C1006A93BA /* Sources */,
128251
386FB18920C496C1006A93BA /* Tests */,
129252
386FB17D20C496C1006A93BA /* Products */,
@@ -274,15 +397,32 @@
274397
isa = PBXSourcesBuildPhase;
275398
buildActionMask = 2147483647;
276399
files = (
400+
380F6E8020C4BB950095975F /* AutocompleteManager.swift in Sources */,
401+
380F6EA320C4D85A0095975F /* AttachmentManagerDataSource.swift in Sources */,
402+
380F6EA220C4D85A0095975F /* AttachmentManagerDelegate.swift in Sources */,
403+
380F6E7C20C4BB0E0095975F /* InputPlugin.swift in Sources */,
277404
386FB19E20C499B3006A93BA /* InputTextView.swift in Sources */,
278405
386FB19F20C499B3006A93BA /* MessageInputBarDelegate.swift in Sources */,
279406
380F6E7520C4A9A80095975F /* InputItem.swift in Sources */,
407+
380F6E8720C4BD720095975F /* AutocompleteSession.swift in Sources */,
408+
380F6EA520C4D86D0095975F /* AttachmentManager.swift in Sources */,
409+
380F6E8F20C4BE6F0095975F /* AutocompleteManagerDataSource.swift in Sources */,
280410
386FB1A020C499B3006A93BA /* MessageInputBar.swift in Sources */,
281411
386FB1A120C499B3006A93BA /* SeparatorLine.swift in Sources */,
412+
380F6E9620C4BEA60095975F /* AutocompleteCell.swift in Sources */,
282413
386FB19D20C499B3006A93BA /* InputStackView.swift in Sources */,
414+
380F6E8A20C4BE5C0095975F /* String+Extensions.swift in Sources */,
415+
380F6E9D20C4D84A0095975F /* ImageAttachmentCell.swift in Sources */,
416+
380F6E9C20C4D84A0095975F /* AttachmentCell.swift in Sources */,
283417
386FB1A320C49A9B006A93BA /* NSConstraintLayoutSet.swift in Sources */,
418+
380F6E8520C4BD480095975F /* AutocompleteCompletion.swift in Sources */,
419+
380F6E9920C4BF0E0095975F /* NSMutableAttributedString+Extensions.swift in Sources */,
420+
380F6E8E20C4BE6F0095975F /* AutocompleteManagerDelegate.swift in Sources */,
284421
386FB1A520C49B39006A93BA /* UIView+Extensions.swift in Sources */,
422+
380F6E9420C4BE980095975F /* AutocompleteTableView.swift in Sources */,
423+
380F6E9F20C4D8530095975F /* AttachmentCollectionView.swift in Sources */,
285424
386FB19C20C499B3006A93BA /* InputBarButtonItem.swift in Sources */,
425+
380F6E8B20C4BE5C0095975F /* UITextView+Extensions.swift in Sources */,
286426
);
287427
runOnlyForDeploymentPostprocessing = 0;
288428
};

0 commit comments

Comments
 (0)