2021年3月24日星期三

App rejected for crashing on launch in review only

I have an app which is now version 2.1, there have been at least five versions of this app published prior, all approved without any issues.

I published version 2.0 last week which was reviewed, approved (Quickly) and published on build 1.

I stupidly didn't update the App Store details for 2.0 with new screenshots, keywords etc as I planned on doing it with version 2.1 a week or so later.

Then I just wanted to add a label to version 2.0 so I added it and sent version 2.1 for review.

2.1(1), 2.1(2), 2.1(3), Each crashed with the main issue I concluded to be: A missing framework.(Exception Type: EXC_CRASH (SIGABRT)

I know what you're thinking, yes, but I didn't want to believe it and knew troubleshooting what I was looking at would not be easy for an amateur like me even though I managed to figure out a crash which only occurred on review when I started learning with my first line of code two years ago.

The crash reports seemingly had many issues when I started using FileMerge to try and figure out the reason for the crash, it seemed odd that there were no warnings or errors and I couldn't reproduce any issues with any of the TestFlight builds. The common one was this👇

I rejected the next build because I saw an anomaly with a constraint I set, so I fixed what I saw was a problem and sent off build 5 but it wasn't the issue, crashed.

I removed everything I had added for version 2.1 and now it's published, but I want to add that label back without it crashing on launch for the reviewer.

Please tell me what I need to fix up so it doesn't crash on review.

import UIKit  import Foundation    class MyAwesomeControllerNavigatesAndIDoNotUseAStoryboardItsAllCodeOnly: UIViewController  {   let newLabel = myAwesomeCustomLabelUsedForTwoOtherUILabels()      func setupNewLabel()    {      view.addSubview(newLabel)        newLabel.font = UIFont.boldSystemFont(ofSize: 25)      newLabel.text = "NEW!"        newLabel.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi / -4))        NSLayoutConstraint.activate([        newLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor),        newLabel.widthAnchor.constraint(equalToConstant: 100),        newLabel.heightAnchor.constraint(equalToConstant: 30),        newLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor)         ])    }    override func viewDidLoad() {      super.viewDidLoad()        setupNewLabel()   }  

}

CGAffineTransform is part of the UIKit in UIView as far as I am aware. The app is quite basic & only uses UIKit. (Crash referring to missing framework 🤔). To import CoreGraphics isn't needed surely?

When I removed that setupNewLabel() function from viewDidLoad, it didn't crash for the reviewer. Help please ✌️

https://stackoverflow.com/questions/66792046/app-rejected-for-crashing-on-launch-in-review-only March 25, 2021 at 10:04AM

没有评论:

发表评论