Skip to content

Commit

Permalink
Merge pull request #154 from Meiqia/develop
Browse files Browse the repository at this point in the history
3.3.7
  • Loading branch information
IanLuo authored Apr 7, 2017
2 parents 7a4b75c + 4439553 commit db3eb04
Show file tree
Hide file tree
Showing 25 changed files with 158 additions and 63 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ DerivedData
#
#Pods/
Meiqia-SDK-files/MeiQiaSDK.framework/_CodeSignature
fastlane/Appfile
Meiqia-SDK-Demo.app.dSYM.zip
12 changes: 8 additions & 4 deletions Meiqia-SDK-Demo/Meiqia-SDK-Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 67;
DEVELOPMENT_TEAM = H22N8T6DAX;
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)",
Expand All @@ -2409,6 +2410,7 @@
PROVISIONING_PROFILE = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VALID_ARCHS = "armv7 arm64";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
Expand All @@ -2422,6 +2424,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 67;
DEVELOPMENT_TEAM = H22N8T6DAX;
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)",
Expand All @@ -2440,6 +2443,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
VALID_ARCHS = "armv7 arm64";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
Expand Down Expand Up @@ -2509,11 +2513,11 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 67;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = T9YSHM8D7E;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 67;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)",
Expand Down Expand Up @@ -2546,11 +2550,11 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 67;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = T9YSHM8D7E;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_CURRENT_VERSION = 67;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(SRCROOT)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,32 @@
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "[MQMessage handleAccessoryWithKey:]"
moduleName = "">
<Locations>
<Location
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "-[MQMessage handleAccessoryWithKey:]"
moduleName = "Meiqia-SDK-Demo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ianluo/Documents/meiqia/project/SDK&amp;SDK_Demo/SDK/MeiqiaSDK_Ecoboost_iOS-me/MeiqiaSDK_Ecoboost_iOS/MeiQiaSDK/Entity/MQMessage.m"
timestampString = "511947779.582668"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "109"
endingLineNumber = "109"
offsetFromSymbolStart = "56">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia-SDK-Demo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
UIRemoteNotificationTypeSound];
#endif

#error 请填写您的美洽 AppKey
[MQManager initWithAppkey:@"请填写您的美洽 AppKey" completion:^(NSString *clientId, NSError *error) {
//#error 请填写您的美洽 AppKey
[MQManager initWithAppkey:@"" completion:^(NSString *clientId, NSError *error) {
if (!error) {
NSLog(@"美洽 SDK:初始化成功");
} else {
Expand Down
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia-SDK-Demo/DevelopViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ - (void)inputCustomizedId {
* @param customizedId 自定义id
*/
- (void)setClientOnlineWithCustomizedId:(NSString *)customizedId {
[MQManager initWithAppkey:@"b40eb2f8792ce17de91797f5bf9a439d" completion:^(NSString *clientId, NSError *error) {
[MQManager initWithAppkey:@"782a09d4b2e2d20a9eceef75fb45245e" completion:^(NSString *clientId, NSError *error) {
if (!error) {
MQChatViewManager *chatViewManager = [[MQChatViewManager alloc] init];
[chatViewManager setLoginCustomizedId:customizedId];
Expand Down Expand Up @@ -731,7 +731,7 @@ - (void)chatViewStyle5 {
MQChatViewManager *chatViewManager = [[MQChatViewManager alloc] init];
[chatViewManager enableTopPullRefresh:true];
[chatViewManager.chatViewStyle setPullRefreshColor:[UIColor redColor]];
// [chatViewManager.chatViewStyle setNavBarTintColor:[UIColor blueColor]];
[chatViewManager.chatViewStyle setNavBarTintColor:[UIColor redColor]];
// [chatViewManager.chatViewStyle setNavBarColor:[UIColor yellowColor]];

UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
Expand Down
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia-SDK-Demo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.3.6</string>
<string>3.3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>54</string>
<string>67</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
24 changes: 12 additions & 12 deletions Meiqia-SDK-Demo/Meiqia-SDK-Demo/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,20 @@ - (void)didTapBasicFunctionBtn:(UIButton *)button {
//基本功能 - 在线客服

MQChatViewManager *chatViewManager = [[MQChatViewManager alloc] init];
[chatViewManager.chatViewStyle setEnableOutgoingAvatar:NO];
[chatViewManager.chatViewStyle setEnableRoundAvatar:YES];

[chatViewManager setClientInfo:@{@"name":@"updated"} override:YES];
// [chatViewManager.chatViewStyle setEnableOutgoingAvatar:NO];
// [chatViewManager.chatViewStyle setEnableRoundAvatar:YES];
//
[chatViewManager setClientInfo:@{@"key" : @"value2"} override:YES];
[chatViewManager pushMQChatViewControllerInViewController:self];
// [chatViewManager setLoginCustomizedId:@"xxxxjjxjjx"];
// [chatViewManager setPreSendMessages:@[@"message1"]];
// [chatViewManager setScheduledAgentId:@"f60d269236231a6fa5c1b0d4848c4569"];
//[chatViewManager setScheduleLogicWithRule:MQChatScheduleRulesRedirectNone];
// [chatViewManager setLoginCustomizedId:@"10"];
//// [chatViewManager setPreSendMessages:@[@"message1"]];
// // [chatViewManager setScheduledAgentId:@"f60d269236231a6fa5c1b0d4848c4569"];
// //[chatViewManager setScheduleLogicWithRule:MQChatScheduleRulesRedirectNone];
// [chatViewManager.chatViewStyle setEnableOutgoingAvatar:YES];
[self removeIndecatorForView:basicFunctionBtn];

[chatViewManager setRecordMode:MQRecordModeDuckOther];
[chatViewManager setPlayMode:MQPlayModeMixWithOther];
// [self removeIndecatorForView:basicFunctionBtn];
//
// [chatViewManager setRecordMode:MQRecordModeDuckOther];
// [chatViewManager setPlayMode:MQPlayModeMixWithOther];
}

#pragma 开发者的高级功能,其中有调用美洽SDK的API接口
Expand Down
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia-SDK-DemoTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>3.3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>67</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia-SDK-DemoUITests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>3.3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>67</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Meiqia-SDK-Demo/Meiqia/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>3.3.7</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>67</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ - (void)handleClientOnlineWithRreceivedMessages:(NSArray *)receivedMessages
[self.delegate insertCellAtTopForModelCount: newCellCount];
[self scrollToButton];
[UIView setAnimationsEnabled:YES];
[self.delegate reloadChatTableView];

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self scrollToButton]; // some image may lead the table didn't reach bottom
Expand Down Expand Up @@ -939,8 +940,10 @@ - (void)getClientInfo {
}

[MQServiceToViewInterface downloadMediaWithUrlString:avatarPath progress:nil completion:^(NSData *mediaData, NSError *error) {
[MQChatViewConfig sharedConfig].outgoingDefaultAvatarImage = [UIImage imageWithData:mediaData];
[self refreshOutgoingAvatarWithImage:[MQChatViewConfig sharedConfig].outgoingDefaultAvatarImage];
if (mediaData) {
[MQChatViewConfig sharedConfig].outgoingDefaultAvatarImage = [UIImage imageWithData:mediaData];
[self refreshOutgoingAvatarWithImage:[MQChatViewConfig sharedConfig].outgoingDefaultAvatarImage];
}
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ - (MQBaseMessage *)createMessage:(MQMessage *)plainMessage {
MQBaseMessage *toMessage;
switch (plainMessage.contentType) {
case MQMessageContentTypeBot: {
// will be handled by MQBotMessageFactory
// was handled by MQBotMessageFactory
return nil;
}
case MQMessageContentTypeText: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ - (UIView *)evaluateView {
usefulButton.viewY = 0.5;
[usefulButton.titleLabel setFont:[UIFont systemFontOfSize:FONT_SIZE_EVALUATE_BUTTON]];
usefulButton.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleRightMargin;
[usefulButton setTitle:@"有用" forState:(UIControlStateNormal)];
[usefulButton setTitle:@"已解决" forState:(UIControlStateNormal)];
[usefulButton setTitleColor:[MQChatViewConfig sharedConfig].chatViewStyle.btnTextColor forState:(UIControlStateNormal)];
[usefulButton addTarget:self action:@selector(didTapPositive) forControlEvents:(UIControlEventTouchUpInside)];

Expand All @@ -263,7 +263,7 @@ - (UIView *)evaluateView {

UIButton *uselessButton = [UIButton new];
[uselessButton setTitleColor:[MQChatViewConfig sharedConfig].chatViewStyle.btnTextColor forState:(UIControlStateNormal)];
[uselessButton setTitle:@"没用" forState:(UIControlStateNormal)];
[uselessButton setTitle:@"未解决" forState:(UIControlStateNormal)];
[uselessButton.titleLabel setFont:[UIFont systemFontOfSize:FONT_SIZE_EVALUATE_BUTTON]];
[uselessButton addTarget:self action:@selector(didTapNegative) forControlEvents:(UIControlEventTouchUpInside)];
uselessButton.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ - (UIView *)evaluateView {
usefulButton.viewY = 0.5;
[usefulButton.titleLabel setFont:[UIFont systemFontOfSize:FONT_SIZE_EVALUATE_BUTTON]];
usefulButton.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleRightMargin;
[usefulButton setTitle:@"有用" forState:(UIControlStateNormal)];
[usefulButton setTitle:@"已解决" forState:(UIControlStateNormal)];
[usefulButton setTitleColor:[MQChatViewConfig sharedConfig].chatViewStyle.btnTextColor forState:(UIControlStateNormal)];
[usefulButton addTarget:self action:@selector(didTapPositive) forControlEvents:(UIControlEventTouchUpInside)];

Expand All @@ -247,7 +247,7 @@ - (UIView *)evaluateView {

UIButton *uselessButton = [UIButton new];
[uselessButton setTitleColor:[MQChatViewConfig sharedConfig].chatViewStyle.btnTextColor forState:(UIControlStateNormal)];
[uselessButton setTitle:@"没用" forState:(UIControlStateNormal)];
[uselessButton setTitle:@"未解决" forState:(UIControlStateNormal)];
[uselessButton.titleLabel setFont:[UIFont systemFontOfSize:FONT_SIZE_EVALUATE_BUTTON]];
[uselessButton addTarget:self action:@selector(didTapNegative) forControlEvents:(UIControlEventTouchUpInside)];
uselessButton.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin;
Expand Down
8 changes: 4 additions & 4 deletions Meiqia-SDK-files/MQChatViewController/Views/MQChatTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ - (void)tapChatTableView:(id)sender {
}

- (void)scrollToCellIndex:(NSInteger)index {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0];
[self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
// CGPoint tableViewOffset = self.contentOffset;
// self.contentOffset = tableViewOffset;
if ([self numberOfRowsInSection:0] > 0) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0];
[self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
}
}

- (BOOL)isTableViewScrolledToBottom {
Expand Down
2 changes: 1 addition & 1 deletion Meiqia-SDK-files/MeiQiaSDK.framework/Headers/MQManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import "MQPreChatData.h"


#define MQSDKVersion @"3.3.6"
#define MQSDKVersion @"3.3.7"

@protocol MQManagerDelegate <NSObject>

Expand Down
7 changes: 7 additions & 0 deletions Meiqia-SDK-files/MeiQiaSDK.framework/Headers/MQModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@

#import <Foundation/Foundation.h>

/// 使用 MQModel 的对象需要实现的方法
/// 映射的对象包含 3 种
/// 1. 本对象的属性
/// 2. 一个带有返回值,返回给指定属性的方法(结尾用 >:属性名)
/// 3. 一个没有返回值的方法(结尾用 >:)
@protocol MQMappable <NSObject>

/// 返回服务端 json 字段到本对象字段的映射
- (NSDictionary *)fromServerMapping;

/// 返回本对象字段到数据库字段的映射
- (NSDictionary *)toDBMapping;

@optional
Expand Down
Binary file modified Meiqia-SDK-files/MeiQiaSDK.framework/Info.plist
Binary file not shown.
Binary file modified Meiqia-SDK-files/MeiQiaSDK.framework/MeiQiaSDK
Binary file not shown.
4 changes: 2 additions & 2 deletions Meiqia.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

Pod::Spec.new do |s|
s.name = "Meiqia"
s.version = "3.3.5"
s.version = "3.3.7"
s.summary = "美洽官方 SDK for iOS"
s.description = "美洽官方的 iOS SDK"

s.homepage = "https://github.com/Meiqia/MeiqiaSDK-iOS"
s.license = 'MIT'
s.author = { "ijinmao" => "[email protected]" }
s.source = { :git => "https://github.com/Meiqia/MeiqiaSDK-iOS.git", :tag => "v3.3.5" }
s.source = { :git => "https://github.com/Meiqia/MeiqiaSDK-iOS.git", :tag => "v3.3.7" }
s.social_media_url = "https://meiqia.com"
s.documentation_url = "https://github.com/Meiqia/MeiqiaSDK-iOS/wiki"
s.platform = :ios, '7.0'
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,9 @@ VoiceConvert | N/A | AMR 和 WAV 语音格式的互转;没找到出处,哪

# 更新日志

**v3.3.7 2017 年 4 月 7 日**
* 修复当对话结束时,如果有自动邀请评价,并且没有设置结束对话语的时候,会导致结束失败。

**v3.3.6 2017 年 3 月 3 日**
* 替换下来刷新组件。
* 修复当对话结束邀请客服评价没有生效。
Expand Down
7 changes: 0 additions & 7 deletions fastlane/Appfile

This file was deleted.

34 changes: 25 additions & 9 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,32 @@ platform :ios do
desc "This will also make sure the profile is up to date"
lane :beta do
# match(type: "appstore") # more information: https://codesigning.guide
#gym(scheme: "Meiqia-SDK-Demo") # Build your app - more options available
#pilot
path = ipa(
project: Meiqia-SDK-Demo.xcodeproj,
configuration: release,
scheme: Meiqia-SDK-Demo,
clean: true

bump_up_build_number

gym(
scheme: "Meiqia-SDK-Demo",
project: "Meiqia-SDK-Demo/Meiqia-SDK-Demo.xcodeproj",

) # Build your app - more options available

upload_to_test_flight

end

lane :upload_to_test_flight do
ENV["DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS"] = "-t DAV"
pilot(
skip_submission: true
)
end

lane :bump_up_build_number do

increment_build_number(
build_number: ENV['CI_BUILD_ID'],
xcodeproj: 'Meiqia-SDK-Demo/Meiqia-SDK-Demo.xcodeproj'
)
sh "upload_pgy.sh path"
# You can also use other beta testing services here (run `fastlane actions`)
end

desc "Deploy a new version to the App Store"
Expand Down
Loading

0 comments on commit db3eb04

Please sign in to comment.