1- Run the app on a real device and attach it to Xcode debugger.

2- From Debug menu, select Simulate Background Fetch:

https://i.stack.imgur.com/OE4dg.png

3- Now Xcode will pause the app with SIGSTOP signal. Just tap the continue button to let the app do the background fetch.

https://i.stack.imgur.com/wWxSS.png

Now you will see that data is fetched and ready for you.