@@ -5,8 +5,11 @@ TMP := $(TMPDIR)/$(NAME)
55STAGE := $(TMP ) /stage
66APP := $(TMP ) /Build/Products/Release-$(PLATFORM )
77CERT_JSON_URL := https://backloop.dev/pack.json
8+ WORKSPACE := NexStore.xcworkspace
9+ SOURCE_PACKAGES := $(TMP ) /SourcePackages
10+ OPENSSL_XCFRAMEWORK := $(SOURCE_PACKAGES ) /artifacts/openssl-package/OpenSSL/OpenSSL.xcframework
811
9- .PHONY : all deps clean $(SCHEMES )
12+ .PHONY : all deps clean prepare_packages repair_openssl_artifact $(SCHEMES )
1013
1114all : $(SCHEMES )
1215
@@ -28,15 +31,41 @@ deps:
2831 jq -r '.key1, .key2' cert.json > deps/server.pem
2932 jq -r '.info.domains.commonName' cert.json > deps/commonName.txt
3033
31- $(SCHEMES ) : deps
34+ prepare_packages : deps
35+ mkdir -p " $( SOURCE_PACKAGES) "
36+
37+ # Xcode 26 rejects the shipped OpenSSL artifact signature, so resolve first,
38+ # repair the xcframework in-place, then build without re-resolving packages.
39+ xcodebuild \
40+ -resolvePackageDependencies \
41+ -workspace $(WORKSPACE) \
42+ -scheme "$(firstword $(SCHEMES))" \
43+ -clonedSourcePackagesDirPath "$(SOURCE_PACKAGES)" \
44+ -skipPackagePluginValidation || test -d "$(OPENSSL_XCFRAMEWORK)"
45+
46+ $(MAKE) repair_openssl_artifact
47+
48+ repair_openssl_artifact :
49+ @if [ -d " $( OPENSSL_XCFRAMEWORK) " ]; then \
50+ echo " Re-signing $( OPENSSL_XCFRAMEWORK) " ; \
51+ xattr -cr " $( OPENSSL_XCFRAMEWORK) " || true ; \
52+ codesign --remove-signature " $( OPENSSL_XCFRAMEWORK) " 2> /dev/null || true ; \
53+ codesign --force --deep --sign - --timestamp=none " $( OPENSSL_XCFRAMEWORK) " ; \
54+ codesign --verify --deep --strict " $( OPENSSL_XCFRAMEWORK) " ; \
55+ else \
56+ echo " OpenSSL.xcframework artifact not found, skipping signature repair." ; \
57+ fi
58+
59+ $(SCHEMES ) : prepare_packages
3260 xcodebuild \
33- -workspace NexStore.xcworkspace \
61+ -workspace $( WORKSPACE ) \
3462 -scheme " $@ " \
3563 -configuration Release \
3664 -arch arm64 \
3765 -sdk $(PLATFORM ) \
3866 -derivedDataPath $(TMP ) \
39- -clonedSourcePackagesDirPath " $( TMP) /SourcePackages" \
67+ -clonedSourcePackagesDirPath " $( SOURCE_PACKAGES) " \
68+ -disableAutomaticPackageResolution \
4069 -skipPackagePluginValidation \
4170 CODE_SIGNING_ALLOWED=NO \
4271 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
0 commit comments