diff --git a/CHANGELOG.md b/CHANGELOG.md index c394939e9..4b1c4c15f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ PR Title ([#123](link to my pr)) ``` +## 10.0.0-alpha.17 + +fix: add generic expo plugin to remove Duplicated Signature in Xcode 15/16 + ## 10.0.0-alpha.16 fix: [another attempt to disable code signing](<[#451](https://github.com/maplibre/maplibre-react-native/pull/451)>) diff --git a/package.json b/package.json index 9d304ad44..38b13b9f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@maplibre/maplibre-react-native", "description": "A MapLibre GL Native plugin for creating maps in React Native", - "version": "10.0.0-alpha.16", + "version": "10.0.0-alpha.17", "publishConfig": { "access": "public" }, diff --git a/plugin/src/withMapLibre.ts b/plugin/src/withMapLibre.ts index 328da103c..04169d645 100644 --- a/plugin/src/withMapLibre.ts +++ b/plugin/src/withMapLibre.ts @@ -43,7 +43,7 @@ const withCocoaPodsInstallerBlocks: ConfigPlugin = (c) => { await promises.writeFile( file, applyCocoaPodsModifications(contents), - "utf-8", + "utf-8" ); return config; }, @@ -63,7 +63,7 @@ export function applyCocoaPodsModifications(contents: string): string { export function addInstallerBlock( src: string, - blockName: InstallerBlockName, + blockName: InstallerBlockName ): string { const matchBlock = new RegExp(`${blockName}_install do \\|installer\\|`); const tag = `${blockName}_installer`; @@ -96,7 +96,7 @@ export function addInstallerBlock( export function addMapLibreInstallerBlock( src: string, - blockName: InstallerBlockName, + blockName: InstallerBlockName ): string { return mergeContents({ tag: `@maplibre/maplibre-react-native-${blockName}_installer`, @@ -129,6 +129,27 @@ export function setExcludedArchitectures(project: XcodeProject): XcodeProject { return project; } +const withoutSignatures: ConfigPlugin = (config) => { + const shellScript = ` + echo "Remove signature files (Xcode workaround)"; + rm -rf "$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature"; + `; + return withXcodeProject(config, async (config) => { + const xcodeProject = config.modResults; + xcodeProject.addBuildPhase( + [], + "PBXShellScriptBuildPhase", + "Remove signature files (Xcode workaround)", + null, + { + shellPath: "/bin/sh", + shellScript, + } + ); + return config; + }); +}; + const withExcludedSimulatorArchitectures: ConfigPlugin = (c) => { return withXcodeProject(c, (config) => { config.modResults = setExcludedArchitectures(config.modResults); @@ -137,7 +158,7 @@ const withExcludedSimulatorArchitectures: ConfigPlugin = (c) => { }; const withMapLibre: ConfigPlugin = (config) => { - config = withExcludedSimulatorArchitectures(config); + config = withoutSignatures(withExcludedSimulatorArchitectures(config)); return withCocoaPodsInstallerBlocks(config); };