To allow my app to run during the night, I use:
UIDevice.current.isProximityMonitoringEnabled = true
UIApplication.shared.isIdleTimerDisabled = true
The screen goes dark when the user places the phone face-down on the nightstand. I start a timer at this point to perform URL fetches and update the app every 10 minutes or so throughout the night.
This starts and appears to work just as it did in iOS 10. But it's never still running by morning, as it was with iOS 10. I see no indications of a problem, it's just not making it all night anymore.
I'm not sure how to even diagnose this. I can add a print statement to my logging to determine exactly when it stops during the night but that won't tell me why.