mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-14 10:08:06 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ecaaf5bd9 | ||
|
|
9ff7299176 | ||
|
|
f1bd9a7e27 |
No files matched your search
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-blob-util [1.0.3](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||||
|
|
||||||
### @config-plugins/react-native-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-blob-util [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
import { AndroidConfig, ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
export declare function appendDownloadCompleteAction(androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;
|
||||||
|
declare const _default: ConfigPlugin<void>;
|
||||||
|
export default _default;
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.appendDownloadCompleteAction = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
let pkg = {
|
||||||
|
name: "react-native-blob-util",
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
pkg = require("react-native-blob-util/package.json");
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
// empty catch block
|
||||||
|
}
|
||||||
|
function appendDownloadCompleteAction(androidManifest) {
|
||||||
|
var _a, _b;
|
||||||
|
if (!Array.isArray(androidManifest.manifest.application)) {
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
for (const application of androidManifest.manifest.application) {
|
||||||
|
for (const activity of application.activity || []) {
|
||||||
|
if (((_a = activity === null || activity === void 0 ? void 0 : activity.$) === null || _a === void 0 ? void 0 : _a["android:launchMode"]) === "singleTask") {
|
||||||
|
for (const intentFilter of activity["intent-filter"] || []) {
|
||||||
|
const isLauncher = (_b = intentFilter.category) === null || _b === void 0 ? void 0 : _b.some((action) => action.$["android:name"] === "android.intent.category.LAUNCHER");
|
||||||
|
if (!isLauncher)
|
||||||
|
continue;
|
||||||
|
intentFilter.action = intentFilter.action || [];
|
||||||
|
const hasDownloadCompleteAction = intentFilter.action.some((action) => action.$["android:name"] ===
|
||||||
|
"android.intent.action.DOWNLOAD_COMPLETE");
|
||||||
|
if (!hasDownloadCompleteAction) {
|
||||||
|
intentFilter.action.push({
|
||||||
|
$: {
|
||||||
|
"android:name": "android.intent.action.DOWNLOAD_COMPLETE",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
exports.appendDownloadCompleteAction = appendDownloadCompleteAction;
|
||||||
|
const withReactNativeBlobUtil = (config) => {
|
||||||
|
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
||||||
|
"android.permission.READ_EXTERNAL_STORAGE",
|
||||||
|
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||||
|
"android.permission.DOWNLOAD_WITHOUT_NOTIFICATION",
|
||||||
|
// Wifi-only mode.
|
||||||
|
"android.permission.ACCESS_NETWORK_STATE",
|
||||||
|
]);
|
||||||
|
config = config_plugins_1.withAndroidManifest(config, (config) => {
|
||||||
|
config.modResults = appendDownloadCompleteAction(config.modResults);
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
exports.default = config_plugins_1.createRunOncePlugin(withReactNativeBlobUtil, pkg.name, pkg.version);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-blob-util",
|
"name": "@config-plugins/react-native-blob-util",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
"description": "Config plugin to auto configure react-native-blob-util on prebuild",
|
||||||
"main": "build/withReactNativeBlobUtil.js",
|
"main": "build/withReactNativeBlobUtil.js",
|
||||||
"types": "build/withReactNativeBlobUtil.d.ts",
|
"types": "build/withReactNativeBlobUtil.d.ts",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-branch [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||||
|
|
||||||
### @config-plugins/react-native-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-branch [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
export declare type ConfigData = {
|
||||||
|
apiKey?: string;
|
||||||
|
iosAppDomain?: string;
|
||||||
|
iosUniversalLinkDomains?: string[];
|
||||||
|
};
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
declare const _default: ConfigPlugin<ConfigData>;
|
||||||
|
export default _default;
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const withBranchAndroid_1 = require("./withBranchAndroid");
|
||||||
|
const withBranchIOS_1 = require("./withBranchIOS");
|
||||||
|
const withBranch = (config, { apiKey, iosAppDomain, iosUniversalLinkDomains } = {}) => {
|
||||||
|
config = withBranchAndroid_1.withBranchAndroid(config, { apiKey });
|
||||||
|
config = withBranchIOS_1.withBranchIOS(config, {
|
||||||
|
apiKey,
|
||||||
|
iosAppDomain,
|
||||||
|
iosUniversalLinkDomains,
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
let pkg = {
|
||||||
|
name: "react-native-branch",
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const branchPkg = require("react-native-branch/package.json");
|
||||||
|
pkg = branchPkg;
|
||||||
|
}
|
||||||
|
catch (_a) { }
|
||||||
|
exports.default = config_plugins_1.createRunOncePlugin(withBranch, pkg.name, pkg.version);
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
import { AndroidConfig } from "@expo/config-plugins";
|
||||||
|
import type { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
export declare function getBranchApiKey(config: ExpoConfig): string | null;
|
||||||
|
export declare function setBranchApiKey(apiKey: string, androidManifest: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;
|
||||||
|
export declare const withBranchAndroid: ConfigPlugin<{
|
||||||
|
apiKey?: string;
|
||||||
|
}>;
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.withBranchAndroid = exports.setBranchApiKey = exports.getBranchApiKey = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow, removeMetaDataItemFromMainApplication, } = config_plugins_1.AndroidConfig.Manifest;
|
||||||
|
const META_BRANCH_KEY = "io.branch.sdk.BranchKey";
|
||||||
|
function getBranchApiKey(config) {
|
||||||
|
var _a, _b, _c, _d;
|
||||||
|
return (_d = (_c = (_b = (_a = config.android) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.branch) === null || _c === void 0 ? void 0 : _c.apiKey) !== null && _d !== void 0 ? _d : null;
|
||||||
|
}
|
||||||
|
exports.getBranchApiKey = getBranchApiKey;
|
||||||
|
function setBranchApiKey(apiKey, androidManifest) {
|
||||||
|
const mainApplication = getMainApplicationOrThrow(androidManifest);
|
||||||
|
if (apiKey) {
|
||||||
|
// If the item exists, add it back
|
||||||
|
addMetaDataItemToMainApplication(mainApplication, META_BRANCH_KEY, apiKey);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Remove any existing item
|
||||||
|
removeMetaDataItemFromMainApplication(mainApplication, META_BRANCH_KEY);
|
||||||
|
}
|
||||||
|
return androidManifest;
|
||||||
|
}
|
||||||
|
exports.setBranchApiKey = setBranchApiKey;
|
||||||
|
const withBranchAndroid = (config, data) => {
|
||||||
|
var _a;
|
||||||
|
const apiKey = (_a = data.apiKey) !== null && _a !== void 0 ? _a : getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
config = config_plugins_1.withAndroidManifest(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
exports.withBranchAndroid = withBranchAndroid;
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
import type { ConfigPlugin, InfoPlist } from "@expo/config-plugins";
|
||||||
|
import type { ExpoConfig } from "@expo/config-types";
|
||||||
|
import type { ConfigData } from "./types";
|
||||||
|
export declare function getBranchApiKey(config: Pick<ExpoConfig, "ios">): string | null;
|
||||||
|
export declare function setBranchApiKey(apiKey: string, infoPlist: InfoPlist): InfoPlist;
|
||||||
|
export declare const withBranchIOS: ConfigPlugin<ConfigData>;
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.withBranchIOS = exports.setBranchApiKey = exports.getBranchApiKey = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
function getBranchApiKey(config) {
|
||||||
|
var _a, _b, _c, _d;
|
||||||
|
return (_d = (_c = (_b = (_a = config.ios) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.branch) === null || _c === void 0 ? void 0 : _c.apiKey) !== null && _d !== void 0 ? _d : null;
|
||||||
|
}
|
||||||
|
exports.getBranchApiKey = getBranchApiKey;
|
||||||
|
function setBranchApiKey(apiKey, infoPlist) {
|
||||||
|
if (apiKey === null) {
|
||||||
|
return infoPlist;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...infoPlist,
|
||||||
|
branch_key: {
|
||||||
|
live: apiKey,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
exports.setBranchApiKey = setBranchApiKey;
|
||||||
|
const withBranchIOS = (config, data) => {
|
||||||
|
var _a;
|
||||||
|
// Ensure object exist
|
||||||
|
if (!config.ios) {
|
||||||
|
config.ios = {};
|
||||||
|
}
|
||||||
|
const apiKey = (_a = data.apiKey) !== null && _a !== void 0 ? _a : getBranchApiKey(config);
|
||||||
|
if (!apiKey) {
|
||||||
|
throw new Error("Branch API key is required");
|
||||||
|
}
|
||||||
|
// Update the infoPlist with the branch key and branch domain
|
||||||
|
config = config_plugins_1.withInfoPlist(config, (config) => {
|
||||||
|
config.modResults = setBranchApiKey(apiKey, config.modResults);
|
||||||
|
if (data.iosAppDomain) {
|
||||||
|
config.modResults.branch_app_domain = data.iosAppDomain;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete config.modResults.branch_app_domain;
|
||||||
|
}
|
||||||
|
if (data.iosUniversalLinkDomains) {
|
||||||
|
config.modResults.branch_universal_link_domains =
|
||||||
|
data.iosUniversalLinkDomains;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete config.modResults.branch_universal_link_domains;
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
exports.withBranchIOS = withBranchIOS;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-branch",
|
"name": "@config-plugins/react-native-branch",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
"description": "Config plugin to auto configure react-native-branch on prebuild",
|
||||||
"author": "650 Industries, Inc.",
|
"author": "650 Industries, Inc.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
### @config-plugins/react-native-callkeep [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Other chores
|
||||||
|
|
||||||
|
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
|
||||||
|
|
||||||
### @config-plugins/react-native-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
### @config-plugins/react-native-callkeep [1.0.1](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-16)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
import { XcodeProject } from "@expo/config-plugins";
|
||||||
|
export declare function ensureHeaderSearchPath(project: XcodeProject, file: string): void;
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.ensureHeaderSearchPath = void 0;
|
||||||
|
const COMMENT_KEY = /_comment$/;
|
||||||
|
function unquote(str) {
|
||||||
|
if (str)
|
||||||
|
return str.replace(/^"(.*)"$/, "$1");
|
||||||
|
}
|
||||||
|
function nonComments(obj) {
|
||||||
|
var keys = Object.keys(obj), newObj = {}, i = 0;
|
||||||
|
for (i; i < keys.length; i++) {
|
||||||
|
if (!COMMENT_KEY.test(keys[i])) {
|
||||||
|
newObj[keys[i]] = obj[keys[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newObj;
|
||||||
|
}
|
||||||
|
function ensureHeaderSearchPath(project, file) {
|
||||||
|
const configurations = nonComments(project.pbxXCBuildConfigurationSection());
|
||||||
|
const INHERITED = '"$(inherited)"';
|
||||||
|
for (const config in configurations) {
|
||||||
|
const buildSettings = configurations[config].buildSettings;
|
||||||
|
if (unquote(buildSettings["PRODUCT_NAME"]) != project.productName)
|
||||||
|
continue;
|
||||||
|
if (!buildSettings["HEADER_SEARCH_PATHS"]) {
|
||||||
|
buildSettings["HEADER_SEARCH_PATHS"] = [INHERITED];
|
||||||
|
}
|
||||||
|
if (!buildSettings.HEADER_SEARCH_PATHS.includes(file)) {
|
||||||
|
buildSettings["HEADER_SEARCH_PATHS"].push(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.ensureHeaderSearchPath = ensureHeaderSearchPath;
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import { ConfigPlugin } from "@expo/config-plugins";
|
||||||
|
declare const withCallkeep: ConfigPlugin;
|
||||||
|
export declare const withXcodeLinkBinaryWithLibraries: ConfigPlugin<{
|
||||||
|
library: string;
|
||||||
|
status?: string;
|
||||||
|
}>;
|
||||||
|
export default withCallkeep;
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.withXcodeLinkBinaryWithLibraries = void 0;
|
||||||
|
const config_plugins_1 = require("@expo/config-plugins");
|
||||||
|
const ensureHeaderSearchPath_1 = require("./ensureHeaderSearchPath");
|
||||||
|
const withCallkeepHeaderSearchPath = (config) => {
|
||||||
|
const headerSearchPath = `"$(SRCROOT)/../node_modules/react-native-callkeep/ios/RNCallKeep"`;
|
||||||
|
return config_plugins_1.withXcodeProject(config, (config) => {
|
||||||
|
ensureHeaderSearchPath_1.ensureHeaderSearchPath(config.modResults, headerSearchPath);
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const withAndroidManifestService = (config) => {
|
||||||
|
return config_plugins_1.withAndroidManifest(config, (config) => {
|
||||||
|
// <service
|
||||||
|
// android:name="io.wazo.callkeep.VoiceConnectionService"
|
||||||
|
// android:label="Wazo"
|
||||||
|
// android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
|
||||||
|
// // Use this to target android >= 11
|
||||||
|
// android:foregroundServiceType="camera|microphone"
|
||||||
|
// // For android < 11
|
||||||
|
// android:foregroundServiceType="phoneCall"
|
||||||
|
// >
|
||||||
|
// <intent-filter>
|
||||||
|
// <action android:name="android.telecom.ConnectionService" />
|
||||||
|
// </intent-filter>
|
||||||
|
// </service>;
|
||||||
|
const app = config_plugins_1.AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
||||||
|
if (!Array.isArray(app.service))
|
||||||
|
app.service = [];
|
||||||
|
if (!app.service.find((item) => item.$["android:name"] ===
|
||||||
|
"io.wazo.callkeep.RNCallKeepBackgroundMessagingService")) {
|
||||||
|
app.service.push({
|
||||||
|
$: {
|
||||||
|
"android:name": "io.wazo.callkeep.RNCallKeepBackgroundMessagingService",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// TODO: Update item
|
||||||
|
if (!app.service.find((item) => item.$["android:name"] === "io.wazo.callkeep.VoiceConnectionService")) {
|
||||||
|
app.service.push({
|
||||||
|
$: {
|
||||||
|
"android:name": "io.wazo.callkeep.VoiceConnectionService",
|
||||||
|
// @ts-ignore
|
||||||
|
"android:label": "Wazo",
|
||||||
|
"android:permission": "android.permission.BIND_TELECOM_CONNECTION_SERVICE",
|
||||||
|
// Use this to target android >= 11
|
||||||
|
// "android:foregroundServiceType": "camera|microphone",
|
||||||
|
// For android < 11
|
||||||
|
"android:foregroundServiceType": "phoneCall",
|
||||||
|
},
|
||||||
|
"intent-filter": [
|
||||||
|
{
|
||||||
|
action: [
|
||||||
|
{
|
||||||
|
$: {
|
||||||
|
"android:name": "android.telecom.ConnectionService",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const withCallkeep = (config) => {
|
||||||
|
config = config_plugins_1.withInfoPlist(config, (config) => {
|
||||||
|
if (!Array.isArray(config.modResults.UIBackgroundModes)) {
|
||||||
|
config.modResults.UIBackgroundModes = [];
|
||||||
|
}
|
||||||
|
if (!config.modResults.UIBackgroundModes.includes("voip")) {
|
||||||
|
config.modResults.UIBackgroundModes.push("voip");
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
config = withCallkeepHeaderSearchPath(config);
|
||||||
|
config = exports.withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "Intents.framework",
|
||||||
|
status: "optional",
|
||||||
|
});
|
||||||
|
config = exports.withXcodeLinkBinaryWithLibraries(config, {
|
||||||
|
library: "CallKit.framework",
|
||||||
|
});
|
||||||
|
config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
|
||||||
|
"android.permission.BIND_TELECOM_CONNECTION_SERVICE",
|
||||||
|
"android.permission.FOREGROUND_SERVICE",
|
||||||
|
"android.permission.READ_PHONE_STATE",
|
||||||
|
"android.permission.CALL_PHONE",
|
||||||
|
]);
|
||||||
|
config = withAndroidManifestService(config);
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
const withXcodeLinkBinaryWithLibraries = (config, { library, status }) => {
|
||||||
|
return config_plugins_1.withXcodeProject(config, (config) => {
|
||||||
|
const options = status === "optional" ? { weak: true } : {};
|
||||||
|
const target = config_plugins_1.IOSConfig.XcodeUtils.getApplicationNativeTarget({
|
||||||
|
project: config.modResults,
|
||||||
|
projectName: config.modRequest.projectName,
|
||||||
|
});
|
||||||
|
config.modResults.addFramework(library, {
|
||||||
|
target: target.uuid,
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
exports.withXcodeLinkBinaryWithLibraries = withXcodeLinkBinaryWithLibraries;
|
||||||
|
exports.default = withCallkeep;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@config-plugins/react-native-callkeep",
|
"name": "@config-plugins/react-native-callkeep",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Config plugin to auto configure callkeep on prebuild",
|
"description": "Config plugin to auto configure callkeep on prebuild",
|
||||||
"main": "build/withCallkeep.js",
|
"main": "build/withCallkeep.js",
|
||||||
"types": "build/withCallkeep.d.ts",
|
"types": "build/withCallkeep.d.ts",
|
||||||
|
|||||||
Reference in new issue
Block a user