App does not support leaderboards - iMessage App

I have an iMessage app, and trying to get Leaderboard scores. I am getting error:


Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." UserInfo={GKServerStatusCode=5043, NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server., NSUnderlyingError=0x600000ed3960 {Error Domain=GKServerErrorDomain Code=5043 "status = 5043, MyApp does not support leaderboards" UserInfo={GKServerStatusCode=5043, NSLocalizedFailureReason=status = 5043, MyApp does not support leaderboards}}}


Please note that my app is live, game center is enabled and it has been days since leaderboards were created on iTunes Connect. Here is the code snippet:


func getScoreLeaderboard(leaderboardIdentifier:String, completion:@escaping ((_ resultScore:GKScore?) -> Void)) {
     
        let leaderBoardRequest = GKLeaderboard()
        leaderBoardRequest.identifier = leaderboardIdentifier
      
        leaderBoardRequest.loadScores {
            (resultGKScore, error) in
          
            guard error == nil && resultGKScore != nil else {
                completion(nil)
                return
            }
            completion(leaderBoardRequest.localPlayerScore)
        }
    }



I have a doubt, but not sure it can be the problem. Problem might be:


I have an iMessage app with Bundle ID e.g.

com.mygame
. On iTunes Connect, I made a test app to check in app purchase issue encountered, and its Bundle ID is
com.mygame.MessagesExtension
.


I think that it is trying to get Leaderboard from test app with extension bundle ID. Can it be possible? Since my app

com.mygame
is live, I am unable to delete extension test app, though it is not in use.


Any help is appreciated.

App does not support leaderboards - iMessage App
 
 
Q