The island has been dead since June. The two iOS apps in this repo shared one Xcode build directory: the Manager is a fork of the app, so both build a project, a scheme and a target of the same name out of a project file carrying the same internal ids, and Xcode's build database is keyed on exactly those. Only the source path differs, which is not enough to tell them apart. The Manager has no Live Activity target, so its build treated the app's extension as a leftover file and swept it, while the app's build picked up the Manager's object files. What shipped was an app whose embedded extension came from some older build and no longer matched the code around it, so the island had nothing to render. It only ever happened on the self-hosted runner. The hosted ones handed every job a fresh machine, so the directory was always empty and every build was a clean one. Each product now derives its build directory from its own folder, so no two can share one. Both release workflows also assert the extension is inside the IPA before publishing, because an app missing it installs and runs perfectly and says nothing about what is wrong.
76 lines
2.5 KiB
Makefile
Executable File
76 lines
2.5 KiB
Makefile
Executable File
NAME := FTStore
|
|
SCHEME := FTStore
|
|
PLATFORMS := iphoneos maccatalyst
|
|
|
|
# Derived data is keyed on the product directory, never on $(NAME) alone.
|
|
#
|
|
# manager/ is a fork of this tree: same project file name, same scheme, same
|
|
# target name, and — because it was forked rather than recreated — the same
|
|
# pbxproj GUIDs. Xcode's build database is keyed on those GUIDs, so pointing
|
|
# both products at $(TMPDIR)/FTStore leaves it unable to tell them apart. Only
|
|
# SRCROOT differs, and that is not enough: the Manager build has no
|
|
# FTStoreActivity target, so it treats this app's Live Activity extension as a
|
|
# stale file and tries to delete it, while this build finds the Manager's
|
|
# object files sitting in its own intermediates. The result was an IPA whose
|
|
# embedded FTStoreActivity.appex was a leftover from some earlier build and no
|
|
# longer matched the app around it, which is exactly what the Dynamic Island
|
|
# needs in order to render anything.
|
|
#
|
|
# It never showed on the GitHub-hosted runners because every job got a fresh VM
|
|
# and therefore an empty $(TMPDIR). On the self-hosted Mac the directory
|
|
# survives between runs *and* between products, so the two builds trampled each
|
|
# other every time.
|
|
TMP := $(TMPDIR)/$(NAME)-$(notdir $(CURDIR))
|
|
CERT_JSON_URL := https://backloop.dev/pack.json
|
|
|
|
.PHONY: all clean deps $(PLATFORMS)
|
|
|
|
all: $(PLATFORMS)
|
|
|
|
clean:
|
|
rm -rf $(TMP)
|
|
rm -rf packages
|
|
rm -rf Payload
|
|
|
|
deps:
|
|
rm -rf deps || true
|
|
mkdir -p deps
|
|
|
|
curl -fsSL "$(CERT_JSON_URL)" -o cert.json
|
|
jq -r '.cert' cert.json > deps/server.crt
|
|
jq -r '.key1, .key2' cert.json > deps/server.pem
|
|
jq -r '.info.domains.commonName' cert.json > deps/commonName.txt
|
|
|
|
|
|
$(PLATFORMS): deps
|
|
rm -rf _build
|
|
|
|
@if [ "$@" = "iphoneos" ]; then \
|
|
DEST="generic/platform=iOS"; \
|
|
else \
|
|
DEST="generic/platform=macOS,variant=Mac Catalyst"; \
|
|
fi; \
|
|
xcodebuild \
|
|
-project FTStore.xcodeproj \
|
|
-scheme $(SCHEME) \
|
|
-configuration Release \
|
|
-destination "$$DEST" \
|
|
-derivedDataPath $(TMP)/$@ \
|
|
-skipPackagePluginValidation \
|
|
CODE_SIGNING_ALLOWED=NO \
|
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
|
|
|
|
mkdir -p _build/Payload
|
|
cp -R _build/Applications/*.app _build/Payload/FTStore.app
|
|
chmod -R 0755 _build/Payload/FTStore.app
|
|
codesign --force --deep --sign - --timestamp=none _build/Payload/FTStore.app
|
|
cp deps/* _build/Payload/FTStore.app/ || true
|
|
|
|
mkdir -p packages
|
|
|
|
@if [ "$@" = "iphoneos" ]; then \
|
|
ditto -c -k --sequesterRsrc --keepParent _build/Payload "packages/FTStore.ipa"; \
|
|
else \
|
|
ditto -c -k --sequesterRsrc --keepParent _build/Payload/FTStore.app "packages/FTStore_Catalyst.zip"; \
|
|
fi
|