# Fix iOS Bundle Identifier Install Failure

2026-05-24 Issue dreamio-tnv Dreamio iOS bundle metadata

## Summary

Fixed the Xcode device install failure by adding the missing app bundle metadata to `Dreamio/Info.plist`. The key fix is `CFBundleIdentifier`, which now resolves from the target's existing `PRODUCT_BUNDLE_IDENTIFIER` build setting.

## Changes Made

- Added `CFBundleIdentifier` to the explicit Info.plist so Xcode can identify the built app bundle.
- Added related standard bundle keys for executable name, display name, package type, and version fields.
- Used Xcode build setting placeholders instead of hard-coded duplicate values.

## Context

The install error said Xcode could not get the identifier for `Dreamio.app` and suggested ensuring `CFBundleIdentifier` exists. The project already defined `PRODUCT_BUNDLE_IDENTIFIER = com.kell.dreamio`, but `GENERATE_INFOPLIST_FILE` is set to `NO`, so Xcode uses the checked-in plist as the source of truth.

Because the plist did not include `CFBundleIdentifier`, the processed app bundle was invalid for device installation.

## Important Implementation Details

Bundle ID`$(PRODUCT_BUNDLE_IDENTIFIER)` resolves to `com.kell.dreamio`.
Version`$(MARKETING_VERSION)` resolves to `0.1.0`.
Build`$(CURRENT_PROJECT_VERSION)` resolves to `1`.

This keeps Debug and Release behavior aligned with the target build settings. If the app identifier changes later, it only needs to change in the Xcode project build settings.

## Relevant Diff Snippets

The diff below follows the diffs.com guidance for patch-style diff rendering with `@pierre/diffs`. A plain preformatted fallback is included so the document remains readable offline.

    diff --git a/Dreamio/Info.plist b/Dreamio/Info.plist
    index 9451a6a..a037c11 100644
    --- a/Dreamio/Info.plist
    +++ b/Dreamio/Info.plist
    @@ -2,6 +2,22 @@
     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     <plist version="1.0">
     <dict>
    +	<key>CFBundleDisplayName</key>
    +	<string>$(PRODUCT_NAME)</string>
    +	<key>CFBundleExecutable</key>
    +	<string>$(EXECUTABLE_NAME)</string>
    +	<key>CFBundleIdentifier</key>
    +	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    +	<key>CFBundleInfoDictionaryVersion</key>
    +	<string>6.0</string>
    +	<key>CFBundleName</key>
    +	<string>$(PRODUCT_NAME)</string>
    +	<key>CFBundlePackageType</key>
    +	<string>APPL</string>
    +	<key>CFBundleShortVersionString</key>
    +	<string>$(MARKETING_VERSION)</string>
    +	<key>CFBundleVersion</key>
    +	<string>$(CURRENT_PROJECT_VERSION)</string>
     	<key>UIApplicationSceneManifest</key>
     	<dict>
     		<key>UIApplicationSupportsMultipleScenes</key>

## Expected Impact for End-Users

Developers should be able to install and run Dreamio from Xcode without the app bundle being rejected as invalid for a missing identifier. The app's visible behavior is unchanged.

## Validation

- Ran `plutil -lint Dreamio/Info.plist`; the plist is valid.
- Built the app with `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -project Dreamio.xcodeproj -scheme Dreamio -configuration Debug -destination 'generic/platform=iOS Simulator' -derivedDataPath /tmp/dreamio-derived build`; the build succeeded.
- Read the processed bundle plist at `/tmp/dreamio-derived/Build/Products/Debug-iphonesimulator/Dreamio.app/Info.plist` and confirmed `CFBundleIdentifier = com.kell.dreamio`.
- Closed Beads issue `dreamio-tnv`. `bd dolt pull` failed afterward with `Error 1105: no remote`, so Beads sync was blocked by local Dolt remote configuration.

The first direct `xcodebuild` attempt failed because the active developer directory is `/Library/Developer/CommandLineTools`. Validation used `DEVELOPER_DIR` to point only this command at `/Applications/Xcode.app`, leaving the global machine setting unchanged.

## Issues, Limitations, and Mitigations

- I validated a simulator build, not a physical-device install. The original failure path should be addressed because the processed bundle now has the missing identifier.
- The target still has an empty `DEVELOPMENT_TEAM`. If physical-device signing fails next, set the team in Xcode's Signing & Capabilities tab.
- The repo is currently on a detached `HEAD`, so push behavior may need special handling depending on the intended branch workflow.
- Beads Dolt sync is not currently available from this worktree because `bd dolt pull` reports no remote.

## Follow-up Work

- Run once on the actual iPhone from Xcode to confirm install and launch on device.
- Consider setting a project development team if this app should install from fresh checkouts without manual signing setup.