added omemo2
iOS CI / Build and Test SwiftUI App (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build Unsigned iOS IPA (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build macOS ZIP (push) Canceled after 0s

This commit is contained in:
wt
2026-08-30 05:40:44 +07:00
parent 97e8f4bab6
commit 7db327c588
36 changed files with 5042 additions and 114 deletions
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""Post-generation fix for XcodeGen issue #1549: XcodeGen does not link
XCSwiftPackageProductDependency entries to local (path-based) Swift packages,
which makes the Xcode GUI report "Missing package product". This script
attaches the MartinOMEMO product dependencies to the vendored local package
reference in the generated project file.
Run after every `xcodegen generate` (see the Makefile `project` target).
"""
import sys
PBXPROJ = "Luma.xcodeproj/project.pbxproj"
def main() -> int:
with open(PBXPROJ, encoding="utf-8") as handle:
text = handle.read()
# Find the object id of the local package reference.
ref_id = None
for line in text.splitlines():
marker = " /* XCLocalSwiftPackageReference \"ThirdParty/MartinOMEMO\" */ = {"
if marker in line:
ref_id = line.split(" /*")[0].strip()
break
if ref_id is None:
print("patch-xcodeproj: local package reference not found; nothing to do")
return 0
needle = (
"/* MartinOMEMO */ = {\n"
"\t\t\tisa = XCSwiftPackageProductDependency;\n"
"\t\t\tproductName = MartinOMEMO;"
)
patch = (
"/* MartinOMEMO */ = {\n"
"\t\t\tisa = XCSwiftPackageProductDependency;\n"
"\t\t\tpackage = " + ref_id + " /* XCLocalSwiftPackageReference \"ThirdParty/MartinOMEMO\" */;\n"
"\t\t\tproductName = MartinOMEMO;"
)
count = text.count(needle)
if count == 0:
print("patch-xcodeproj: MartinOMEMO product dependencies already linked")
return 0
patched = text.replace(needle, patch)
with open(PBXPROJ, "w", encoding="utf-8") as handle:
handle.write(patched)
print("patch-xcodeproj: linked " + str(count) + " MartinOMEMO product dependencies")
return 0
if __name__ == "__main__":
sys.exit(main())
+3
View File
@@ -10,4 +10,7 @@ if ! command -v xcodegen >/dev/null; then
fi
xcodegen generate
# XcodeGen issue #1549: link the vendored local package to its product
# dependencies, otherwise the Xcode GUI reports "Missing package product".
python3 Scripts/patch-xcodeproj.py
open Luma.xcodeproj
+16
View File
@@ -302,6 +302,22 @@ grep -q 'toolbar(.hidden, for: .tabBar)' Sources/Shared/UI/ChatView.swift || {
echo "The tab bar must be hidden inside a pushed chat"
exit 1
}
grep -q 'PhoneWatchMessageData' Sources/Shared/Services/PhoneWatchBridge.swift || {
echo "The watch bridge must snapshot SwiftData models on the main actor"
exit 1
}
grep -q 'urn:xmpp:omemo:2' Sources/Shared/XMPP/LumaOMEMO2Module.swift || {
echo "OMEMO 2 must be implemented by the app-level module"
exit 1
}
grep -q 'decodeOmemo2OffMain' Sources/Shared/XMPP/XMPPService.swift || {
echo "Incoming messages must route OMEMO 2 payloads to the OMEMO 2 module"
exit 1
}
grep -q 'package = .*XCLocalSwiftPackageReference .ThirdParty/MartinOMEMO.' Luma.xcodeproj/project.pbxproj || {
echo "The vendored MartinOMEMO package must stay linked in the generated project (run make project)"
exit 1
}
grep -q '@Query' Sources/Shared/UI/ChatView.swift || {
echo "Chat timeline must be SwiftData @Query-driven"
exit 1