App never received any Fetch event in iOS real device .
Maharshsoni7 opened this issue · 3 comments
Your Environment
- Platform: iOS
- OS version:16.5.1
- Device manufacturer / model: iphone XR
- React Native version (
react-native -v
):0.71.6 - Plugin config :
Expected Behavior
Receive Event in 15 min expected
Actual Behavior
Never received any Fetch event.
Context
const startBackgroundProcess = async () => {
console.log("call startBackgroundProcess");
let status = await BackgroundFetch.configure({
minimumFetchInterval: 15, // Minimum fetch interval in minutes
stopOnTerminate: false, // Whether to stop background fetch on app termination
startOnBoot: true, // Whether to start background fetch on device boot
enableHeadless: true,
}, onEvent, onTimeout);
BackgroundFetch.scheduleTask({
taskId: "com.transistorsoft.MyCustomTaskId",
forceAlarmManager: true,
delay: 5000, // <-- milliseconds
periodic: true,
requiredNetworkType: BackgroundFetch.NETWORK_TYPE_ANY
});
}
Debug logs
iOS: XCode logs: [TSBackgroundFetch scheduleProcessingTask]
Be patient. It can take days before iOS machine-learning algorithm settles in and begins firing events.
Just bring the app to foreground periodically like normal user behaviour.
If simulated events work, that's all you need to know.
Be patient. It can take days before iOS machine-learning algorithm settles in and begins firing events.
Just bring the app to foreground periodically like normal user behaviour.
Yes, Event triggers occur two to three hours later.