Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ builder ios build ───────► Snapshots working tree (git commit-tr
Triggers workflow_dispatch with snapshot_ref
│
▼
GitHub Actions (macos-14)
GitHub Actions (macos-latest)
├─ Checks out the snapshot ref
├─ Detects Flutter/native
├─ Caches DerivedData
Expand Down Expand Up @@ -401,7 +401,10 @@ internal/
name) to `apply_signing_to_app_target`, which signs each extension-type target (`xcodeproj.ExtensionProductTypes`)
with the longest covering entry or fails naming the ids to add; `write_export_options` exports them
- **Extension Points**: `ios release` composes `distribute.Upload` and
`distribute.SubmitTestFlight`; the `pkg/` wrappers do not expose `asc`.
`distribute.SubmitTestFlight`. `pkg/asc`, `pkg/distribute`, `pkg/release`,
`pkg/signing` and `pkg/ipa` alias the internal packages so another program
(mobai-dev) can drive the same flows; `release.Builder` is the one-method
interface a foreign build backend implements.
- **OTA Install, Not OTA Updates** (`internal/otainstall`): `ios distribute` serves a whole signed IPA
through an `itms-services://` link; iOS installs only development/ad-hoc (device on the profile) or
enterprise builds, so `Inspect` refuses unsigned and App Store IPAs and `CheckDistribution` refuses
Expand All @@ -425,6 +428,11 @@ internal/
- **QR Rendering**: `skip2/go-qrcode` at error-correction Low, Unicode half blocks (two module rows per
line, 2-module quiet zone), light modules as `█` so it scans on a dark terminal (`--qr-invert` for light);
`TestQRFitsATerminal` pins a representative link at 41 modules (version 6). Printed only on a TTY or `--qr`.
- **Signing Sets As A Library**: `signing.Setup` and `signing.EnsureSecrets`
(internal/signing/sets.go) hold the non-interactive core of `signing setup`
and on-demand provisioning; cmd/builder keeps the prompts, the plan and the
summary, and forwards to them under its old names. `signing.Commands` lets an
embedding CLI name its own verbs in the error messages.

## Configuration

Expand Down
3 changes: 2 additions & 1 deletion cmd/builder/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/MobAI-App/ios-builder/internal/github"
"github.com/MobAI-App/ios-builder/internal/otainstall"
"github.com/MobAI-App/ios-builder/internal/release"
"github.com/MobAI-App/ios-builder/internal/signing"
"github.com/MobAI-App/ios-builder/internal/update"
"github.com/MobAI-App/ios-builder/internal/workflow"
"github.com/manifoldco/promptui"
Expand Down Expand Up @@ -475,7 +476,7 @@ func runInit(cmd *cobra.Command, args []string) error {
if cfg.IOS.BundleID == "" {
cfg.IOS.BundleID = detectBundleID(iosPath)
}
syncExtensions(cfg, os.Stdout)
signing.SyncExtensions(cfg, os.Stdout)
if flutterVersion != "" {
cfg.Flutter.Version = flutterVersion
}
Expand Down
21 changes: 3 additions & 18 deletions cmd/builder/signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,8 @@ func isPortalCertificate(path string) bool {
return false
}

// expandPath normalizes a path typed at a prompt. The shell never sees these,
// so a leading ~ is not expanded, and dragging a file into the terminal can
// wrap it in quotes and escape spaces.
func expandPath(path string) string {
path = strings.TrimSpace(path)
path = strings.Trim(path, `"'`)
path = strings.ReplaceAll(path, `\ `, " ")

if path == "~" || strings.HasPrefix(path, "~/") {
home, err := os.UserHomeDir()
if err != nil {
return path
}
path = filepath.Join(home, strings.TrimPrefix(path, "~"))
}
return path
}
// expandPath normalizes a path typed at a prompt (~, quotes, escaped spaces).
func expandPath(path string) string { return signing.ExpandPath(path) }

func runSigningSetup(cmd *cobra.Command, args []string) error {
if certFlag, _ := cmd.Flags().GetString("certificate"); certFlag == "" {
Expand Down Expand Up @@ -341,7 +326,7 @@ func runSigningSetup(cmd *cobra.Command, args []string) error {
}
fmt.Fprintf(out, "Distribution: %s (read from the profile), signing set %s, build profile %q\n", typ, set, profileName)

syncExtensions(cfg, out)
signing.SyncExtensions(cfg, out)
extensionPaths, _ := cmd.Flags().GetStringArray("extension-profile")
extensionFiles := make(map[string][]byte, len(extensionPaths))
for _, path := range extensionPaths {
Expand Down
Loading
Loading