Commit 44cb3ab6 by ludi

Merge branch 'feature/私讯+座驾体系' of http://git.yabolive.net:88/pidan/FuSiLive into feature/私讯+座驾体系

parents 630f1579 ed847977
...@@ -305,8 +305,6 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7"; ...@@ -305,8 +305,6 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)token { - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)token {
[GeTuiSdk registerDeviceTokenData:token];
NSString *driverToken = @""; NSString *driverToken = @"";
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 13) { if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 13) {
if (![token isKindOfClass:[NSData class]]) { if (![token isKindOfClass:[NSData class]]) {
...@@ -352,13 +350,13 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7"; ...@@ -352,13 +350,13 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
} }
- (void)GeTuiSdkNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification completionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { - (void)GeTuiSdkNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification completionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
completionHandler( UNNotificationPresentationOptionBadge| if (completionHandler) completionHandler( UNNotificationPresentationOptionBadge|
UNNotificationPresentationOptionSound| UNNotificationPresentationOptionSound|
UNNotificationPresentationOptionAlert); UNNotificationPresentationOptionAlert);
} }
- (void)GeTuiSdkDidReceiveNotification:(NSDictionary *)userInfo notificationCenter:(UNUserNotificationCenter *)center response:(UNNotificationResponse *)response fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - (void)GeTuiSdkDidReceiveNotification:(NSDictionary *)userInfo notificationCenter:(UNUserNotificationCenter *)center response:(UNNotificationResponse *)response fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
completionHandler(UIBackgroundFetchResultNoData); if (completionHandler) completionHandler(UIBackgroundFetchResultNoData);
} }
- (void)GeTuiSdkDidReceiveSlience:(NSDictionary *)userInfo fromGetui:(BOOL)fromGetui offLine:(BOOL)offLine appId:(NSString *)appId taskId:(NSString *)taskId msgId:(NSString *)msgId fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - (void)GeTuiSdkDidReceiveSlience:(NSDictionary *)userInfo fromGetui:(BOOL)fromGetui offLine:(BOOL)offLine appId:(NSString *)appId taskId:(NSString *)taskId msgId:(NSString *)msgId fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
...@@ -396,7 +394,7 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7"; ...@@ -396,7 +394,7 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
}); });
completionHandler(UIBackgroundFetchResultNoData); if (completionHandler) completionHandler(UIBackgroundFetchResultNoData);
} }
......
...@@ -108,12 +108,12 @@ ...@@ -108,12 +108,12 @@
</dict> </dict>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>開啟直播、聊天分享視頻或反饋舉報等功能,需要访问您的相機權限</string> <string>開啟直播、聊天分享視頻或反饋舉報等功能,需要访问您的相機權限</string>
<key>NSMicrophoneUsageDescription</key>
<string>开启直播、聊天錄製視頻分享或反饋舉報等功能,需要访问您的麦克风哦</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>需要获取您的位置,以便发现附近的主播哦</string> <string>需要获取您的位置,以便发现附近的主播哦</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>需要获取您的位置,以便发现附近的主播哦</string> <string>需要获取您的位置,以便发现附近的主播哦</string>
<key>NSMicrophoneUsageDescription</key>
<string>开启直播、聊天錄製視頻分享或反饋舉報等功能,需要访问您的麦克风哦</string>
<key>NSPhotoLibraryAddUsageDescription</key> <key>NSPhotoLibraryAddUsageDescription</key>
<string>保存APP內你需要的圖片或視頻,到相冊的功能,需要访问您的相册</string> <string>保存APP內你需要的圖片或視頻,到相冊的功能,需要访问您的相册</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
......
...@@ -226,11 +226,13 @@ ...@@ -226,11 +226,13 @@
if ([currentEaseMobKey isEqualToString:FUSConfig.sharedInstanced.sdkConfigs.easeMobTestAppKey]) { if ([currentEaseMobKey isEqualToString:FUSConfig.sharedInstanced.sdkConfigs.easeMobTestAppKey]) {
// 测试服 // 测试服
//TODO:环信证书: added By Pidan //TODO:环信证书: added By Pidan
mainOptions.apnsCertName = @"fireflylive_dev_push.p12"; //测试环境推送证书名称 mainOptions.apnsCertName = @"ft_chat_iOS_for_test_apns.p12"; //生产环境推送证书名称
// mainOptions.apnsCertName = @"fireflylive_dev_push.p12"; //测试环境推送证书名称
} else if ([currentEaseMobKey isEqualToString:FUSConfig.sharedInstanced.sdkConfigs.easeMobAppKey]) { } else if ([currentEaseMobKey isEqualToString:FUSConfig.sharedInstanced.sdkConfigs.easeMobAppKey]) {
// 正式服 // 正式服
//TODO:环信证书: added By Pidan //TODO:环信证书: added By Pidan
mainOptions.apnsCertName = @"FusiClub_AppStore_APNs.p12"; //生产环境推送证书名称 mainOptions.apnsCertName = @"FusiClub_AppStore_APNs.p12"; //生产环境推送证书名称
// mainOptions.apnsCertName = @"ft_chat_iOS_for_test_apns.p12"; //生产环境推送证书名称
} }
mainOptions.isAutoDownloadThumbnail = YES; // 是否自动下载图片和视频缩略图及语音消息 mainOptions.isAutoDownloadThumbnail = YES; // 是否自动下载图片和视频缩略图及语音消息
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
{ {
[[EMClient sharedClient] loginWithUsername:account password:passWord completion:^(NSString *aUsername, EMError *aError) { [[EMClient sharedClient] loginWithUsername:account password:passWord completion:^(NSString *aUsername, EMError *aError) {
if (!aError || aError.code == 200) { if (!aError || aError.code == 200) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"refresh_hyLogin_state" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"refresh_hyLogin_state" object:nil];
if (success) success(); if (success) success();
}else{ }else{
...@@ -172,14 +173,14 @@ ...@@ -172,14 +173,14 @@
// 更新到最新的会话 // 更新到最新的会话
[[FUSIMChatService shareInstance] fus_delayUpdateTalkListToLastMessage]; [[FUSIMChatService shareInstance] fus_delayUpdateTalkListToLastMessage];
[self fus_bindAPNsToken];
}); });
// 重置重试次数 // 重置重试次数
self.retryCount = 0; self.retryCount = 0;
[self fus_bindAPNsToken];
[self fus_bindAPNsToken];
} failure:^(NSString *errorMsg) { } failure:^(NSString *errorMsg) {
// 重试次数加1 // 重试次数加1
......
...@@ -103,7 +103,30 @@ ...@@ -103,7 +103,30 @@
self.webview.webEventHelper.webCidEventHandler = ^(NSDictionary *info, NSInteger cid) { self.webview.webEventHelper.webCidEventHandler = ^(NSDictionary *info, NSInteger cid) {
if (cid == 47) { if (cid == 47) {
[UIView addAnimationShakeToView:weakSelf]; if (weakSelf.arrowBtn.selected) {
[weakSelf.layer removeAllAnimations];
// 假设你想对self.view的层应用动画
CALayer *layer = weakSelf.layer;
// 设置变换原点为层的中心
layer.anchorPoint = CGPointMake(0.5, 0.5);
// 创建基础动画
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.duration = 0.2; // 动画持续时间
rotationAnimation.repeatCount = NSIntegerMax; // 无限重复
rotationAnimation.autoreverses = YES; // 自动反转
// 设置从 -角度 到 +角度 的旋转
rotationAnimation.fromValue = @(-M_PI / 18); // -10度,以弧度为单位
rotationAnimation.toValue = @(M_PI / 18); // +10度,以弧度为单位
// 添加动画到层
[layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
}
} }
}; };
...@@ -164,6 +187,7 @@ ...@@ -164,6 +187,7 @@
}]; }];
// }]; // }];
} else { } else {
[self.layer removeAllAnimations];
self.arrowBtn.selected = NO; self.arrowBtn.selected = NO;
[self.webview.wkWebView reload]; [self.webview.wkWebView reload];
[UIView animateWithDuration:0.3 animations:^{ [UIView animateWithDuration:0.3 animations:^{
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
lineView.y = self.titleBtn.bottom; lineView.y = self.titleBtn.bottom;
[self.contentView addSubview:lineView]; [self.contentView addSubview:lineView];
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.closeBtn.bottom, self.width, self.height - self.closeBtn.bottom) style:UITableViewStylePlain]; _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.closeBtn.bottom, self.width, self.contentView.height - self.closeBtn.bottom) style:UITableViewStylePlain];
_tableView.backgroundColor = [UIColor clearColor]; _tableView.backgroundColor = [UIColor clearColor];
_tableView.delegate = self; _tableView.delegate = self;
_tableView.dataSource = self; _tableView.dataSource = self;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment