johnno1962 / InjectionIII

Re-write of Injection for Xcode in (mostly) Swift
MIT License
4.09k stars 320 forks source link

Inject III without Xcode on first Startup not working #518

Closed regenrek closed 1 month ago

regenrek commented 2 months ago

Hi,

I'm currently building my project with xcodegen (will also try later with xcode-gen-server).

Example:

xcodebuild -project "${PROJECT_NAME}.xcodeproj" -scheme "${PROJECT_NAME}" \
    -configuration Debug \
    -destination "platform=iOS Simulator,name=${SIMULATOR_NAME}" \
    -derivedDataPath "${BUILD_DIR}" \
    ONLY_ACTIVE_ARCH=YES \
    CODE_SIGN_IDENTITY="" \
    CODE_SIGNING_REQUIRED=NO \
    CODE_SIGNING_ALLOWED=NO \
    clean build

Then i run the simulator afterwards.

xcrun simctl boot "$SIMULATOR_ID" || { echo "Error: Failed to boot simulator with ID $SIMULATOR_ID"; exit 1; }
open -a Simulator
xcrun simctl install booted "$APP_PATH"
xcrun simctl launch booted "$APP_BUNDLE_ID"

So any clue why I have to build it one time with XCode before?

Related Question for Next https://github.com/johnno1962/InjectionNext/issues/21

johnno1962 commented 2 months ago

InjectionIII parses the build logs created by Xcode to work out how to recompile files so you need to have built at least once inside Xcode for it to work.