app crashed on launch

Hello there~

I just got an app submission rejected and the reason is app crashed on launch (exhausted real time allowance of 19.74 seconds). However, I cannot reproduce the crash on my iPad 6th, iOS 17.5.1 (same OS version used by the reviewer) with app built by Xcode 15.2 and Xcode 15.4.

After I reviewed the logs, I found the last method we called is CNCopyCurrentNetworkInfo, it triggered a series of method invocations , then crashed. But I cannot remove CNCopyCurrentNetworkInfo directly, since I need to get some value from NetworkInfo. So I'm not sure how to solve this issue.

Please give me some advices, thanks!

I cannot upload my crash reports, keep getting "sensitive language" error.

[Edited by Moderator]

After I reviewed the logs, I found the last method we called is CNCopyCurrentNetworkInfo, it triggered a series of method invocations , then crashed.

Just to clarify here, I suspect your app blocked in "CNCopyCurrentNetworkInfo" because your app didn't have location authorization, though it's possible something else is going on. However, this is not correct:

But I cannot remove CNCopyCurrentNetworkInfo directly, since I need to get some value from NetworkInfo. So I'm not sure how to solve this issue.

CNCopyCurrentNetworkInfo has been deprecated and it's documented replacement is NEHotspotNetwork.fetchCurrent(completionHandler:). Note that it's replacement uses a completion handler (instead of blocking). I believe that was done to remove any possibility of the kind of crash you're seeing.


Kevin Elliott
DTS Engineer, CoreOS/Hardware

app crashed on launch
 
 
Q