Skip to content

Commit

Permalink
chore: updated plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrauber committed Feb 7, 2024
1 parent cbd8e48 commit 9b59574
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion plugin/build/withMapLibre.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,28 @@ function setExcludedArchitectures(project) {
return project;
}
exports.setExcludedArchitectures = setExcludedArchitectures;
const withoutSignatures = config => {
const shellScript = `if [ "$XCODE_VERSION_MAJOR" = "1500" ]; then
echo "Remove signature files (Xcode 15 workaround)";
rm -rf "$CONFIGURATION_BUILD_DIR/Mapbox.xcframework-ios.signature";
fi`;
return (0, config_plugins_1.withXcodeProject)(config, async (config) => {
const xcodeProject = config.modResults;
xcodeProject.addBuildPhase([], 'PBXShellScriptBuildPhase', 'Remove signature files (Xcode 15 workaround)', null, {
shellPath: '/bin/sh',
shellScript,
});
return config;
});
};
const withExcludedSimulatorArchitectures = c => {
return (0, config_plugins_1.withXcodeProject)(c, config => {
config.modResults = setExcludedArchitectures(config.modResults);
return config;
});
};
const withMapLibre = config => {
config = withExcludedSimulatorArchitectures(config);
config = withoutSignatures(withExcludedSimulatorArchitectures(config));
return withCocoaPodsInstallerBlocks(config);
};
exports.default = (0, config_plugins_1.createRunOncePlugin)(withMapLibre, pkg.name, pkg.version);

0 comments on commit 9b59574

Please sign in to comment.