EXC_BREAKPOINT (SIGTRAP) for App Review Team. Not Reproducible

后端 未结 3 1937
北恋
北恋 2021-02-07 03:40

So, my App (iOS, Swift 2.2, Xcode 7.3) got rejected by Beta App Review team because it crahsed on launch.

UPDATE Got an answer from the App Review Team

3条回答
  •  别跟我提以往
    2021-02-07 04:07

    Haha,

    --@RJE... it was your comment that made me double check if I was forcefully unwrapping an optional. If you want the bounty, post an answer and I'll assign it to you! Thanks! – guido 5 hours ago"--

    Bounties are always important,

    Anyway it is very important to know that what is SIGTRAP means. It is basically a run-time exception not an error. So if you cannot really find the issue you have to check that if there are any places which can course an exception. (specially with Swift optional types)

    Usually it can be array index out of bound or unwrapping nil or any thing similar. Also if it only occurs sometimes or only on some device there is a possibility of a issue due to various delays of UI animations.(e.g. presentViewController withAnimation and trying some thing before its completion.)

    But honestly I don't see any issue with your original code. It shouldn't have crashed.

    Unless if Storyboard's initial point is a UINavigationController and you forgot to set its class as a CustomNavigationController. Then it will crash at below code. (this is expected in Swift).

    let navController = window!.rootViewController as! CustomNavigationController
    

    But I don't think that this is the issue. Coz it should have crashed every time on any device.

    And also by the time applicationDidBecomeActive called window wont be nil. So it can be some thing else you are doing with navController after this point.

    Or may be Apple's review team tested your app on a faulty device :)

提交回复
热议问题