slather: [Question] Slather shows error -No object file for requested architecture
I am trying to run slather on my Xcode 7 project slather, but I get the error “Failed to load coverage: No object file for requested architecture”. Here is the command I am running (as per the instructions in http://mgrebenets.github.io/mobile ci/2015/09/21/code-coverage-for-ios-xcode-7/)
bundle exec slather coverage --input-format profdata -s --ignore "../**/*/Xcode*" --output-directory slather-report --scheme MyApp MyApp.xcodeproj
Note 1: The DerivedData folder contains these two files - Coverage.profdata and ProfileData/MyApp-39997.profdata Note 2: my project uses Pods and hence has a corresponding xcworkspace. Does this affect the use of slather?
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 1
- Comments: 15 (1 by maintainers)
Building using
xcodebuildandONLY_ACTIVE_ARCH=YESas @JeremyWright suggested did it for me too.For me, the problem seems to be the WatchKit app
If I rename the WatchKit app to something else, slather seems to work against the correct binary.
UPDATE: Using
--binary-basename MyAppoption (suggested by @haochen08 offline) worked for me.