Skip to content

Commit

Permalink
fix: updated addBuildPhase
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrauber committed Jan 30, 2024
1 parent a32bb57 commit e59ffb8
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions plugin/src/withMapLibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,28 @@ export function setExcludedArchitectures(project: XcodeProject): XcodeProject {
typeof buildSettings?.PRODUCT_NAME !== 'undefined'
) {
buildSettings['"EXCLUDED_ARCHS[sdk=iphonesimulator*]"'] = '"arm64"';
project.addBuildPhase([
'name = "Remove Signatures"',
'shellScript = "if [ \"$XCODE_VERSION_MAJOR\" = \"1500\" ]; then\n echo \"********* Remove signature files (Xcode 15 workaround)\"\n\n rm -rf \"$BUILD_DIR/Release-iphoneos/Mapbox.xcframework-ios.signature\"\n fi\n";',
]);
}
}

/**
* Delete Duplicate Signature File

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `·`
* https://github.com/CocoaPods/CocoaPods/issues/12022

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `·`
*/

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `·`
const shellScript = `if [ "$XCODE_VERSION_MAJOR" = "1500" ]; then
echo "Remove signature files (Xcode 15 workaround)";
rm -rf "$BUILD_DIR/Release-iphoneos/Mapbox.xcframework-ios.signature";
fi`;

project.addBuildPhase(
[],
'PBXShellScriptBuildPhase',
'Remove signature files (Xcode 15 workaround)',
null,
{
shellPath: '/bin/sh',
shellScript

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Insert `,`
},
);
};

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Delete `;`
};

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

View workflow job for this annotation

GitHub Actions / lint_test_generate

Delete `;`
return project;
}

Expand Down

0 comments on commit e59ffb8

Please sign in to comment.