Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add generic expo config plugin to remove duplicate signature #453

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)>)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down
29 changes: 25 additions & 4 deletions plugin/src/withMapLibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
await promises.writeFile(
file,
applyCocoaPodsModifications(contents),
"utf-8",
"utf-8"

Check failure on line 46 in plugin/src/withMapLibre.ts

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `,`
);
return config;
},
Expand All @@ -63,7 +63,7 @@

export function addInstallerBlock(
src: string,
blockName: InstallerBlockName,
blockName: InstallerBlockName

Check failure on line 66 in plugin/src/withMapLibre.ts

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `,`
): string {
const matchBlock = new RegExp(`${blockName}_install do \\|installer\\|`);
const tag = `${blockName}_installer`;
Expand Down Expand Up @@ -96,7 +96,7 @@

export function addMapLibreInstallerBlock(
src: string,
blockName: InstallerBlockName,
blockName: InstallerBlockName

Check failure on line 99 in plugin/src/withMapLibre.ts

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `,`
): string {
return mergeContents({
tag: `@maplibre/maplibre-react-native-${blockName}_installer`,
Expand Down Expand Up @@ -129,6 +129,27 @@
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,
}

Check failure on line 147 in plugin/src/withMapLibre.ts

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `,`
);
return config;
});
};

const withExcludedSimulatorArchitectures: ConfigPlugin = (c) => {
return withXcodeProject(c, (config) => {
config.modResults = setExcludedArchitectures(config.modResults);
Expand All @@ -137,7 +158,7 @@
};

const withMapLibre: ConfigPlugin = (config) => {
config = withExcludedSimulatorArchitectures(config);
config = withoutSignatures(withExcludedSimulatorArchitectures(config));
return withCocoaPodsInstallerBlocks(config);
};

Expand Down
Loading