safari-pilot 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/Safari Pilot.app/Contents/CodeResources +0 -0
- package/bin/Safari Pilot.app/Contents/Info.plist +2 -2
- package/bin/Safari Pilot.app/Contents/MacOS/Safari Pilot +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Info.plist +2 -2
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/MacOS/Safari Pilot Extension +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/background.js +1 -1
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/manifest.json +1 -1
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/_CodeSignature/CodeResources +4 -4
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib +0 -0
- package/bin/Safari Pilot.app/Contents/_CodeSignature/CodeResources +8 -8
- package/bin/Safari Pilot.zip +0 -0
- package/extension/background.js +1 -1
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/ExportOptions.plist +12 -0
- package/scripts/build-extension.sh +139 -55
|
Binary file
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
<key>CFBundlePackageType</key>
|
|
24
24
|
<string>APPL</string>
|
|
25
25
|
<key>CFBundleShortVersionString</key>
|
|
26
|
-
<string>0.1.
|
|
26
|
+
<string>0.1.3</string>
|
|
27
27
|
<key>CFBundleSupportedPlatforms</key>
|
|
28
28
|
<array>
|
|
29
29
|
<string>MacOSX</string>
|
|
30
30
|
</array>
|
|
31
31
|
<key>CFBundleVersion</key>
|
|
32
|
-
<string>
|
|
32
|
+
<string>202604130112</string>
|
|
33
33
|
<key>DTCompiler</key>
|
|
34
34
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
|
35
35
|
<key>DTPlatformBuild</key>
|
|
Binary file
|
package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Info.plist
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<key>CFBundlePackageType</key>
|
|
20
20
|
<string>XPC!</string>
|
|
21
21
|
<key>CFBundleShortVersionString</key>
|
|
22
|
-
<string>0.1.
|
|
22
|
+
<string>0.1.3</string>
|
|
23
23
|
<key>CFBundleSupportedPlatforms</key>
|
|
24
24
|
<array>
|
|
25
25
|
<string>MacOSX</string>
|
|
26
26
|
</array>
|
|
27
27
|
<key>CFBundleVersion</key>
|
|
28
|
-
<string>
|
|
28
|
+
<string>202604130112</string>
|
|
29
29
|
<key>DTCompiler</key>
|
|
30
30
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
|
31
31
|
<key>DTPlatformBuild</key>
|
|
Binary file
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|
274
274
|
// Health check
|
|
275
275
|
if (message && message.type === 'ping') {
|
|
276
|
-
sendResponse({ ok: true, type: 'pong', extensionVersion: '0.1.
|
|
276
|
+
sendResponse({ ok: true, type: 'pong', extensionVersion: '0.1.3' });
|
|
277
277
|
return false;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Resources/background.js</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
YQeuy+RDagFvm9//cADKdVDy4W4=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Resources/content-isolated.js</key>
|
|
12
12
|
<data>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</data>
|
|
31
31
|
<key>Resources/manifest.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
KBx4xWUdKq5//V4dRehmhEXQ2O0=
|
|
34
34
|
</data>
|
|
35
35
|
</dict>
|
|
36
36
|
<key>files2</key>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<dict>
|
|
40
40
|
<key>hash2</key>
|
|
41
41
|
<data>
|
|
42
|
-
|
|
42
|
+
H1HhxSSl4FdA4o6EMn/fa4376J5Nt8sGu+3XJDjZ0NU=
|
|
43
43
|
</data>
|
|
44
44
|
</dict>
|
|
45
45
|
<key>Resources/content-isolated.js</key>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<dict>
|
|
82
82
|
<key>hash2</key>
|
|
83
83
|
<data>
|
|
84
|
-
|
|
84
|
+
1fEqyuOEntyd+2dNiknwAKkRf2qtkntZFiZEXw8fVhU=
|
|
85
85
|
</data>
|
|
86
86
|
</dict>
|
|
87
87
|
</dict>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
</data>
|
|
19
19
|
<key>Resources/Base.lproj/Main.storyboardc/Info.plist</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
a2VT/xdcFLUwKaa1rN2i7aG440U=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
z4wrX6ZIT8Vqga4FNrBhl7p4mgI=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
c/6Czv7zqEUm5pSNZBYPHtK3FtY=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
|
|
32
32
|
<data>
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
<dict>
|
|
52
52
|
<key>cdhash</key>
|
|
53
53
|
<data>
|
|
54
|
-
|
|
54
|
+
FDsh/+d1zp5QDu11arAcMRJbB24=
|
|
55
55
|
</data>
|
|
56
56
|
<key>requirement</key>
|
|
57
|
-
<string>identifier "com.safari-pilot.app.Extension" and
|
|
57
|
+
<string>anchor apple generic and identifier "com.safari-pilot.app.Extension" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = V37WLKRXUJ)</string>
|
|
58
58
|
</dict>
|
|
59
59
|
<key>Resources/AppIcon.icns</key>
|
|
60
60
|
<dict>
|
|
@@ -81,21 +81,21 @@
|
|
|
81
81
|
<dict>
|
|
82
82
|
<key>hash2</key>
|
|
83
83
|
<data>
|
|
84
|
-
|
|
84
|
+
kU2qRLrLe541khk8eANsHzAtUmih9nX13wl52uwLW2c=
|
|
85
85
|
</data>
|
|
86
86
|
</dict>
|
|
87
87
|
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
|
|
88
88
|
<dict>
|
|
89
89
|
<key>hash2</key>
|
|
90
90
|
<data>
|
|
91
|
-
|
|
91
|
+
A4bMEIxWI848pN6hafSHG4ceWz5z8KeLEo1BcKEYTAc=
|
|
92
92
|
</data>
|
|
93
93
|
</dict>
|
|
94
94
|
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
|
|
95
95
|
<dict>
|
|
96
96
|
<key>hash2</key>
|
|
97
97
|
<data>
|
|
98
|
-
|
|
98
|
+
rT9p1f1TolVuhgan6fPW/bNoeuJmP2w/ql/1GKZRLBo=
|
|
99
99
|
</data>
|
|
100
100
|
</dict>
|
|
101
101
|
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
|
package/bin/Safari Pilot.zip
CHANGED
|
Binary file
|
package/extension/background.js
CHANGED
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|
274
274
|
// Health check
|
|
275
275
|
if (message && message.type === 'ping') {
|
|
276
|
-
sendResponse({ ok: true, type: 'pong', extensionVersion: '0.1.
|
|
276
|
+
sendResponse({ ok: true, type: 'pong', extensionVersion: '0.1.3' });
|
|
277
277
|
return false;
|
|
278
278
|
}
|
|
279
279
|
|
package/extension/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>method</key>
|
|
6
|
+
<string>developer-id</string>
|
|
7
|
+
<key>teamID</key>
|
|
8
|
+
<string>V37WLKRXUJ</string>
|
|
9
|
+
<key>signingCertificate</key>
|
|
10
|
+
<string>Developer ID Application</string>
|
|
11
|
+
</dict>
|
|
12
|
+
</plist>
|
|
@@ -7,15 +7,17 @@ EXT_DIR="$ROOT/extension"
|
|
|
7
7
|
APP_DIR="$ROOT/app"
|
|
8
8
|
XCODE_PROJECT_DIR="$APP_DIR/Safari Pilot"
|
|
9
9
|
BUNDLE_ID="com.safari-pilot.app"
|
|
10
|
+
SIGN_IDENTITY="Developer ID Application: Aakash Kumar (V37WLKRXUJ)"
|
|
11
|
+
TEAM_ID="V37WLKRXUJ"
|
|
10
12
|
|
|
11
|
-
# Read version from package.json — single source of truth
|
|
12
13
|
VERSION=$(python3 -c "import json; print(json.load(open('$ROOT/package.json'))['version'])")
|
|
13
14
|
BUILD_NUMBER=$(date +%Y%m%d%H%M)
|
|
14
15
|
|
|
15
16
|
echo "=== Safari Pilot Extension Build ==="
|
|
16
17
|
echo "Version: $VERSION (build $BUILD_NUMBER)"
|
|
17
18
|
|
|
18
|
-
# Step 1: Generate Xcode project
|
|
19
|
+
# ── Step 1: Generate Xcode project ──────────────────────────────────────────
|
|
20
|
+
|
|
19
21
|
echo "Generating Xcode project..."
|
|
20
22
|
xcrun safari-web-extension-packager "$EXT_DIR" \
|
|
21
23
|
--project-location "$APP_DIR" \
|
|
@@ -26,28 +28,76 @@ xcrun safari-web-extension-packager "$EXT_DIR" \
|
|
|
26
28
|
--no-prompt \
|
|
27
29
|
--force
|
|
28
30
|
|
|
29
|
-
# The packager generates the project inside a subdirectory named after the app
|
|
30
|
-
# Resulting path: app/Safari Pilot/Safari Pilot.xcodeproj
|
|
31
31
|
if [ ! -d "$XCODE_PROJECT_DIR/Safari Pilot.xcodeproj" ]; then
|
|
32
|
-
echo "ERROR: Xcode project not found
|
|
32
|
+
echo "ERROR: Xcode project not found"
|
|
33
33
|
exit 1
|
|
34
34
|
fi
|
|
35
35
|
|
|
36
|
-
# Step 2:
|
|
37
|
-
|
|
38
|
-
# instead of our explicit com.safari-pilot.app — causing embedded binary validation failure.
|
|
39
|
-
# Fix: replace the auto-derived ID with our explicit bundle ID in both Debug and Release configs.
|
|
36
|
+
# ── Step 2: Patch Xcode project ─────────────────────────────────────────────
|
|
37
|
+
|
|
40
38
|
PBXPROJ="$XCODE_PROJECT_DIR/Safari Pilot.xcodeproj/project.pbxproj"
|
|
41
|
-
|
|
39
|
+
|
|
40
|
+
echo "Fixing bundle identifier..."
|
|
42
41
|
sed -i '' "s/PRODUCT_BUNDLE_IDENTIFIER = \"com.safari-pilot.Safari-Pilot\";/PRODUCT_BUNDLE_IDENTIFIER = \"$BUNDLE_ID\";/g" "$PBXPROJ"
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
echo "Setting version $VERSION (build $BUILD_NUMBER) in Xcode project..."
|
|
43
|
+
echo "Setting version $VERSION (build $BUILD_NUMBER)..."
|
|
46
44
|
sed -i '' "s/MARKETING_VERSION = .*;/MARKETING_VERSION = $VERSION;/g" "$PBXPROJ"
|
|
47
45
|
sed -i '' "s/CURRENT_PROJECT_VERSION = .*;/CURRENT_PROJECT_VERSION = $BUILD_NUMBER;/g" "$PBXPROJ"
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
echo "Setting manual signing with Developer ID..."
|
|
48
|
+
sed -i '' "s/CODE_SIGN_STYLE = Automatic;/CODE_SIGN_STYLE = Manual;/g" "$PBXPROJ"
|
|
49
|
+
sed -i '' "s/DEVELOPMENT_TEAM = \"\";/DEVELOPMENT_TEAM = $TEAM_ID;/g" "$PBXPROJ"
|
|
50
|
+
|
|
51
|
+
# ── Step 3: Create entitlements files for manual signing ────────────────────
|
|
52
|
+
|
|
53
|
+
APP_ENTITLEMENTS="$XCODE_PROJECT_DIR/Safari Pilot/Safari Pilot.entitlements"
|
|
54
|
+
EXT_ENTITLEMENTS="$XCODE_PROJECT_DIR/Safari Pilot Extension/Safari Pilot Extension.entitlements"
|
|
55
|
+
|
|
56
|
+
cat > "$APP_ENTITLEMENTS" <<'PLIST'
|
|
57
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
58
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
59
|
+
<plist version="1.0">
|
|
60
|
+
<dict>
|
|
61
|
+
<key>com.apple.security.app-sandbox</key>
|
|
62
|
+
<true/>
|
|
63
|
+
<key>com.apple.security.files.user-selected.read-only</key>
|
|
64
|
+
<true/>
|
|
65
|
+
<key>com.apple.security.network.client</key>
|
|
66
|
+
<true/>
|
|
67
|
+
</dict>
|
|
68
|
+
</plist>
|
|
69
|
+
PLIST
|
|
70
|
+
|
|
71
|
+
cat > "$EXT_ENTITLEMENTS" <<'PLIST'
|
|
72
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
73
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
74
|
+
<plist version="1.0">
|
|
75
|
+
<dict>
|
|
76
|
+
<key>com.apple.security.app-sandbox</key>
|
|
77
|
+
<true/>
|
|
78
|
+
<key>com.apple.security.files.user-selected.read-only</key>
|
|
79
|
+
<true/>
|
|
80
|
+
</dict>
|
|
81
|
+
</plist>
|
|
82
|
+
PLIST
|
|
83
|
+
|
|
84
|
+
# Inject entitlements paths into the pbxproj build settings
|
|
85
|
+
# App target: insert CODE_SIGN_ENTITLEMENTS after PRODUCT_BUNDLE_IDENTIFIER for app
|
|
86
|
+
sed -i '' '/PRODUCT_BUNDLE_IDENTIFIER = "com.safari-pilot.app";/{
|
|
87
|
+
a\
|
|
88
|
+
\t\t\t\tCODE_SIGN_ENTITLEMENTS = "Safari Pilot/Safari Pilot.entitlements";
|
|
89
|
+
}' "$PBXPROJ"
|
|
90
|
+
|
|
91
|
+
# Extension target: insert CODE_SIGN_ENTITLEMENTS after PRODUCT_BUNDLE_IDENTIFIER for extension
|
|
92
|
+
sed -i '' '/PRODUCT_BUNDLE_IDENTIFIER = "com.safari-pilot.app.Extension";/{
|
|
93
|
+
a\
|
|
94
|
+
\t\t\t\tCODE_SIGN_ENTITLEMENTS = "Safari Pilot Extension/Safari Pilot Extension.entitlements";
|
|
95
|
+
}' "$PBXPROJ"
|
|
96
|
+
|
|
97
|
+
echo "Entitlements created and wired into project"
|
|
98
|
+
|
|
99
|
+
# ── Step 4: Create placeholder Icon.png if missing ──────────────────────────
|
|
100
|
+
|
|
51
101
|
ICON_PATH="$XCODE_PROJECT_DIR/Safari Pilot/Resources/Icon.png"
|
|
52
102
|
if [ ! -f "$ICON_PATH" ]; then
|
|
53
103
|
echo "Creating placeholder Icon.png..."
|
|
@@ -76,73 +126,107 @@ with open('$ICON_PATH', 'wb') as f:
|
|
|
76
126
|
"
|
|
77
127
|
fi
|
|
78
128
|
|
|
79
|
-
# Step 5:
|
|
80
|
-
|
|
129
|
+
# ── Step 5: Archive ─────────────────────────────────────────────────────────
|
|
130
|
+
|
|
131
|
+
ARCHIVE_PATH="$ROOT/.build/extension/Safari Pilot.xcarchive"
|
|
132
|
+
|
|
133
|
+
echo "Archiving app (Release)..."
|
|
81
134
|
cd "$XCODE_PROJECT_DIR"
|
|
82
|
-
xcodebuild \
|
|
135
|
+
xcodebuild archive \
|
|
83
136
|
-project "Safari Pilot.xcodeproj" \
|
|
84
137
|
-scheme "Safari Pilot" \
|
|
85
138
|
-configuration Release \
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
rm -rf "$ROOT/bin/Safari Pilot.app"
|
|
95
|
-
cp -R "$APP_PATH" "$ROOT/bin/Safari Pilot.app"
|
|
96
|
-
echo "Copied to bin/Safari Pilot.app"
|
|
97
|
-
else
|
|
98
|
-
echo "ERROR: Built app not found in derived data"
|
|
139
|
+
-archivePath "$ARCHIVE_PATH" \
|
|
140
|
+
CODE_SIGN_IDENTITY="$SIGN_IDENTITY" \
|
|
141
|
+
DEVELOPMENT_TEAM="$TEAM_ID" \
|
|
142
|
+
OTHER_CODE_SIGN_FLAGS="--timestamp" \
|
|
143
|
+
2>&1
|
|
144
|
+
|
|
145
|
+
if [ ! -d "$ARCHIVE_PATH" ]; then
|
|
146
|
+
echo "ERROR: Archive not created"
|
|
99
147
|
exit 1
|
|
100
148
|
fi
|
|
101
149
|
|
|
102
|
-
echo "
|
|
150
|
+
echo "Archive created at: $ARCHIVE_PATH"
|
|
151
|
+
|
|
152
|
+
# ── Step 6: Export archive ──────────────────────────────────────────────────
|
|
153
|
+
|
|
154
|
+
EXPORT_DIR="$ROOT/.build/extension/Export"
|
|
155
|
+
EXPORT_OPTIONS="$ROOT/scripts/ExportOptions.plist"
|
|
156
|
+
|
|
157
|
+
cat > "$EXPORT_OPTIONS" <<PLIST
|
|
158
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
159
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
160
|
+
<plist version="1.0">
|
|
161
|
+
<dict>
|
|
162
|
+
<key>method</key>
|
|
163
|
+
<string>developer-id</string>
|
|
164
|
+
<key>teamID</key>
|
|
165
|
+
<string>$TEAM_ID</string>
|
|
166
|
+
<key>signingCertificate</key>
|
|
167
|
+
<string>Developer ID Application</string>
|
|
168
|
+
</dict>
|
|
169
|
+
</plist>
|
|
170
|
+
PLIST
|
|
171
|
+
|
|
172
|
+
echo "Exporting archive..."
|
|
173
|
+
xcodebuild -exportArchive \
|
|
174
|
+
-archivePath "$ARCHIVE_PATH" \
|
|
175
|
+
-exportPath "$EXPORT_DIR" \
|
|
176
|
+
-exportOptionsPlist "$EXPORT_OPTIONS" \
|
|
177
|
+
2>&1
|
|
178
|
+
|
|
179
|
+
EXPORTED_APP="$EXPORT_DIR/Safari Pilot.app"
|
|
180
|
+
if [ ! -d "$EXPORTED_APP" ]; then
|
|
181
|
+
echo "ERROR: Export failed — app not found in $EXPORT_DIR"
|
|
182
|
+
exit 1
|
|
183
|
+
fi
|
|
103
184
|
|
|
104
|
-
|
|
185
|
+
echo "Exported to: $EXPORTED_APP"
|
|
105
186
|
|
|
106
|
-
|
|
107
|
-
APP_PATH="$ROOT/bin/Safari Pilot.app"
|
|
108
|
-
APPEX_PATH="$APP_PATH/Contents/PlugIns/Safari Pilot Extension.appex"
|
|
187
|
+
# ── Step 7: Copy to bin/ ────────────────────────────────────────────────────
|
|
109
188
|
|
|
110
|
-
|
|
189
|
+
mkdir -p "$ROOT/bin"
|
|
190
|
+
rm -rf "$ROOT/bin/Safari Pilot.app"
|
|
191
|
+
cp -R "$EXPORTED_APP" "$ROOT/bin/Safari Pilot.app"
|
|
192
|
+
echo "Copied to bin/Safari Pilot.app"
|
|
193
|
+
|
|
194
|
+
APP_PATH="$ROOT/bin/Safari Pilot.app"
|
|
111
195
|
|
|
112
|
-
# Step
|
|
113
|
-
echo "Signing .appex..."
|
|
114
|
-
codesign --force --options runtime --timestamp \
|
|
115
|
-
--sign "$SIGN_IDENTITY" \
|
|
116
|
-
"$APPEX_PATH"
|
|
196
|
+
# ── Step 8: Verify signature and entitlements ───────────────────────────────
|
|
117
197
|
|
|
118
|
-
|
|
119
|
-
echo "Signing .app..."
|
|
120
|
-
codesign --force --options runtime --timestamp \
|
|
121
|
-
--sign "$SIGN_IDENTITY" \
|
|
122
|
-
"$APP_PATH"
|
|
198
|
+
echo "=== Verification ==="
|
|
123
199
|
|
|
124
|
-
|
|
125
|
-
echo "Verifying code signature..."
|
|
200
|
+
echo "Code signature:"
|
|
126
201
|
codesign --verify --deep --strict --verbose=2 "$APP_PATH"
|
|
127
202
|
|
|
203
|
+
echo ""
|
|
204
|
+
echo "App entitlements:"
|
|
205
|
+
codesign -d --entitlements - "$APP_PATH" 2>&1 | grep -v "^Executable"
|
|
206
|
+
|
|
207
|
+
echo ""
|
|
208
|
+
echo "Extension entitlements:"
|
|
209
|
+
codesign -d --entitlements - "$APP_PATH/Contents/PlugIns/Safari Pilot Extension.appex" 2>&1 | grep -v "^Executable"
|
|
210
|
+
|
|
211
|
+
# ── Step 9: Notarize ────────────────────────────────────────────────────────
|
|
212
|
+
|
|
128
213
|
echo "=== Notarizing ==="
|
|
129
214
|
|
|
130
|
-
# Step 9: Create ZIP for notarization
|
|
131
215
|
ditto -c -k --keepParent "$APP_PATH" "$ROOT/bin/Safari Pilot.zip"
|
|
132
216
|
|
|
133
|
-
# Step 10: Submit for notarization and wait
|
|
134
217
|
xcrun notarytool submit "$ROOT/bin/Safari Pilot.zip" \
|
|
135
218
|
--keychain-profile "apple-notarytool" --wait
|
|
136
219
|
|
|
137
|
-
# Step 11: Staple the ticket
|
|
138
220
|
xcrun stapler staple "$APP_PATH"
|
|
139
221
|
|
|
140
|
-
#
|
|
222
|
+
# Re-zip with stapled ticket
|
|
141
223
|
rm "$ROOT/bin/Safari Pilot.zip"
|
|
142
224
|
ditto -c -k --keepParent "$APP_PATH" "$ROOT/bin/Safari Pilot.zip"
|
|
143
225
|
|
|
144
|
-
# Step
|
|
145
|
-
|
|
226
|
+
# ── Step 10: Final Gatekeeper check ─────────────────────────────────────────
|
|
227
|
+
|
|
228
|
+
echo "=== Final Verification ==="
|
|
146
229
|
spctl -a -t exec -vv "$APP_PATH"
|
|
230
|
+
xcrun stapler validate "$APP_PATH"
|
|
147
231
|
|
|
148
|
-
echo "===
|
|
232
|
+
echo "=== Build Complete: v$VERSION (build $BUILD_NUMBER) ==="
|