periphery icon indicating copy to clipboard operation
periphery copied to clipboard

'no such module' when scanning a project with CocoaPods

Open abbydomi opened this issue 1 year ago • 3 comments

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. Screenshot 2024-09-23 at 10 41 33

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.

abbydomi avatar Sep 23 '24 08:09 abbydomi

If you use the --verbose option, you'll see the xcodebuild command being executed. Does running that same command directly succeed?

ileitch avatar Dec 18 '24 00:12 ileitch

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.

smorkolama avatar Dec 18 '24 14:12 smorkolama

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.

Polari avatar Aug 14 '25 09:08 Polari

@smorkolama's comment about specifying the destination is the correct fix.

ileitch avatar Dec 20 '25 22:12 ileitch