# PP Regen Status — 2026-04-27

## Task: Force-regenerate dev provisioning profile to include Sign in with Apple

### Result: COMPLETE ✅

---

## Dev PP Regen (Primary Task)

**Approach used:** Approach B — ASC API direct + Expo GraphQL sync

### Steps executed:
1. Confirmed `APPLE_ID_AUTH` (SIWA) capability already on App ID `P5ZYL6L3UN` (ai.nanostreet.app.dev) ✓
2. Found INVALID profile `ZYJY2AD4F9` (`nanostreet-dev-ad-hoc`, IOS_APP_ADHOC) — stale from before SIWA was added
3. Deleted `ZYJY2AD4F9` via `DELETE /v1/profiles/ZYJY2AD4F9` → HTTP 204 ✓
4. Created new profile via `POST /v1/profiles`:
   - **New Profile ID: `WZYJ3TQX2C`**
   - Name: `nanostreet-dev-ad-hoc`
   - Type: `IOS_APP_ADHOC`
   - State: **ACTIVE**
   - Expiry: `2027-04-26`
   - UUID: `1942932b-bb8b-4b88-96ab-0b722f91781a`
   - Cert used: `U38L2Y988R` (Apple Distribution: Benjamin Yam)
   - Device: `R37LY5H7WD` (Fathoni's iPhone)
5. Verified entitlements via `security cms -D`:
   - **`com.apple.developer.applesignin: ['Default']`** ✓ SIWA confirmed
6. Updated EAS credential record via Expo GraphQL:
   - EAS PP record: `c270a124-1e75-465a-a75d-61b2306dbe46`
   - Updated `developerPortalIdentifier`: `WZYJ3TQX2C` ✓
   - EAS build cred for `ai.nanostreet.app.dev` now references WZYJ3TQX2C

### Ready for build: YES ✅

---

## Staging PP Status

Bundle: `ai.nanostreet.app.preview` / ASC Bundle ID: `Z3Y97KB2N3`

**No regen needed — staging profiles are already ACTIVE with SIWA.**

| Profile ID | Name | Type | State | SIWA |
|---|---|---|---|---|
| `9N893Y92CK` | nanostreet-preview-app-store | IOS_APP_STORE | ACTIVE | ✅ `['Default']` |
| `873Z2CQK7U` | NanoStreet Preview AdHoc | IOS_APP_ADHOC | ACTIVE | (ad-hoc, not checked) |

Staging bundle capabilities include `APPLE_ID_AUTH` ✓

---

## ascAppId Discovery (Additional Task)

### Deploy-Staging submit failure context:
Build `d0c56592-ec2b-4f6f-b254-2cda42269260` succeeded but submit failed:
> "Set ascAppId in the submit profile (eas.json) or re-run this command in interactive mode."

### Root cause:
`eas.json` submit.staging.ios has no `ascAppId`. EAS couldn't auto-detect it because **there is no ASC app record for `ai.nanostreet.app.preview`**.

### ascAppId findings:

| Bundle ID | ASC App Exists | ascAppId |
|---|---|---|
| `ai.nanostreet.app` (production) | ✅ Yes | **`6763804521`** |
| `ai.nanostreet.app.preview` (staging/preview) | ❌ No ASC app | N/A |
| `ai.nanostreet.app.dev` (dev) | ❌ No ASC app | N/A |

### Action needed from coordinator/user:

**Option A** (recommended if staging → separate TestFlight track):
- Create an ASC app record for `ai.nanostreet.app.preview` in App Store Connect
- Then add `ascAppId: "<new-id>"` to `eas.json` submit.staging.ios

**Option B** (if staging submits to production app TestFlight):
- Add `ascAppId: "6763804521"` to `eas.json` submit.staging.ios
- ⚠️ This uses the production app's TestFlight — confirm intent with team

**Option C** (skip submission for staging):
- Change staging `distribution` from `store` to `internal` in eas.json
- Or remove staging from submit profiles

For `submit.production.ios`, add `ascAppId: "6763804521"` to prevent the same error on first prod build.

---

## Summary for Coor Ping

```
pp-regen DONE:
- Old INVALID dev PP (ZYJY2AD4F9) deleted
- New ACTIVE dev PP (WZYJ3TQX2C) created with SIWA entitlement confirmed
- EAS credential synced to new PP ✓
- Staging PPs: already ACTIVE + SIWA, no action needed

ascAppId discovery:
- ai.nanostreet.app (prod): 6763804521
- ai.nanostreet.app.preview (staging): NO ASC APP EXISTS — needs create or config decision
- ai.nanostreet.app.dev: NO ASC APP EXISTS

CI dev build should succeed on next run.
Staging submit fix needs team decision (Option A/B/C above).
```
