Files
MapLibreParticleLab/integration/react-native/MapLibreParticleRNTestHost/plugins/withParticleNativeIos.js
tei f47469d2ab
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
test: integrate particle.10 online QBIN host
2026-09-21 20:21:16 +09:00

22 lines
683 B
JavaScript

const { withPodfile } = require("@expo/config-plugins");
const marker = "# MapLibreParticleRNTestHost Particle iOS SPM hook";
module.exports = function withParticleNativeIos(config) {
return withPodfile(config, (project) => {
const contents = project.modResults.contents;
if (contents.includes(marker)) return project;
const needle = " post_install do |installer|";
if (!contents.includes(needle)) {
throw new Error("Expo post_install block was not generated.");
}
project.modResults.contents = contents.replace(
needle,
needle + "\n " + marker + "\n $MLRN_PARTICLE.post_install(installer)",
);
return project;
});
};