-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathproject.yml
More file actions
182 lines (174 loc) · 6.64 KB
/
Copy pathproject.yml
File metadata and controls
182 lines (174 loc) · 6.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: ForgeSignMobile
options:
bundleIdPrefix: com.forgesign
deploymentTarget:
iOS: "16.0"
createIntermediateGroups: true
settings:
base:
SWIFT_VERSION: "6.0"
IPHONEOS_DEPLOYMENT_TARGET: "16.0"
DEVELOPMENT_TEAM: ""
CODE_SIGNING_ALLOWED: "NO"
CODE_SIGNING_REQUIRED: "NO"
CODE_SIGN_IDENTITY: ""
ENABLE_BITCODE: "NO"
ENABLE_DEBUG_DYLIB: "NO"
packages:
AltSign:
url: https://github.com/rileytestut/AltSign.git
# Last upstream revision before the public Swift Package disabled Apple
# Account authentication for Marketplace builds.
revision: 4746156408ca633bbfce4c267949053ca45886fe
targets:
ForgeSignMobile:
type: application
platform: iOS
sources:
- path: App
- path: Bridge
- path: vendor/zsign
excludes:
- "zsign.cpp"
- "third-party/minizip/iowin32.c"
- "third-party/minizip/iowin32.h"
- "third-party/minizip/mztools.c"
- "third-party/minizip/mztools.h"
# AltSign supplies the same minizip ABI. Compile it only once to
# avoid duplicate symbols while keeping zsign's headers unchanged.
- "third-party/minizip/ioapi.c"
- "third-party/minizip/unzip.c"
- "third-party/minizip/zip.c"
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.forgesign.mobile
PRODUCT_NAME: ForgeSign
INFOPLIST_FILE: Info.plist
GENERATE_INFOPLIST_FILE: NO
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
TARGETED_DEVICE_FAMILY: "1,2"
SWIFT_OBJC_BRIDGING_HEADER: Bridge/ForgeSignBridge.h
SWIFT_ACTIVE_COMPILATION_CONDITIONS: FORGE_BRIDGE
CLANG_CXX_LANGUAGE_STANDARD: c++11
CLANG_CXX_LIBRARY: libc++
GCC_C_LANGUAGE_STANDARD: gnu11
HEADER_SEARCH_PATHS:
- $(SRCROOT)/vendor/zsign
- $(SRCROOT)/vendor/zsign/common
- $(SRCROOT)/vendor/zsign/third-party/zlib
- $(SRCROOT)/vendor/openssl/include
LIBRARY_SEARCH_PATHS:
- $(SRCROOT)/vendor/openssl
OTHER_LDFLAGS:
- -lcrypto
- -lssl
SWIFT_OPTIMIZATION_LEVEL: -Onone
GCC_PREPROCESSOR_DEFINITIONS:
- ZSIGN_VERSION=0.1.0
configs:
Release:
SWIFT_OPTIMIZATION_LEVEL: "-O"
dependencies:
- package: AltSign
product: AltSign-Dynamic
embed: true
# Vendored idevice FFI (MIT). Rebuild with
# scripts/build_idevice_xcframework.sh; the Swift wrapper is guarded by
# `#if canImport(IDevice)` so the app still builds without it.
- framework: vendor/idevice/IDevice.xcframework
embed: false
codeSign: false
ForgeSignMobileTests:
type: bundle.unit-test
platform: iOS
sources:
- path: Tests
dependencies:
- target: ForgeSignUISim
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.forgesign.mobile.tests
PRODUCT_NAME: ForgeSignMobileTests
GENERATE_INFOPLIST_FILE: YES
TARGETED_DEVICE_FAMILY: "1,2"
# UI-preview target for the iOS Simulator. The real app is device-only (the
# vendored OpenSSL has no simulator slice), so this target compiles just the
# SwiftUI/App layer WITHOUT the zsign bridge or OpenSSL — no FORGE_BRIDGE, no
# bridging header, no link flags. Signing is stubbed (see SigningService), but
# layout, navigation and the Sources/repo networking all run in the simulator.
# Safe to delete if you don't want a simulator preview build.
ForgeSignUISim:
type: application
platform: iOS
sources:
- path: App
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.forgesign.mobile.uisim
PRODUCT_NAME: ForgeSignUISim
INFOPLIST_FILE: Info.plist
GENERATE_INFOPLIST_FILE: NO
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
TARGETED_DEVICE_FAMILY: "1,2"
schemes:
ForgeSignMobile:
build:
targets:
ForgeSignMobile: all
preActions:
- name: Prepare AltSign dependency
settingsTarget: ForgeSignMobile
script: |
# This AltSign revision refers to OpenSSL's former `ios` folder;
# its pinned OpenSSL revision renamed that folder to `iphoneos`.
# Repair only the package checkout, before dependency compilation.
SOURCE_PACKAGES_ROOT="${BUILD_DIR%%/Build/*}/SourcePackages"
OPENSSL_ROOT="$SOURCE_PACKAGES_ROOT/checkouts/AltSign/Dependencies/OpenSSL"
if [ -L "$OPENSSL_ROOT/ios" ] && [ ! -e "$OPENSSL_ROOT/ios" ]; then
rm "$OPENSSL_ROOT/ios"
fi
if [ -d "$OPENSSL_ROOT/iphoneos" ] && [ ! -e "$OPENSSL_ROOT/ios" ]; then
ln -s iphoneos "$OPENSSL_ROOT/ios"
fi
# Xcode 16 no longer expands the recursive header paths emitted by
# this pre-Marketplace revision. Its remaining paths are relative
# to the generated .xcodeproj, so give them the expected root.
ALTSIGN_SOURCE="$SOURCE_PACKAGES_ROOT/checkouts/AltSign/AltSign"
ALTSIGN_HEADER_ROOT="$PROJECT_FILE_PATH/AltSign"
if [ -L "$ALTSIGN_HEADER_ROOT" ] && [ ! -e "$ALTSIGN_HEADER_ROOT" ]; then
rm "$ALTSIGN_HEADER_ROOT"
fi
if [ -d "$ALTSIGN_SOURCE" ] && [ ! -e "$ALTSIGN_HEADER_ROOT" ]; then
ln -s "$ALTSIGN_SOURCE" "$ALTSIGN_HEADER_ROOT"
fi
# Experimental Apple GSA workaround based on AltSign PRs #47/#48/#49/#53:
# use a current AuthKit User-Agent and retry transient 5xx responses over
# a fresh URLSession connection. Keep this as a patch over the
# pinned dependency so the existing signing implementation remains
# unchanged and the experiment can be removed independently.
ALTSIGN_AUTH_PATCH="$SRCROOT/vendor/altsign-gsa-http503.patch"
if [ -f "$ALTSIGN_AUTH_PATCH" ] && [ -d "$ALTSIGN_SOURCE" ]; then
if git -C "$ALTSIGN_SOURCE" apply --check "$ALTSIGN_AUTH_PATCH" >/dev/null 2>&1; then
git -C "$ALTSIGN_SOURCE" apply --whitespace=nowarn "$ALTSIGN_AUTH_PATCH"
elif git -C "$ALTSIGN_SOURCE" apply --reverse --check "$ALTSIGN_AUTH_PATCH" >/dev/null 2>&1; then
:
else
echo "error: AltSign GSA workaround no longer applies to the resolved dependency"
exit 1
fi
fi
ForgeSignUISim:
build:
targets:
ForgeSignUISim: all
run:
config: Debug
ForgeSignMobileTests:
build:
targets:
ForgeSignUISim: all
ForgeSignMobileTests: [test]
test:
config: Debug
targets:
- name: ForgeSignMobileTests