Add 'apps/mobile/' from commit '5fa30f365f21531094cd4d2045042bb4f1370ac3'

git-subtree-dir: apps/mobile
git-subtree-mainline: 86f8987dff
git-subtree-split: 5fa30f365f
This commit is contained in:
2026-08-16 21:42:59 -04:00
222 changed files with 23436 additions and 0 deletions
@@ -0,0 +1,64 @@
// @ts-check
const { withXcodeProject } = require("@expo/config-plugins");
const RELEASE_SIGN_KEY = '"CODE_SIGN_IDENTITY[sdk=iphoneos*]"';
const MAIN_BUNDLE_ID = "com.beenvoice.app";
const WIDGET_BUNDLE_ID = "com.beenvoice.app.ExpoWidgetsTarget";
/**
* Keep App Store archives on distribution signing. Automatic signing can select
* an Apple Development identity for the widget target when archiving from the CLI,
* so both release targets use their explicit App Store profiles instead.
*/
function configureReleaseSigning(project) {
const configurations = project.pbxXCBuildConfigurationSection();
for (const key of Object.keys(configurations)) {
const buildConfig = configurations[key];
if (
!buildConfig ||
typeof buildConfig !== "object" ||
!buildConfig.buildSettings
) {
continue;
}
if (buildConfig.name !== "Release") {
continue;
}
const bundleId = String(
buildConfig.buildSettings.PRODUCT_BUNDLE_IDENTIFIER ?? "",
).replaceAll('"', "");
if (bundleId !== MAIN_BUNDLE_ID && bundleId !== WIDGET_BUNDLE_ID) {
continue;
}
const profileName =
bundleId === WIDGET_BUNDLE_ID
? (process.env.IOS_WIDGET_APPSTORE_PROFILE_NAME ?? WIDGET_BUNDLE_ID)
: (process.env.IOS_MAIN_APPSTORE_PROFILE_NAME ?? MAIN_BUNDLE_ID);
buildConfig.buildSettings[RELEASE_SIGN_KEY] = '"Apple Distribution"';
buildConfig.buildSettings.CODE_SIGN_STYLE = "Manual";
buildConfig.buildSettings.PROVISIONING_PROFILE_SPECIFIER = `"${profileName}"`;
if (process.env.APPLE_TEAM_ID) {
buildConfig.buildSettings.DEVELOPMENT_TEAM = process.env.APPLE_TEAM_ID;
}
}
return project;
}
/** @type {import('@expo/config-plugins').ConfigPlugin} */
function withAppStoreSigning(config) {
return withXcodeProject(config, (config) => {
configureReleaseSigning(config.modResults);
return config;
});
}
module.exports = withAppStoreSigning;
module.exports.configureReleaseSigning = configureReleaseSigning;