Skip to content

Commit 371293e

Browse files
authored
Fix OAuth redirect opening production app in dev builds (#5405)
## Summary - Change default URL scheme in `Info.plist` from `omi-computer` (production) to `omi-computer-dev` - Add explicit `omi-computer` URL scheme override in `build.sh` and `codemagic.yaml` for release builds - Prevents dev/test builds from accidentally registering the production OAuth redirect scheme **Before:** Any manually created test bundle would steal the `omi-computer://` scheme from the production app, causing OAuth login to redirect to the wrong app. **After:** Test bundles default to `omi-computer-dev://`, which doesn't conflict with production. Release builds explicitly set `omi-computer://`. ## Test plan - [ ] `./run.sh` dev build uses `omi-computer-dev` scheme (already did before, no change) - [ ] `./build.sh` release build uses `omi-computer` scheme (new explicit override) - [ ] Manual test bundles (copying Info.plist) default to `omi-computer-dev` (safe) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
2 parents 7facb6d + 963bf80 commit 371293e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

codemagic.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,7 @@ workflows:
21362136
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $BUNDLE_ID" "$APP_BUNDLE/Contents/Info.plist"
21372137
/usr/libexec/PlistBuddy -c "Set :CFBundleName $APP_NAME" "$APP_BUNDLE/Contents/Info.plist"
21382138
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName $APP_NAME" "$APP_BUNDLE/Contents/Info.plist"
2139+
/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 omi-computer" "$APP_BUNDLE/Contents/Info.plist"
21392140
/usr/libexec/PlistBuddy -c "Set :LSMinimumSystemVersion 14.0" "$APP_BUNDLE/Contents/Info.plist"
21402141
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" \
21412142
"$APP_BUNDLE/Contents/Info.plist" 2>/dev/null || \

desktop/Desktop/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<string>Omi Auth Callback</string>
5151
<key>CFBundleURLSchemes</key>
5252
<array>
53-
<string>omi-computer</string>
53+
<string>omi-computer-dev</string>
5454
</array>
5555
</dict>
5656
</array>

desktop/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ cp omi_icon.icns "$APP_BUNDLE/Contents/Resources/OmiIcon.icns"
8989
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $BUNDLE_ID" "$APP_BUNDLE/Contents/Info.plist"
9090
/usr/libexec/PlistBuddy -c "Set :CFBundleName $APP_NAME" "$APP_BUNDLE/Contents/Info.plist"
9191
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName $APP_NAME" "$APP_BUNDLE/Contents/Info.plist"
92+
/usr/libexec/PlistBuddy -c "Set :CFBundleURLTypes:0:CFBundleURLSchemes:0 omi-computer" "$APP_BUNDLE/Contents/Info.plist"
9293

9394
# Copy Sparkle framework
9495
SWIFT_BUILD_DIR=$(swift build -c release --package-path Desktop --show-bin-path)

0 commit comments

Comments
 (0)