xref: /expo/packages/expo-task-manager/plugin/build/withTaskManager.js (revision b72d2d68)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const config_plugins_1 = require("@expo/config-plugins");
4const pkg = require('expo-task-manager/package.json');
5const withTaskManager = config => {
6    if (!config.ios)
7        config.ios = {};
8    if (!config.ios.infoPlist)
9        config.ios.infoPlist = {};
10    if (!config.ios.infoPlist.UIBackgroundModes)
11        config.ios.infoPlist.UIBackgroundModes = [];
12    // TODO: Maybe entitlements are needed
13    config.ios.infoPlist.UIBackgroundModes = [
14        ...new Set(config.ios.infoPlist.UIBackgroundModes.concat(['location', 'fetch'])),
15    ];
16    return config;
17};
18exports.default = config_plugins_1.createRunOncePlugin(withTaskManager, pkg.name, pkg.version);
19

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025