InjectionIII: Could not locate compile command

Hi, I’m trying to run InjectionIII, but I can’t make it work in my iOS UIKit project. I keep getting Could not locate compile command error. I tried cleaning and rebuilding, but it didn’t work. I checked that Whole Module Optimization is turned off. It would be great if I could borrow someone’s help. Thanks.

💉 ⚠️ Could not locate compile command for /Users/shinichikatayama/ghq/github.com/ExploramedNC7/willow-ios-gen2s/Willow/Willow/Help/HelpViewController.swift.
This could be due to one of the following:
1. Injection does not work with Whole Module Optimization.
2. There are restrictions on characters allowed in paths.
3. File paths in the simulator are case sensitive.
4. The modified source file is not in the current project.
5. The source file is an XCTest that has not been run yet.
Try a build clean then rebuild to make logs available or
consult: "/Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/command.sh".

The content of the command.sh.

❯ cat /Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/command.sh
# search through build logs, most recent first
cd "/Users/shinichikatayama/Library/Developer/Xcode/DerivedData/Willow-fejpcchmllftwnfisuhvzbtspwue/Logs/Build" &&
for log in `ls -t *.xcactivitylog`; do
    #echo "Scanning $log"
    /usr/bin/env perl "/Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/eval101.pl" "$log"     >"/Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/eval101.sh" 2>"/Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/eval101.err" && exit 0
done
exit 1;%

When I run the command.sh, it fails with the following error.

❯ bash /Users/shinichikatayama/Library/Developer/CoreSimulator/Devices/91EAB1A4-F45C-43FC-A0CB-5537FCC81750/data/Containers/Data/Application/CD21982E-3F34-4ED6-BDFD-CAA4F33A300F/tmp/command.sh
ls: *.xcactivitylog: No such file or directory

There’s no xcactivitylog file in the directory. Is this an issue?

❯ ls /Users/shinichikatayama/Library/Developer/Xcode/DerivedData/Willow-fejpcchmllftwnfisuhvzbtspwue/Logs/Build
LogStoreManifest.plist

My environment.

  • M1 Macbook Pro
  • OS: 12.6
  • Xcode 14.0
  • InjectionIII 4.4.0
  • I try to run my app in a Simulator

I confirmed that the Getting Started project works. So I’ll try to check what prevents me from using InjectionIII.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (14 by maintainers)

Most upvoted comments

You can chase it down by running the command.sh from the command line using $ bash <script> and echo’ing $? which should be 0, Then, look at the Perl script it calls to see why it doesn’t grep out a match from the build logs.