Skip to content

Commit

Permalink
fix: add generic expo config plugin to remove duplicate signature (ma…
Browse files Browse the repository at this point in the history
…plibre#453)

* fix: add generic expo config plugin to remove MapLibre.xcframework-ios.signature
* fix: revert code signing changes
* fix: lint errors
* chore: update changelog
  • Loading branch information
tyrauber authored Sep 24, 2024
1 parent 0d85a9d commit 2671381
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
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

0 comments on commit 2671381

Please sign in to comment.