File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Fix libfido2.framework structure for macOS validation
4+ # If this script is not run, the build will fail because xcodebuild is expecting the library in a specific structure
5+ FRAMEWORK_PATH=" ${BUILT_PRODUCTS_DIR} /${PRODUCT_NAME} .app/Contents/Frameworks/libfido2.framework"
6+
7+ if [ -d " $FRAMEWORK_PATH " ] && [ -f " $FRAMEWORK_PATH /Info.plist" ] && [ ! -d " $FRAMEWORK_PATH /Versions" ]; then
8+ echo " Fixing libfido2.framework bundle structure..."
9+
10+ # Create proper bundle structure
11+ mkdir -p " $FRAMEWORK_PATH /Versions/A/Resources"
12+
13+ # Move files to proper locations
14+ mv " $FRAMEWORK_PATH /Info.plist" " $FRAMEWORK_PATH /Versions/A/Resources/"
15+ mv " $FRAMEWORK_PATH /libfido2" " $FRAMEWORK_PATH /Versions/A/"
16+ if [ -f " $FRAMEWORK_PATH /LICENSE" ]; then
17+ mv " $FRAMEWORK_PATH /LICENSE" " $FRAMEWORK_PATH /Versions/A/"
18+ fi
19+
20+ # Create symbolic links
21+ ln -sf A " $FRAMEWORK_PATH /Versions/Current"
22+ ln -sf Versions/Current/libfido2 " $FRAMEWORK_PATH /libfido2"
23+ ln -sf Versions/Current/Resources " $FRAMEWORK_PATH /Resources"
24+
25+ echo " libfido2.framework structure fixed"
26+ fi
Original file line number Diff line number Diff line change 703703 buildConfigurationList = CAD2E7BC2449575100113D76 /* Build configuration list for PBXNativeTarget "Xcodes" */;
704704 buildPhases = (
705705 CAD2E79A2449574E00113D76 /* Sources */,
706+ D971F84C2E79102E005F84C9 /* Fix libfido2 structure */,
706707 CAD2E79B2449574E00113D76 /* Frameworks */,
707708 CA9FF8292594F33200E47BAF /* Generate Acknowledgements */,
708709 CAD2E79C2449574E00113D76 /* Resources */,
876877 shellPath = /bin/sh;
877878 shellScript = "cd \"${SRCROOT}/Xcodes/AcknowledgementsGenerator\"\nxcrun -sdk macosx swift run AcknowledgementsGenerator \\\n -p \"${SRCROOT}/Xcodes.xcodeproj\" \\\n -o \"${SRCROOT}/Xcodes/Resources/Licenses.rtf\"\n";
878879 };
880+ D971F84C2E79102E005F84C9 /* Fix libfido2 structure */ = {
881+ isa = PBXShellScriptBuildPhase;
882+ buildActionMask = 2147483647;
883+ files = (
884+ );
885+ inputFileListPaths = (
886+ );
887+ inputPaths = (
888+ );
889+ name = "Fix libfido2 structure";
890+ outputFileListPaths = (
891+ );
892+ outputPaths = (
893+ );
894+ runOnlyForDeploymentPostprocessing = 0;
895+ shellPath = /bin/sh;
896+ shellScript = "${SRCROOT}/Scripts/fix_libfido2_framework.sh\n";
897+ };
879898/* End PBXShellScriptBuildPhase section */
880899
881900/* Begin PBXSourcesBuildPhase section */
You can’t perform that action at this time.
0 commit comments