1

I'm trying to simulate background fetch in a React Native project

React Native version 0.57.3 Xcode Version 10.0 (10A255)

I've opened the ios project on Xcode and then I build the project then run it, but the option to simulate background fetch is disabled as screenshot below shows:

Simulate background fetch disabled

I got the same result running in Simulator either in a real device.

How to get it working? or whats the cause of it?

The project config is as the screenshot:

Xcode: Project Capabilites screenshot

Xcode: Scheme Options

Wes Guirra
  • 165
  • 2
  • 14

2 Answers2

0

I got Simulate background fetch enabled by going to:

Xcode Menu > Product > Scheme > Edit Scheme and change Executable from Ask on launch to the app executable

Wes Guirra
  • 165
  • 2
  • 14
0

What worked for me after a lot of trying.. was using the scheme config everyone points «Run->Options->Launch due background fetch» and after the app is running- on SIM in my case- go to Xcode 'Debug'->'Attach to Process' and select the first one which should be your app

After that the option should be enabled

Bruno Garelli
  • 235
  • 2
  • 7