Commit 5240eced by pierce

fixed bugs

parent de1d830b
......@@ -305,8 +305,6 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)token {
[GeTuiSdk registerDeviceTokenData:token];
NSString *driverToken = @"";
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 13) {
if (![token isKindOfClass:[NSData class]]) {
......@@ -352,13 +350,13 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
}
- (void)GeTuiSdkNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification completionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
completionHandler( UNNotificationPresentationOptionBadge|
if (completionHandler) completionHandler( UNNotificationPresentationOptionBadge|
UNNotificationPresentationOptionSound|
UNNotificationPresentationOptionAlert);
}
- (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 {
......@@ -396,7 +394,7 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
});
completionHandler(UIBackgroundFetchResultNoData);
if (completionHandler) completionHandler(UIBackgroundFetchResultNoData);
}
......
......@@ -108,12 +108,12 @@
</dict>
<key>NSCameraUsageDescription</key>
<string>開啟直播、聊天分享視頻或反饋舉報等功能,需要访问您的相機權限</string>
<key>NSMicrophoneUsageDescription</key>
<string>开启直播、聊天錄製視頻分享或反饋舉報等功能,需要访问您的麦克风哦</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>需要获取您的位置,以便发现附近的主播哦</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要获取您的位置,以便发现附近的主播哦</string>
<key>NSMicrophoneUsageDescription</key>
<string>开启直播、聊天錄製視頻分享或反饋舉報等功能,需要访问您的麦克风哦</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>保存APP內你需要的圖片或視頻,到相冊的功能,需要访问您的相册</string>
<key>NSPhotoLibraryUsageDescription</key>
......
......@@ -226,11 +226,13 @@
if ([currentEaseMobKey isEqualToString:FUSConfig.sharedInstanced.sdkConfigs.easeMobTestAppKey]) {
// 测试服
//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]) {
// 正式服
//TODO:环信证书: added By Pidan
mainOptions.apnsCertName = @"FusiClub_AppStore_APNs.p12"; //生产环境推送证书名称
// mainOptions.apnsCertName = @"ft_chat_iOS_for_test_apns.p12"; //生产环境推送证书名称
}
mainOptions.isAutoDownloadThumbnail = YES; // 是否自动下载图片和视频缩略图及语音消息
......
......@@ -147,6 +147,7 @@
{
[[EMClient sharedClient] loginWithUsername:account password:passWord completion:^(NSString *aUsername, EMError *aError) {
if (!aError || aError.code == 200) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"refresh_hyLogin_state" object:nil];
if (success) success();
}else{
......@@ -172,6 +173,7 @@
// 更新到最新的会话
[[FUSIMChatService shareInstance] fus_delayUpdateTalkListToLastMessage];
[self fus_bindAPNsToken];
});
......@@ -179,7 +181,6 @@
self.retryCount = 0;
[self fus_bindAPNsToken];
} failure:^(NSString *errorMsg) {
// 重试次数加1
......
......@@ -103,7 +103,30 @@
self.webview.webEventHelper.webCidEventHandler = ^(NSDictionary *info, NSInteger cid) {
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 @@
}];
// }];
} else {
[self.layer removeAllAnimations];
self.arrowBtn.selected = NO;
[self.webview.wkWebView reload];
[UIView animateWithDuration:0.3 animations:^{
......
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