This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

1 line
1.2 KiB
Plaintext

{"version":3,"file":"Branch.js","sourceRoot":"","sources":["../../src/ios/Branch.ts"],"names":[],"mappings":";;AAEA,wDAA+D;AAGlD,QAAA,UAAU,GAAG,mCAAqB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAE/E,SAAgB,eAAe,CAAC,MAA+B;;IAC7D,+BAAO,MAAM,CAAC,GAAG,0CAAE,MAAM,0CAAE,MAAM,0CAAE,MAAM,mCAAI,IAAI,CAAC;AACpD,CAAC;AAFD,0CAEC;AAED,SAAgB,eAAe,CAAC,MAA+B,EAAE,SAAoB;IACnF,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,SAAS,CAAC;KAClB;IAED,uCACK,SAAS,KACZ,UAAU,EAAE;YACV,IAAI,EAAE,MAAM;SACb,IACD;AACJ,CAAC;AAbD,0CAaC","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\n\nimport { createInfoPlistPlugin } from '../plugins/ios-plugins';\nimport { InfoPlist } from './IosConfig.types';\n\nexport const withBranch = createInfoPlistPlugin(setBranchApiKey, 'withBranch');\n\nexport function getBranchApiKey(config: Pick<ExpoConfig, 'ios'>) {\n return config.ios?.config?.branch?.apiKey ?? null;\n}\n\nexport function setBranchApiKey(config: Pick<ExpoConfig, 'ios'>, infoPlist: InfoPlist): InfoPlist {\n const apiKey = getBranchApiKey(config);\n\n if (apiKey === null) {\n return infoPlist;\n }\n\n return {\n ...infoPlist,\n branch_key: {\n live: apiKey,\n },\n };\n}\n"]}