Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 984 Bytes

README.md

File metadata and controls

57 lines (38 loc) · 984 Bytes

Demo App

Installation

  • First clone the plugin repo.
git clone https://github.com/transistorsoft/capacitor-background-fetch.git
cd capacitor-background-fetch
  • Now compile the plugin's typescript source code.
npm install
npm run build
  • Now install the /example as you would any Capacitor app.
cd example
npm install

ionic build
npx cap sync
  • Now run it:
ionic capacitor run android
ionic capacitor run ios

Simulating events.

Android

adb shell cmd jobscheduler run -f com.transistorsoft.backgroundfetch.capacitor.demo 999

The /example folder has a script that can run the command above:

./scripts/simulate-fetch

iOS

See the plugin README to learn how to simulate iOS fetch events.

 e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.transistorsoft.fetch"]