@radhya/mach 2.1.2 → 2.1.4

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/README.md CHANGED
@@ -16,15 +16,15 @@ Install and wire provider-direct APNs/FCM push in the current linked project:
16
16
 
17
17
  ```bash
18
18
  mach push setup
19
- mach push credentials apns --file AuthKey.p8 --team-id TEAMID1234 --key-id KEYID12345
20
- mach push credentials fcm --file firebase-service-account.json
19
+ mach credentials
21
20
  mach push send --user user_123 --title "Hello" --body "Your update is ready."
22
21
  mach push status --days 30
23
22
  ```
24
23
 
25
24
  MACH Push supports Expo development builds and bare React Native. It
26
25
  adds a working default permission, registration, receive, and tap flow while
27
- leaving an editable callback file in the application. It stores encrypted
26
+ leaving an editable callback file in the application. The app config only marks
27
+ push as enabled; MACH stores encrypted
28
28
  device/provider credentials and aggregate delivery counters,
29
29
  but not notification content or per-message history. See
30
30
  [MACH Push](docs/push.md).
@@ -56,7 +56,7 @@ mach build --platform android
56
56
  | `mach maestro` | Queue managed Maestro tests for a build or artifact |
57
57
  | `mach ota` | Setup, publish, list, rollback, and promote OTA updates |
58
58
  | `mach submit` | Submit to App Store or Google Play |
59
- | `mach credentials` | Manage iOS certificates, provisioning profiles & Android keystores |
59
+ | `mach credentials` | Manage build, service, and push notification credentials |
60
60
  | `mach credentials:service` | Upload App Store Connect or Google Play service credentials |
61
61
  | `mach env` | Manage, list, and download environment variables and secrets |
62
62
  | `mach version` | Show and seed DB-owned native version counters |
@@ -319,7 +319,9 @@ Mach handles the managed macOS submission environment internally. No provider-sp
319
319
 
320
320
  ## Credential Management
321
321
 
322
- Manage iOS certificates, provisioning profiles, Android keystores, and App Store Connect API keys — all stored securely in the Dashboard.
322
+ Manage iOS certificates, provisioning profiles, Android keystores, store
323
+ automation keys, and push notification credentials — all stored securely in the
324
+ Dashboard.
323
325
 
324
326
  ```bash
325
327
  # Interactive credential manager
@@ -373,6 +375,25 @@ App Store Connect keys are used for iOS TestFlight submission. Mach stores the k
373
375
 
374
376
  Google Play service keys are only needed for Android store submission. They are not signing credentials. A dev package such as `com.example.app.dev` needs its own Google Play service key only if that exact package exists in Google Play and you submit that package.
375
377
 
378
+ ### Push Notification Credentials
379
+
380
+ Provider-direct APNs and FCM credentials use the same credentials flow:
381
+
382
+ ```bash
383
+ mach credentials
384
+ ```
385
+
386
+ Choose **Push Notifications**. On iOS, Mach can generate one APNs auth key
387
+ with Apple or upload an existing `.p8` key. On Android, upload the Firebase
388
+ service-account JSON once for the selected Android package; the same FCM
389
+ credential serves development, preview, and production. APNs can be saved for
390
+ all environments or only one environment. On Apple's APNs key-limit error,
391
+ Mach can list existing APNs keys, revoke one after confirmation, and retry
392
+ creation in the same session. The Dashboard shows these under **Credentials →
393
+ Service credentials** for the selected bundle identifier or package name. See the
394
+ [MACH Push guide](docs/push.md#generate-the-firebase-service-account-json) for
395
+ the exact Firebase JSON generation steps.
396
+
376
397
  ## Configuration
377
398
 
378
399
  Create a `mach.config.json` in your project root:
@@ -435,9 +456,9 @@ Create a `mach.config.json` in your project root:
435
456
  | `ios.bundleIdentifier` | iOS bundle ID used for signing, version counter scoping, and submit |
436
457
  | `ios.appleTeamId` | Optional global Apple Developer Team ID used for iOS signing. Profile-specific `submit.<profile>.ios.appleTeamId` overrides it |
437
458
  | `ios.ascAppId` | App Store Connect app id used for iOS submission |
438
- | `ios.buildNumber` | Set to `"auto"` to let Mach assign the next iOS CFBundleVersion from its Dashboard counter |
459
+ | `ios.buildNumber` | Use `"auto"` for the next Dashboard counter value, or set an explicit CFBundleVersion such as `"68"` or `"1.2.3"` |
439
460
  | `android.package` | Android package name used for signing, version counter scoping, and submit |
440
- | `android.versionCode` | Set to `"auto"` to let Mach assign the next Android versionCode from its Dashboard counter |
461
+ | `android.versionCode` | Use `"auto"` for the next Dashboard counter value, or set an explicit positive integer |
441
462
 
442
463
  ### Profile Properties
443
464
 
@@ -536,6 +557,8 @@ When `android.versionCode` is set to `"auto"`, Mach assigns an Android versionCo
536
557
 
537
558
  When `ios.buildNumber` is set to `"auto"`, Mach assigns the next iOS CFBundleVersion from the scoped Dashboard counter. Concurrent builds are safe because the Dashboard API increments the counter atomically.
538
559
 
560
+ When either field contains an explicit value, Mach uses that exact value without incrementing the counter. Profile-level `build.<profile>.ios.buildNumber` and `build.<profile>.android.versionCode` values override the root platform values. The resolved Mach value is authoritative: runners reuse the saved assignment, native projects receive it after Expo prebuild, and Mach rejects an artifact whose packaged value differs.
561
+
539
562
  This only changes iOS `CFBundleVersion` / build number. It does not bump the public App Store version (`CFBundleShortVersionString`, usually `expo.version` in `app.json`). After a version like `1.17.0` is approved/released, Apple closes that train for new uploads; bump the app version, for example to `1.17.1`, rebuild, then submit.
540
563
 
541
564
  Regular iOS development builds should set `distribution: "development"` and resolve Apple Development certificates/profiles. For custom profile names, Mach follows the profile fields, not the profile name: `environment` chooses Dashboard secrets, and `distribution` / `iosExportMethod` chooses signing. Dev-client builds can keep `distribution: "internal"` and set `developmentClient: true`; Mach will still use development signing credentials while producing an internal installable artifact.