Compare commits

..
Author SHA1 Message Date
semantic-release-bot 9ff7299176 chore: 1.0.2
### [1.0.2](https://github.com/expo/config-plugins/compare/@config-plugins/[email protected]...@config-plugins/[email protected]) (2022-03-22)

### Features

* **react-native-webrtc:** add config mod for Android minSdkVersion 24 ([ff8b167](https://github.com/expo/config-plugins/commit/ff8b1677640a560ca98abd8a83f349b3a1ee9017))

### Bug Fixes

* **detox:** use improved xml generation ([#47](https://github.com/expo/config-plugins/issues/47)) ([6324eb0](https://github.com/expo/config-plugins/commit/6324eb041b3b4eb2318c0a1ea0297e3b7bf28f7c))

### Other chores

* 1.0.2 ([5f4e900](https://github.com/expo/config-plugins/commit/5f4e90059e4dd69579082aa7531b8ef7d2cc9a72)), closes [#60](https://github.com/expo/config-plugins/issues/60)
* git ignore build folders ([#59](https://github.com/expo/config-plugins/issues/59)) ([d6050be](https://github.com/expo/config-plugins/commit/d6050beb2a5c68dc59287c27ec388c2002ec7904))
* **ci:** remove PR title validation action ([#62](https://github.com/expo/config-plugins/issues/62)) ([1648e85](https://github.com/expo/config-plugins/commit/1648e8598b959bf8140a2b984af0b8bb85a7e724))
* **ffmpeg-kit-react-native:** update plugin to use `AndroidConfig.Version.withBuildScriptExtMinimumVersion` ([#60](https://github.com/expo/config-plugins/issues/60)) ([c3a375b](https://github.com/expo/config-plugins/commit/c3a375b292d6405be7b3277d10ab4f8dbb006047))
* 1.0.1 ([39a9e63](https://github.com/expo/config-plugins/commit/39a9e63fe975122c5ffff0dd8975ea0dc7639720)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#55](https://github.com/expo/config-plugins/issues/55)
* 1.0.1 ([97dcf1a](https://github.com/expo/config-plugins/commit/97dcf1aca63bb524217e731bded311a9c5dfdb28)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#55](https://github.com/expo/config-plugins/issues/55)
* 2.1.0 ([e2d2b27](https://github.com/expo/config-plugins/commit/e2d2b27494b6a207932194c680de8cc6c1e7c02e))
* **repo:** add PR template ([#56](https://github.com/expo/config-plugins/issues/56)) ([eee366b](https://github.com/expo/config-plugins/commit/eee366bebcc42f4cdc4623f8b52790e3082a4472))
* 1.0.1 ([7ffc38a](https://github.com/expo/config-plugins/commit/7ffc38a808f4af7d098e3bddd84e69d9be083589)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#55](https://github.com/expo/config-plugins/issues/55)
* 1.0.1 ([4dcc613](https://github.com/expo/config-plugins/commit/4dcc613a70a7a0c47d693e04b74884e23d8eaaa2)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#48](https://github.com/expo/config-plugins/issues/48) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#49](https://github.com/expo/config-plugins/issues/49) [#49](https://github.com/expo/config-plugins/issues/49) [#46](https://github.com/expo/config-plugins/issues/46) [#3](https://github.com/expo/config-plugins/issues/3) [#55](https://github.com/expo/config-plugins/issues/55)
* 1.2.2 ([72fa3e1](https://github.com/expo/config-plugins/commit/72fa3e14ef3aa19c375457c81e8899c0ac13f4c9)), closes [#47](https://github.com/expo/config-plugins/issues/47)
* 2.0.2 ([480ec19](https://github.com/expo/config-plugins/commit/480ec19161587fb40fb2745511741f806083fc76)), closes [#52](https://github.com/expo/config-plugins/issues/52) [#54](https://github.com/expo/config-plugins/issues/54) [#53](https://github.com/expo/config-plugins/issues/53) [#55](https://github.com/expo/config-plugins/issues/55)
2022-03-22 18:31:01 +00:00
10 changed files with 145 additions and 1 deletions

No files matched your search

@@ -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
View File
@@ -0,0 +1,5 @@
export declare type ConfigData = {
apiKey?: string;
iosAppDomain?: string;
iosUniversalLinkDomains?: string[];
};
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+4
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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 -1
View File
@@ -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",