'no such module' when scanning a project with CocoaPods
Periphery is installed via homebrew and at the latest version as of this post, when running the scan command it fails to find pods, when building the specified target outside of the aggregate it builds and the app launches. Periphery by terminal also fails with the same 'no such module found' error.
I'm not really sure what is causing the issue or what I might've done wrong, it was working and after removing a couple pods from the podfile to migrate them to SPM it started not detecting other pods.
If you use the --verbose option, you'll see the xcodebuild command being executed. Does running that same command directly succeed?
I had something similar with our Cocoapods project today and for me it was a binary-only framework that gave the same kind of error.
Running Periphery like this: periphery scan --verbose -- -sdk iphoneos -destination generic/platform=iOS solved it for me by explicitly forcing the right platform/sdk. Feel free to ignore this comment if not relevant to this issue.
I had the same issue, no idea how it had worked before but I found the problem was the xcodebuild command using --project [project].xcproject instead of --workspace [project].xcworkspace. Periphery uses the same flag for both so for the periphery command this meant doing periphery scan --project [project].xcworkspace instead of periphery scan --project [project].xcproject.
@smorkolama's comment about specifying the destination is the correct fix.