Skip to content
This repository has been archived by the owner on Oct 9, 2021. It is now read-only.

Commit

Permalink
Release SealTalk Demo version 1.3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
RongRobot committed Apr 12, 2019
1 parent 9721fed commit 92b53d2
Show file tree
Hide file tree
Showing 83 changed files with 153 additions and 1,709 deletions.
2 changes: 1 addition & 1 deletion ios-rongimdemo/RCDChangePasswordViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ - (void)setNavigationButton {
self.leftBtn = [[RCDUIBarButtonItem alloc] initWithLeftBarButton:RCDLocalizedString(@"settings") target:self action:@selector(clickBackBtn)];
self.navigationItem.leftBarButtonItem = self.leftBtn;

self.rightBtn = [[RCDUIBarButtonItem alloc] initWithbuttonTitle:RCDLocalizedString(@"done")
self.rightBtn = [[RCDUIBarButtonItem alloc] initWithbuttonTitle:RCDLocalizedString(@"save")

titleColor:[UIColor colorWithHexString:@"9fcdfd" alpha:1.0]
buttonFrame:CGRectMake(0, 0, 50, 30)
Expand Down
9 changes: 8 additions & 1 deletion ios-rongimdemo/RCDContactViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,13 @@ - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
[self.friendsTabelView reloadData];
}
self.searchFriendsBar.showsCancelButton = YES;
for(UIView *view in [[[self.searchFriendsBar subviews] objectAtIndex:0] subviews]) {
if([view isKindOfClass:[NSClassFromString(@"UINavigationButton") class]]) {
UIButton * cancel = (UIButton *)view;
[cancel setTitle:RCDLocalizedString(@"cancel") forState:UIControlStateNormal];
break;
}
}
return YES;
}

Expand Down Expand Up @@ -467,8 +474,8 @@ - (NSArray *)getAllFriendList {
- (void)sortAndRefreshWithList:(NSArray *)friendList {
dispatch_async(self.queue, ^{
self.resultDic = [RCDUtilities sortedArrayWithPinYinDic:friendList];
self.allFriendSectionDic = self.resultDic[@"infoDic"];
dispatch_sync(dispatch_get_main_queue(), ^{
self.allFriendSectionDic = self.resultDic[@"infoDic"];
[self.friendsTabelView reloadData];
});
});
Expand Down
8 changes: 3 additions & 5 deletions ios-rongimdemo/RCDCountryListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ @implementation RCDCountryListController
- (void)viewDidLoad {
[super viewDidLoad];
self.extendedLayoutIncludesOpaqueBars = YES;
self.edgesForExtendedLayout = UIRectEdgeNone;
self.automaticallyAdjustsScrollViewInsets = NO;

self.title = RCDLocalizedString(@"select_country");
[self.navigationController setNavigationBarHidden:NO animated:YES];
[self configCountryData];
Expand Down Expand Up @@ -182,13 +182,11 @@ - (void)updateSearchResultsForSearchController:(UISearchController *)searchContr

dispatch_async(dispatch_get_global_queue(0, 0), ^{
self.searchResultDic = [self sortedArrayWithPinYinDic:self.searchListArry];
self.allSearchCountryDic = self.searchResultDic[@"infoDic"];
dispatch_async(dispatch_get_main_queue(), ^{
self.allSearchCountryDic = self.searchResultDic[@"infoDic"];
[self.tableView reloadData];
});
});

[self.tableView reloadData];
}

#pragma mark - 属性初始化 -
Expand All @@ -198,7 +196,7 @@ - (UISearchController *)searchController {
_searchController.delegate = self;
_searchController.searchResultsUpdater = self;
//提醒字眼
_searchController.searchBar.placeholder = @"搜索";
_searchController.searchBar.placeholder = NSLocalizedStringFromTable(@"ToSearch", @"RongCloudKit", nil);
_searchController.searchBar.backgroundImage = [UIColor imageWithColor:[UIColor clearColor]];
[_searchController.searchBar setBackgroundColor:HEXCOLOR(0xE4E5E7)];
_searchController.dimsBackgroundDuringPresentation = NO;
Expand Down
2 changes: 1 addition & 1 deletion ios-rongimdemo/RCDMeCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ - (void)addRightLabel {
UIImageView *rightArrow = self.rightArrow;
NSDictionary *views = NSDictionaryOfVariableBindings(leftLabel, leftImageView, rightLabel, rightArrow);
[self.contentView addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @"H:|-10-[leftImageView(width)]-8-[leftLabel]-(>=10)-[rightLabel]-13-[rightArrow(8)]-10-|" options:0 metrics:@{ @"width" : @(self.leftImageView.frame.size.width) } views:views]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rightLabel(12)]"
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rightLabel(21)]"
options:0
metrics:nil
views:views]];
Expand Down
66 changes: 43 additions & 23 deletions ios-rongimdemo/RCDMessageNoDisturbSettingController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ - (void)getNoDisturbStaus {
NSString *endTime = [formatterE stringFromDate:endDate];
if (spansMin > 0) {
dispatch_async(dispatch_get_main_queue(), ^{
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:0 inSection:1];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:1 inSection:1];
UITableViewCell *startCell = [weakSelf.tableView cellForRowAtIndexPath:startIndexPath];
UITableViewCell *endCell = [weakSelf.tableView cellForRowAtIndexPath:endIndexPath];
weakSelf.swch.on = YES;
Expand All @@ -56,8 +56,8 @@ - (void)getNoDisturbStaus {
objectForKey:[NSString stringWithFormat:@"startTime_%@", [RCIM sharedRCIM].currentUserInfo.userId]];
NSString *endT = [UserDefaults
objectForKey:[NSString stringWithFormat:@"endTime_%@", [RCIM sharedRCIM].currentUserInfo.userId]];
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:0 inSection:1];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:1 inSection:1];
UITableViewCell *startCell = [weakSelf.tableView cellForRowAtIndexPath:startIndexPath];
UITableViewCell *endCell = [weakSelf.tableView cellForRowAtIndexPath:endIndexPath];
if (startT && endT) {
Expand All @@ -77,8 +77,8 @@ - (void)getNoDisturbStaus {
objectForKey:[NSString stringWithFormat:@"startTime_%@", [RCIM sharedRCIM].currentUserInfo.userId]];
NSString *endT = [UserDefaults
objectForKey:[NSString stringWithFormat:@"endTime_%@", [RCIM sharedRCIM].currentUserInfo.userId]];
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
NSIndexPath *startIndexPath = [NSIndexPath indexPathForRow:0 inSection:1];
NSIndexPath *endIndexPath = [NSIndexPath indexPathForRow:1 inSection:1];
UITableViewCell *startCell = [weakSelf.tableView cellForRowAtIndexPath:startIndexPath];
UITableViewCell *endCell = [weakSelf.tableView cellForRowAtIndexPath:endIndexPath];
if (startT && endT) {
Expand Down Expand Up @@ -112,12 +112,12 @@ - (void)viewDidLoad {
action:@selector(datePickerValueChanged:)
forControlEvents:UIControlEventValueChanged];
self.tableView.tableFooterView = [UIView new];
self.startIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
self.startIndexPath = [NSIndexPath indexPathForRow:0 inSection:1];
[self.tableView selectRowAtIndexPath:self.startIndexPath
animated:YES
scrollPosition:UITableViewScrollPositionMiddle];
self.tableView.cellLayoutMarginsFollowReadableWidth = NO;
self.endIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
self.endIndexPath = [NSIndexPath indexPathForRow:1 inSection:1];
}

- (void)viewDidLayoutSubviews {
Expand Down Expand Up @@ -177,17 +177,44 @@ - (void)didReceiveMemoryWarning {

#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
return 3;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0)
return 3;
return 1;
else if (section == 1) {
return 2;
}
return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
if (section == 1) {
return 70;
}
return 0.01;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {

if (section == 1) {
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 0)];
view.backgroundColor = self.tableView.backgroundColor;
UILabel *label = [[UILabel alloc] init];
label.frame = CGRectMake(20, -5, view.frame.size.width - 40, 70);
label.numberOfLines = 0;
label.font = [UIFont systemFontOfSize:14];
label.textColor = [UIColor grayColor];
label.text = RCDLocalizedString(@"mute_notifications_prompt");
[view addSubview:label];
return view;
}
return nil;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
if (indexPath.section == 0 || indexPath.section == 1) {
return 44;
}
return 200;
Expand All @@ -200,23 +227,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"MyCellReuseIdentifier"];
}
if (indexPath.section == 0) {
switch (indexPath.row) {
case 0: {
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textLabel.text = RCDLocalizedString(@"Turn_on_message_do_not_disturb");
[_swch setFrame:CGRectMake(self.view.frame.size.width - _swch.frame.size.width - 15, 6, 0, 0)];
[_swch addTarget:self action:@selector(setSwitchState:) forControlEvents:UIControlEventValueChanged];
[cell.contentView addSubview:_swch];
} break;
case 1: {
} else if (indexPath.section == 1) {
if (indexPath.row == 0) {
cell.textLabel.text = RCDLocalizedString(@"Start_time");
} break;
case 2: {
cell.textLabel.text = RCDLocalizedString(@"end_time")
;
} break;
default:
break;
} else {
cell.textLabel.text = RCDLocalizedString(@"end_time");
}
} else {
cell.selectionStyle = UITableViewCellSelectionStyleNone;
Expand Down Expand Up @@ -247,7 +267,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[self.tableView selectRowAtIndexPath:_indexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
}

if ((indexPath.section == 0 && indexPath.row == 1) || (indexPath.section == 0 && indexPath.row == 2)) {
if (indexPath.section == 1) {
_indexPath = indexPath;
}
}
Expand Down
8 changes: 4 additions & 4 deletions ios-rongimdemo/RCDPersonDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ - (void)setLayoutIsHaveRemarks:(BOOL)isHaveRemarks {
- (void)setPhoneNumber {
self.phoneNumberLabel.textColor = [UIColor colorWithHexString:@"999999" alpha:1.f];
self.phoneNumberLabel.font = [UIFont systemFontOfSize:14.f];
self.phoneNumberLabel.text = @"手机号: --";
self.phoneNumberLabel.text = [NSString stringWithFormat:@"%@: --", RCDLocalizedString(@"mobile_number")];
self.phoneNumberLabel.userInteractionEnabled = YES;
UITapGestureRecognizer *clickPhoneNumber =
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doCall:)];
Expand All @@ -633,14 +633,14 @@ - (void)setPhoneNumber {
if ([response[@"code"] integerValue] == 200) {
NSDictionary *dic = response[@"result"];
NSDictionary *infoDic = dic[@"user"];
self.phoneNumberLabel.text =
[NSString stringWithFormat:@"手机号: %@", [infoDic objectForKey:@"phone"]];
self.phoneNumberLabel.text = [NSString stringWithFormat:@"%@: %@", RCDLocalizedString(@"mobile_number"), [infoDic objectForKey:@"phone"]];
NSUInteger textLength = RCDLocalizedString(@"mobile_number").length + 1;
//创建 NSMutableAttributedString
NSMutableAttributedString *attributedStr =
[[NSMutableAttributedString alloc] initWithString:self.phoneNumberLabel.text];
[attributedStr addAttribute:NSForegroundColorAttributeName
value:[UIColor colorWithHexString:@"0099ff" alpha:1.f]
range:NSMakeRange(5, self.phoneNumberLabel.text.length-5)];
range:NSMakeRange(textLength, self.phoneNumberLabel.text.length-textLength)];
self.phoneNumberLabel.attributedText = attributedStr;
self.phonenumber =
[NSString stringWithFormat:@"%@", [infoDic objectForKey:@"phone"]];
Expand Down
14 changes: 6 additions & 8 deletions ios-rongimdemo/RCloudMessage.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@
F836AB0E1C2262C400A1A5D2 /* RCDTestMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = F836AB0D1C2262C400A1A5D2 /* RCDTestMessage.m */; };
F836AB151C226A7F00A1A5D2 /* RCDTestMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F836AB141C226A7F00A1A5D2 /* RCDTestMessageCell.m */; };
F880EA791D0808B300FD5CC4 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F880EA781D0808B300FD5CC4 /* VideoToolbox.framework */; };
F894EC391DF7E47600EFD084 /* BQMM.bundle in Resources */ = {isa = PBXBuildFile; fileRef = F894EC371DF7E47600EFD084 /* BQMM.bundle */; };
F894EC3A1DF7E47600EFD084 /* BQMMRongCloudExt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F894EC381DF7E47600EFD084 /* BQMMRongCloudExt.framework */; };
F8AD4A551CAE56A4006C1CBB /* PushKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8AD4A541CAE56A4006C1CBB /* PushKit.framework */; };
F8AD4A571CAE5702006C1CBB /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F8AD4A561CAE5702006C1CBB /* libicucore.tbd */; };
F8AD4A5B1CAE5782006C1CBB /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8AD4A5A1CAE5782006C1CBB /* CoreMotion.framework */; };
Expand Down Expand Up @@ -1067,7 +1065,6 @@
A68AFAF21CCF0B1600F16B3D /* RongCallLib.framework in Frameworks */,
A6EFABA71BB0EDFB007E9D67 /* libc++.tbd in Frameworks */,
A6EFABA51BB0EDE1007E9D67 /* libsqlite3.tbd in Frameworks */,
F894EC3A1DF7E47600EFD084 /* BQMMRongCloudExt.framework in Frameworks */,
A6EFABA11BB0EDAC007E9D67 /* libxml2.tbd in Frameworks */,
2E29FF3D1DC1BE8400AF2DF0 /* AlipaySDK.framework in Frameworks */,
F821B7F51BE75BFD00F0D14C /* libMobClickLibrary.a in Frameworks */,
Expand All @@ -1080,6 +1077,7 @@
F8B7DBD21BAC189700E9F9BD /* libopencore-amrnb.a in Frameworks */,
1D5551FC223A30F700887BD0 /* libvo-amrwbenc.a in Frameworks */,
E4C330FE1A0C725200E31B9A /* CoreVideo.framework in Frameworks */,
1DA88D982135119700F4F1F9 /* RongSticker.framework in Frameworks */,
2E7A36E41E03A876005231BE /* JrmfWalletKit.framework in Frameworks */,
27C42EEC1DE30637003E2306 /* iflyMSC.framework in Frameworks */,
E4C330F81A0C723A00E31B9A /* CoreAudio.framework in Frameworks */,
Expand Down Expand Up @@ -2508,6 +2506,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
"zh-Hans",
Expand Down Expand Up @@ -2559,7 +2558,6 @@
buildActionMask = 2147483647;
files = (
178998221F6244FA00FC44D3 /* sms-received.caf in Resources */,
F894EC391DF7E47600EFD084 /* BQMM.bundle in Resources */,
2E29FF3C1DC1BE8400AF2DF0 /* AlipaySDK.bundle in Resources */,
27C42EED1DE30637003E2306 /* RongCloudiFly.bundle in Resources */,
2E7A36E11E03A876005231BE /* JResource.bundle in Resources */,
Expand Down Expand Up @@ -3142,7 +3140,7 @@
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/RCloudMessage/Utilities/UMAnalytics",
);
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode";
OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -3298,7 +3296,7 @@
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/RCloudMessage/Utilities/UMAnalytics",
);
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode";
OTHER_CODE_SIGN_FLAGS = "";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -3613,7 +3611,7 @@
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/RCloudMessage/Utilities/UMAnalytics",
);
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode";
OTHER_LDFLAGS = (
"-ObjC",
Expand Down Expand Up @@ -3665,7 +3663,7 @@
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/RCloudMessage/Utilities/UMAnalytics",
);
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode";
OTHER_LDFLAGS = (
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion ios-rongimdemo/RCloudMessage/AFHttpTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ + (void)requestWihtMethod:(RequestMethodType)methodType

if (cookieString)
[mgr.requestSerializer setValue:cookieString forHTTPHeaderField:@"Cookie"];

[mgr.requestSerializer setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
switch (methodType) {
case RequestMethodTypeGet: {
Expand Down
3 changes: 1 addition & 2 deletions ios-rongimdemo/RCloudMessage/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#import "RCWKNotifier.h"
#import "RCWKRequestHandler.h"
#import "UIColor+RCColor.h"
#import "RCDCountry.h"
#import "RCDBuglyManager.h"

#define RONGCLOUD_IM_APPKEY @"n19jmcy59f1q9" // online key
#import "RCDCountry.h"

//#define RONGCLOUD_IM_APPKEY @"c9kqb3rdkbb8j" // pre key
//#define RONGCLOUD_IM_APPKEY @"e0x9wycfx7flq" // offline key
Expand All @@ -46,7 +46,6 @@
: NO)

@interface AppDelegate () <RCWKAppInfoProvider>

@end

@implementation AppDelegate
Expand Down
6 changes: 3 additions & 3 deletions ios-rongimdemo/RCloudMessage/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.9.13 Dev</string>
<string>2.9.14 Stable</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -42,7 +42,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>201903292344</string>
<string>201904111846</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand All @@ -63,7 +63,7 @@
<key>NSPhotoLibraryAddUsageDescription</key>
<string>访问相册</string>
<key>SealTalk Version</key>
<string>1.3.14</string>
<string>1.3.16</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
Expand Down
6 changes: 4 additions & 2 deletions ios-rongimdemo/RCloudMessage/RCDAddressBookTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ - (void)initSubviews {
//“接受”按钮
CGFloat acceptBtnWidth = rightLabelWidth - 15;
CGFloat acceptBtnHeight = rightLabelHeight - 8;
CGFloat acceptBtnX = rightLabelX;
CGFloat acceptBtnX = cellWidth - acceptBtnWidth - 8;

CGFloat acceptBtnY = rightLabelY + 5;
_acceptBtn = [[UIButton alloc] initWithFrame:CGRectMake(acceptBtnX, acceptBtnY, acceptBtnWidth, acceptBtnHeight)];
_acceptBtn.tag = self.tag;
Expand Down Expand Up @@ -103,7 +104,8 @@ - (void)layoutSubviews {
self.rightLabel.frame = rightLabelFrame;

CGRect acceptFrame = self.acceptBtn.frame;
acceptFrame.origin.x = rightLabelFrame.origin.x;
acceptFrame.origin.x = cellWidth - acceptFrame.size.width - 8;

self.acceptBtn.frame = acceptFrame;
}

Expand Down
Loading

0 comments on commit 92b53d2

Please sign in to comment.