Apple Rejected but app works in my sims/devices

So, I've requested my app to be published to the App store. I am new to apple development, so I don't know what the crash log really says nor how it would apply to my code. The app works on my Xcode simulators and my own device, but according to apple it fails on startup?

Apparently, crash report is too big to post, so here is my App Delegate:

//
//  AppDelegate.swift
//  YorkCougars
//
//  Created by ADMIN on 8/13/24.
//

import Foundation
import SwiftUI
import WebKit
import FirebaseCore
import FirebaseAuth
import FirebaseMessaging

class AppDelegate:NSObject,UIApplicationDelegate,UNUserNotificationCenterDelegate, MessagingDelegate{
        
    func registerForNoti(application:UIApplication){
        UNUserNotificationCenter.current().delegate = self

        let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
        UNUserNotificationCenter.current().requestAuthorization(
          options: authOptions,
          completionHandler: { _, _ in }
        )

        application.registerForRemoteNotifications()
    }
    
    func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil)-> Bool{
        
            FirebaseApp.configure()
            DatabaseHandler.onStart()
            DatabaseHandler.startObservingAll()
            
            registerForNoti(application: application)
            Messaging.messaging().delegate = self
            Messaging.messaging().subscribe(toTopic: "QUARTER")
            Messaging.messaging().subscribe(toTopic: "ALL")
            //Messaging.messaging().subscribe(toTopic: "DEV")
            
            DatabaseHandler.observe(fromRootLocation: "refreshrate"){snapshot in
                gl.shared.reload = true
                gl.shared.sbURL = "?r=\(snapshot.value as? Int ?? 0)"
                print("lol")
            }
        
        return true;
    }
    
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
    {

            Messaging.messaging().setAPNSToken(deviceToken, type: .unknown)

    }
}
extension AppDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification,
     withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
        
            let userInfo = notification.request.content.userInfo
            
            Messaging.messaging().appDidReceiveMessage(userInfo)
            
            // Change this to your preferred presentation option
            completionHandler([[.banner, .list, .sound]])
            
        
   }

   func userNotificationCenter(_ center: UNUserNotificationCenter,
                               didReceive response: UNNotificationResponse,
                               withCompletionHandler completionHandler: @escaping () -> Void) {
       
           let userInfo = response.notification.request.content.userInfo
           
           Messaging.messaging().appDidReceiveMessage(userInfo)
           
           completionHandler()
           
       
   }

   func application(_ application: UIApplication,
   didReceiveRemoteNotification userInfo: [AnyHashable : Any],
      fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
       
           Messaging.messaging().appDidReceiveMessage(userInfo)
           completionHandler(.noData)
       
   }
}
Answered by ColeAshe in 802562022

Thanks to those who responded, I forgot I posted this and now I'm here for a new problem, and I saw this and I decided to update.

I fixed the problem, TestFlight helped a lot. I didn't update the plist file name in the settings.

You really need to put at least some of the first lines of the crash log in here, as we can't tell why your app would crash from your code.

Thank you for your post. We're investigating and will contact you in App Store Connect to provide further assistance. If you continue to experience issues during review, please contact us.

Accepted Answer

Thanks to those who responded, I forgot I posted this and now I'm here for a new problem, and I saw this and I decided to update.

I fixed the problem, TestFlight helped a lot. I didn't update the plist file name in the settings.

Apple Rejected but app works in my sims/devices
 
 
Q