Polyv Help Center

Help Center

iOS Live SDK Login Chat Failure

Updated: 2023-03-26 20:05:59

Problem Description

When logging into a live room using the iOS Live SDK, custom audience login information is supported, but it may cause chat room login failure. The configuration code and specific symptoms are as follows:

[PLVRoomLoginClient loginLiveRoomWithChannelType:channelType
                                           channelId:self.channelIdTF.text
                                              userId:self.userIDTF.text
                                               appId:self.appIDTF.text
                                           appSecret:self.appSecretTF.text
                                            roomUser:^(PLVRoomUser * _Nonnull roomUser) {
        // 可在此处配置自定义的登陆用户ID、昵称、头像,不配则均使用默认值
        // roomUser.viewerId = @"用户ID";
        // roomUser.viewerName = @"用户昵称";
        // roomUser.viewerAvatar = @"用户头像";
    } completion:^(PLVViewLogCustomParam * _Nonnull customParam) {
        [hud hideAnimated:YES];
        [weakSelf saveParamsToFile];
        
        if (successHandler) {
            successHandler();
        }
    } failure:^(NSString * _Nonnull errorMessage) {
        [hud hideAnimated:YES];
        [weakSelf showHud:errorMessage detail:nil];
    }];
  1. In the cloud classroom scenario, PPT fails to load.
  2. Chat interaction messages cannot be received or sent.
  3. Interactive features (tips, surveys, answer sheets, announcements, etc.) are unavailable.
  4. After the host initiates a co-hosting request, the co-hosting button does not appear.

Solution and Troubleshooting Approach

  1. viewerId: Must be a valid string. Empty strings such as @"", nil, or null are not allowed.
  2. viewerName: Must be valid characters. Empty strings such as @"", nil, or null are not allowed, and prohibited words must be avoided.
  3. viewerAvatar: Must be valid characters. Empty strings such as @"", nil, or null are not allowed, and the image resource must exist and be accessible.
  4. It is recommended to perform validation when customizing user login information. If invalid data is detected, simply skip the customization. In this case, the Live SDK will use default values, which will not affect chat room login.
联系客服,在线咨询