원클릭으로
macos-app-launch-fix
Fix Sparkle framework rpath issue when launching debug macOS api2agent app
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fix Sparkle framework rpath issue when launching debug macOS api2agent app
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | macos-app-launch-fix |
| description | Fix Sparkle framework rpath issue when launching debug macOS api2agent app |
| source | auto-skill |
| extracted_at | 2026-06-02T07:06:43.787Z |
When building and running the macOS api2agent app in debug mode, the Sparkle framework may not be found at runtime due to incorrect rpath configuration. This causes the app to crash immediately with:
Library not loaded: @rpath/Sparkle.framework/Versions/B/Sparkle
When launching the debug build, you must set the DYLD_FRAMEWORK_PATH environment variable to include both the build output directory and the Sparkle framework location.
# Build with Swift Package Manager
cd macos/api2agent && swift build
# Launch with correct framework path
DYLD_FRAMEWORK_PATH=/path/to/api2agent/.build/arm64-apple-macosx/debug:\
/path/to/api2agent/.build/checkouts/sparkle/Sparkle.framework \
/path/to/api2agent/.build/arm64-apple-macosx/debug/api2agent
# Find the built app
XC_BUILD=$(find ~/Library/Developer/Xcode/DerivedData/api2agent-* \
-name "api2agent" -path "*/Build/Products/Debug/api2agent" -type f | head -1)
XC_BUILD_DIR=$(dirname "$XC_BUILD")
# Launch with framework path
DYLD_FRAMEWORK_PATH="$XC_BUILD_DIR:$XC_BUILD_DIR/PackageFrameworks" "$XC_BUILD"
Create macos/api2agent/run.sh for convenience:
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR="$SCRIPT_DIR/.build/arm64-apple-macosx/debug"
if [ -f "$BUILD_DIR/api2agent" ]; then
export DYLD_FRAMEWORK_PATH="$BUILD_DIR:$SCRIPT_DIR/.build/checkouts/sparkle/Sparkle.framework"
exec "$BUILD_DIR/api2agent"
fi
# Fall back to Xcode build
DERIVED_DATA="$HOME/Library/Developer/Xcode/DerivedData"
XC_BUILD=$(find "$DERIVED_DATA" -name "api2agent" -path "*/Build/Products/Debug/api2agent" -type f 2>/dev/null | head -1)
if [ -n "$XC_BUILD" ]; then
XC_BUILD_DIR=$(dirname "$XC_BUILD")
export DYLD_FRAMEWORK_PATH="$XC_BUILD_DIR:$XC_BUILD_DIR/PackageFrameworks"
exec "$XC_BUILD"
fi
echo "Error: Could not find api2agent binary"
exit 1
App settings are stored in:
~/Library/Application Support/api2agent/settings.jsonTo force window mode (not menu-bar only), create the settings file:
mkdir -p ~/Library/Application\ Support/api2agent
echo '{"menuBarOnly":false,"port":8787}' > ~/Library/Application\ Support/api2agent/settings.json
# Check process
ps aux | grep api2agent | grep -v grep
# Test local API server
curl -s http://127.0.0.1:8787/v1/models
DYLD_FRAMEWORK_PATHmenuBarOnly setting or press Cmd+Tab to switch to the appIMKCFRunLoopWakeUpReliable errors are harmless, ignore them