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 all commits
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](<[#453](https://github.com/maplibre/maplibre-react-native/pull/453)>)

## 10.0.0-alpha.16

fix: [another attempt to disable code signing](<[#451](https://github.com/maplibre/maplibre-react-native/pull/451)>)
Expand Down
10 changes: 2 additions & 8 deletions ios/RCTMLN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_REQUIRED = NO;
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGNING_ALLOWED = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -708,10 +705,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGNING_REQUIRED = NO;
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGNING_ALLOWED = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
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
23 changes: 22 additions & 1 deletion plugin/src/withMapLibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -137,7 +158,7 @@ const withExcludedSimulatorArchitectures: ConfigPlugin = (c) => {
};

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

Expand Down