Skip to content

Commit

Permalink
Merge pull request #1 from zoyi/feature/typing
Browse files Browse the repository at this point in the history
Feature/typing
  • Loading branch information
intoxicated committed Nov 15, 2017
2 parents a061845 + c67ec02 commit 2903959
Show file tree
Hide file tree
Showing 28 changed files with 795 additions and 121 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log

### 2.2.7
### 2.3.0
#### Update
* Added live typing indicator
* Raised min os version to 9.0

### 2.2.6
#### Bug fixes
* Fixed scopes for objective-c
* Fixed symbol error for iOS 8
Expand Down
4 changes: 2 additions & 2 deletions CHPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'CHPlugin'
s.version = '2.2.7'
s.version = '2.3.0'
s.summary = 'Channel plugin for iOS'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
Expand All @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'SDK', :file => 'LICENSE' }
s.author = { 'ZOYI' => '[email protected]' }
s.source = { :git => 'https://github.com/zoyi/channel-plugin-ios.git', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'

s.source_files = 'CHPlugin/Source/**/*'
s.resources = 'CHPlugin/Assets/*'
Expand Down
28 changes: 18 additions & 10 deletions CHPlugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
14D2AA831E24AE07006FEE22 /* CHPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D2AA821E24AE07006FEE22 /* CHPluginTests.swift */; };
14D2AA851E24AE07006FEE22 /* CHPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D2AA771E24AE06006FEE22 /* CHPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
14DFAC681E4A189D00130119 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 14DFAC671E4A189D00130119 /* Images.xcassets */; };
222086B81FBAAD37002CFA88 /* CHAnimations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222086B71FBAAD37002CFA88 /* CHAnimations.swift */; };
222086BA1FBAB28D002CFA88 /* CHTypingEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 222086B91FBAB28D002CFA88 /* CHTypingEntity.swift */; };
22448B061FBA9C1900EDE528 /* TypingIndicatorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22448B051FBA9C1900EDE528 /* TypingIndicatorCell.swift */; };
22448B081FBA9D5800EDE528 /* CHMultiAvatarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22448B071FBA9D5800EDE528 /* CHMultiAvatarView.swift */; };
225B05F81E4ED913001DE109 /* WsServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 225B05F71E4ED913001DE109 /* WsServiceTests.swift */; };
225B05FA1E4ED9F5001DE109 /* ChannelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 225B05F91E4ED9F5001DE109 /* ChannelTests.swift */; };
225B05FE1E4EDA14001DE109 /* GuestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 225B05FD1E4EDA14001DE109 /* GuestTests.swift */; };
Expand Down Expand Up @@ -227,6 +231,10 @@
14D2AA821E24AE07006FEE22 /* CHPluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHPluginTests.swift; sourceTree = "<group>"; };
14D2AA841E24AE07006FEE22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
14DFAC671E4A189D00130119 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Assets/Images.xcassets; sourceTree = "<group>"; };
222086B71FBAAD37002CFA88 /* CHAnimations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHAnimations.swift; sourceTree = "<group>"; };
222086B91FBAB28D002CFA88 /* CHTypingEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHTypingEntity.swift; sourceTree = "<group>"; };
22448B051FBA9C1900EDE528 /* TypingIndicatorCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypingIndicatorCell.swift; sourceTree = "<group>"; };
22448B071FBA9D5800EDE528 /* CHMultiAvatarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHMultiAvatarView.swift; sourceTree = "<group>"; };
225B05F71E4ED913001DE109 /* WsServiceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WsServiceTests.swift; sourceTree = "<group>"; };
225B05F91E4ED9F5001DE109 /* ChannelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelTests.swift; sourceTree = "<group>"; };
225B05FB1E4EDA00001DE109 /* MessageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -634,6 +642,7 @@
659792B61FA7167A00840F6A /* CustomTransform.swift */,
659792B71FA7167A00840F6A /* LocalMessageFactory.swift */,
659792B81FA7167A00840F6A /* PrefStore.swift */,
222086B71FBAAD37002CFA88 /* CHAnimations.swift */,
);
name = Utils;
path = Source/Utils;
Expand Down Expand Up @@ -714,6 +723,7 @@
659792EB1FA7167B00840F6A /* DataTransferObject.swift */,
659792EC1FA7167B00840F6A /* ModelType.swift */,
6556A29B1FA821D300B80F4E /* CHError.swift */,
222086B91FBAB28D002CFA88 /* CHTypingEntity.swift */,
);
name = Models;
path = Source/Models;
Expand Down Expand Up @@ -778,7 +788,6 @@
6597930B1FA7167C00840F6A /* Cells */,
6597931B1FA7167C00840F6A /* ChatBannerView.swift */,
6597931C1FA7167C00840F6A /* ChatNotificationView */,
6597931E1FA7167C00840F6A /* ChatNotificationView.swift */,
6597931F1FA7167C00840F6A /* CHAvatar.swift */,
659793201FA7167C00840F6A /* CHMBubbleView.swift */,
659793211FA7167C00840F6A /* CHMFileView.swift */,
Expand All @@ -787,18 +796,17 @@
659793241FA7167C00840F6A /* CHPhoneField.swift */,
659793251FA7167C00840F6A /* CHTextField.swift */,
659793261FA7167C00840F6A /* CountryCodePickerView.swift */,
659793271FA7167C00840F6A /* DialogActionView.swift */,
659793281FA7167C00840F6A /* DialogView */,
6597932B1FA7167C00840F6A /* ErrorToastView.swift */,
6597932C1FA7167C00840F6A /* LauncherView */,
6597932F1FA7167C00840F6A /* MessageViews */,
659793301FA7167C00840F6A /* MultiAvatarView.swift */,
659793311FA7167C00840F6A /* NavigationItem.swift */,
659793321FA7167C00840F6A /* NewChatView.swift */,
659793331FA7167C00840F6A /* PhoneActionView.swift */,
659793341FA7167C00840F6A /* ProfileView */,
6597933A1FA7167C00840F6A /* TextActionView.swift */,
6597933B1FA7167C00840F6A /* UserChatsEmptyView.swift */,
22448B071FBA9D5800EDE528 /* CHMultiAvatarView.swift */,
);
name = Views;
path = Source/Views;
Expand All @@ -824,6 +832,7 @@
6597930F1FA7167C00840F6A /* MessageCell */,
659793121FA7167C00840F6A /* NewMessageDividerCell.swift */,
659793131FA7167C00840F6A /* SatisfactionCompleteCell.swift */,
22448B051FBA9C1900EDE528 /* TypingIndicatorCell.swift */,
659793141FA7167C00840F6A /* SatisfactionFeedbackCell.swift */,
659793151FA7167C00840F6A /* SwitchCell.swift */,
659793161FA7167C00840F6A /* TextInputCell.swift */,
Expand Down Expand Up @@ -854,6 +863,7 @@
6597931C1FA7167C00840F6A /* ChatNotificationView */ = {
isa = PBXGroup;
children = (
6597931E1FA7167C00840F6A /* ChatNotificationView.swift */,
6597931D1FA7167C00840F6A /* ChatNotificationViewModel.swift */,
);
path = ChatNotificationView;
Expand All @@ -863,6 +873,7 @@
isa = PBXGroup;
children = (
659793291FA7167C00840F6A /* DialogView.swift */,
659793271FA7167C00840F6A /* DialogActionView.swift */,
6597932A1FA7167C00840F6A /* DialogViewModel.swift */,
);
path = DialogView;
Expand All @@ -877,13 +888,6 @@
path = LauncherView;
sourceTree = "<group>";
};
6597932F1FA7167C00840F6A /* MessageViews */ = {
isa = PBXGroup;
children = (
);
path = MessageViews;
sourceTree = "<group>";
};
659793341FA7167C00840F6A /* ProfileView */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1242,6 +1246,7 @@
6597935E1FA716CB00840F6A /* CRToast+Extensions.swift in Sources */,
6597935F1FA716CB00840F6A /* Date+Extensions.swift in Sources */,
659793601FA716CB00840F6A /* String+BoundingRect.swift in Sources */,
22448B081FBA9D5800EDE528 /* CHMultiAvatarView.swift in Sources */,
659793611FA716CB00840F6A /* String+Utils.swift in Sources */,
659793621FA716CB00840F6A /* UIButton+Extensions.swift in Sources */,
659793631FA716CB00840F6A /* UIDevice+Extenions.swift in Sources */,
Expand Down Expand Up @@ -1280,6 +1285,7 @@
659793831FA716CB00840F6A /* DataTransferObject.swift in Sources */,
659793841FA716CB00840F6A /* ModelType.swift in Sources */,
659793861FA716CB00840F6A /* EventPromise.swift in Sources */,
222086B81FBAAD37002CFA88 /* CHAnimations.swift in Sources */,
659793871FA716CB00840F6A /* GuestPromise.swift in Sources */,
659793881FA716CB00840F6A /* PluginPromise.swift in Sources */,
659793891FA716CB00840F6A /* ScriptPromise.swift in Sources */,
Expand All @@ -1292,6 +1298,7 @@
659793901FA716CB00840F6A /* MessagesReducer.swift in Sources */,
659793911FA716CB00840F6A /* PluginReducer.swift in Sources */,
659793921FA716CB00840F6A /* PushReducer.swift in Sources */,
222086BA1FBAB28D002CFA88 /* CHTypingEntity.swift in Sources */,
659793931FA716CB00840F6A /* ScriptsReducer.swift in Sources */,
659793941FA716CB00840F6A /* SessionsReducer.swift in Sources */,
659793951FA716CB00840F6A /* UIReducer.swift in Sources */,
Expand All @@ -1310,6 +1317,7 @@
659793A21FA716CB00840F6A /* AvatarView.swift in Sources */,
659793A31FA716CB00840F6A /* Badge.swift in Sources */,
659793A41FA716CB00840F6A /* BaseButton.swift in Sources */,
22448B061FBA9C1900EDE528 /* TypingIndicatorCell.swift in Sources */,
659793A51FA716CB00840F6A /* BaseTableViewCell.swift in Sources */,
659793A61FA716CB00840F6A /* BaseView.swift in Sources */,
659793A71FA716CB00840F6A /* NeverClearView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CHPlugin.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>32</integer>
<integer>31</integer>
</dict>
</dict>
</dict>
Expand Down
Binary file not shown.
23 changes: 23 additions & 0 deletions CHPlugin/Assets/Images.xcassets/typing.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "typing.gif",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion CHPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.2</string>
<string>2.3.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSAppTransportSecurity</key>
Expand Down
10 changes: 5 additions & 5 deletions CHPlugin/Source/ChannelPlugin/ChannelPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public final class ChannelPlugin : NSObject {

}).disposed(by: disposeBeg)

WsService.sharedService.disconnect()
WsService.shared.disconnect()
mainStore.dispatch(CheckOutSuccess())
ChannelPlugin.isCheckedIn = false
}
Expand Down Expand Up @@ -460,15 +460,15 @@ public final class ChannelPlugin : NSObject {
return
}

WsService.sharedService.connect()
WsService.shared.connect()
mainStore.dispatch(CheckInSuccess(payload: data))
ChannelPlugin.isCheckedIn = true

if ChannelPlugin.enabledTrackDefaultEvent {
ChannelPlugin.track(name: "Checkin", properties: nil)
}

WsService.sharedService.ready()
WsService.shared.ready()
.subscribe(onNext: { _ in
subscriber.onNext(data)
subscriber.onCompleted()
Expand Down Expand Up @@ -629,13 +629,13 @@ extension ChannelPlugin {
}

@objc private class func disconnectWebsocket() {
WsService.sharedService.disconnect()
WsService.shared.disconnect()
}

@objc private class func connectWebsocket() {
guard ChannelPlugin.isCheckedIn == true else {
return
}
WsService.sharedService.connect()
WsService.shared.connect()
}
}
Loading

0 comments on commit 2903959

Please sign in to comment.