Not following app guidelines and rejected build.

Since from some time, I'm experiencing app rejection from app store. The app runs without any issue on real device ipad/iphone with iOS 14.3 (latest) and the simulators. But app store testing team claims it crashes. Apple representative said that the build is not following their guidelines. What am i doing wrong here?

https://stackoverflow.com/questions/65972482/unable-to-locate-the-problem-why-apple-refuse-my-build?noredirect=1#comment116643613_65972482
You got a lot of suggestions in SO.

Did you try them ?

Crash log seems to show problem is in InitialViewController / viewDidAppear
Have you checked both segues:
  • loginSegue

and
  • viewDashBoard


Which VC do they lead to ?
Code Block
import UIKit
class InitialViewController: UIViewController {
override func viewDidLoad(){
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.navigationBar.barTintColor = #colorLiteral(red: 0.2196078431, green: 0.4705882353, blue: 0.9137254902, alpha: 1)
self.navigationController?.navigationBar.tintColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print("Initial View Controller : ViewDidAppear")
if UserDefaults.standard.object(forKey: "loginTokenDict") == nil {
print("go to login")
self.performSegue(withIdentifier: "loginSegue", sender: self)
} else {
print("go to dashboard")
self.performSegue(withIdentifier: "viewDashBoard", sender: self)
}
}
}

@Claude31 viewDashBoard segues goes to a TabbarViewCntroller which has 5 uiViewControllers each embed in navbarcontrollers. loginSegue leads to a uivewcontroller embed to navbarcontroller. AddBuildingViewController is the 3rd tab in that tabbarviewcontroller (index =2)
Could you show the complete rejection mail from appstore reviewer ?
Not following app guidelines and rejected build.
 
 
Q