@crossbind/extension-app-store 2.0.0-beta.80 → 2.0.0-beta.81
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/crossbind.extension.js +6 -5
- package/package.json +1 -1
- package/src/macArchive.js +9 -2
package/crossbind.extension.js
CHANGED
|
@@ -183,12 +183,13 @@ async function uploadIos(api, { key, dsyms, facts }, { project }) {
|
|
|
183
183
|
return { published: { appId: facts.id, version: api.app.appleVersion, build } };
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
// Puts the macOS app crossbind built in an archive Xcode exports to App Store Connect,
|
|
187
|
-
// package in the cloud.
|
|
188
|
-
async function uploadMac(api, { key, facts }, { apps }) {
|
|
186
|
+
// Puts the macOS app crossbind built in an archive, with its dSYM and Hermes', which Xcode exports to App Store Connect,
|
|
187
|
+
// which signs it and its installer package in the cloud.
|
|
188
|
+
async function uploadMac(api, { key, dsyms, facts }, { apps }) {
|
|
189
189
|
const [built] = apps;
|
|
190
190
|
if (!built) throw new Error('crossbind: the build made no macOS app, so nothing went to App Store Connect.');
|
|
191
191
|
const archive = writeArchive(api, built, { team: facts.team });
|
|
192
|
+
addDsyms(archive, dsyms);
|
|
192
193
|
const build = api.app.buildNumber;
|
|
193
194
|
api.log(`crossbind: uploading the app to App Store Connect for team ${facts.team} with ${key ? `the API key ${key.keyId}` : "Xcode's account"}, which signs it and its installer package.`);
|
|
194
195
|
await untilDone(api, () => uploadArchive(api, archive, {
|
|
@@ -280,9 +281,9 @@ export default function appStore() {
|
|
|
280
281
|
const unready = await macRecordMissing(api, key);
|
|
281
282
|
if (unready.length > 0) return { missing: unready };
|
|
282
283
|
const facts = { id: api.app.id, team: api.app.team };
|
|
283
|
-
const dsyms =
|
|
284
|
+
const dsyms = await api.apple.dsyms();
|
|
284
285
|
api.log(`crossbind: publishing ${facts.id} ${api.app.appleVersion} for ${platform.name} to App Store Connect for team ${facts.team}; building the app first.`);
|
|
285
|
-
return { session: { key,
|
|
286
|
+
return { session: { key, dsyms, facts } };
|
|
286
287
|
},
|
|
287
288
|
|
|
288
289
|
// Xcode numbers a build without CROSSBIND_APP_BUILD_NUMBER after those App Store Connect has.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossbind/extension-app-store",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.81",
|
|
4
4
|
"description": "crossbind app extension: uploads an iOS or a macOS app to App Store Connect, for TestFlight and App Review.",
|
|
5
5
|
"homepage": "https://github.com/crossbind/crossbind/tree/main/extensions/app-store#readme",
|
|
6
6
|
"repository": {
|
package/src/macArchive.js
CHANGED
|
@@ -28,8 +28,8 @@ const plist = (root) => [
|
|
|
28
28
|
].join('\n');
|
|
29
29
|
|
|
30
30
|
// The archive Xcode exports for App Store Connect, of the app crossbind built and signed ad hoc, as an archive of Xcode's
|
|
31
|
-
// own holds one: the app under Products/Applications, and an Info.plist that names it, its version
|
|
32
|
-
// takes the app's entitlements from its signature.
|
|
31
|
+
// own holds one: the app under Products/Applications, its dSYM under dSYMs, and an Info.plist that names it, its version
|
|
32
|
+
// and its team. Xcode takes the app's entitlements from its signature.
|
|
33
33
|
export function writeArchive(api, { app, arch }, { team }) {
|
|
34
34
|
const name = path.basename(app, '.app');
|
|
35
35
|
const archive = path.join(api.workDir, `${name}.xcarchive`);
|
|
@@ -56,5 +56,12 @@ export function writeArchive(api, { app, arch }, { team }) {
|
|
|
56
56
|
Name: name,
|
|
57
57
|
SchemeName: name,
|
|
58
58
|
}));
|
|
59
|
+
// App Store Connect asks for the dSYM of each binary. crossbind builds a macOS app without debug information, so its
|
|
60
|
+
// dSYM holds the symbols the binary keeps, which give crash reports functions without files and lines.
|
|
61
|
+
const binary = path.join(applications, path.basename(app), 'Contents', 'MacOS', name);
|
|
62
|
+
const dsym = spawnSync('dsymutil', [binary, '-o', path.join(archive, 'dSYMs', `${path.basename(app)}.dSYM`)], { encoding: 'utf8' });
|
|
63
|
+
if (dsym.error || dsym.status !== 0) {
|
|
64
|
+
throw new Error(`crossbind: dsymutil could not write the dSYM of ${binary}: ${(dsym.stderr || dsym.error?.message || '').trim()}`);
|
|
65
|
+
}
|
|
59
66
|
return archive;
|
|
60
67
|
}
|