periphery icon indicating copy to clipboard operation
periphery copied to clipboard

Periphery scan fails when target's Supported Platform differs from main app target

Open justTil opened this issue 11 months ago • 2 comments

When using Periphery in Xcode using the aggregated target, the Build Setting > Supported Platforms has to be the same as your main build platforms.

F.e. if your main target only iOS and you have macOS selected in periphery target, then it will crash and give an error similar to this:

Building ProjectName... error: Shell command 'xcodebuild -project '/pahtToProject/ProjectName.xcodeproj' 
-scheme 'ProjectName.xcodeproj' -parallelizeTargets -derivedDataPath '/caches/com.github.peripheryapp/DerivedData-....' 
-quiet build-for-testing CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" 
DEBUG_INFORMATION_FORMAT="dwarf" COMPILER_INDEX_STORE_ENABLE="YES" INDEX_ENABLE_DATA_STORE="YES"' 
returned exit status '65': ld: building for 'iOS', but linking in dylib 

(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest) built for 'zippered(macOS/Catalyst)' clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution: Set the same supported platforms and maybe add this step/checkup to the documentation please. Image

justTil avatar Feb 11 '25 23:02 justTil

Hey, have the same problem. Setting Supported Platforms to match main app does not fix the problem for me. Is there any other solutions?

Arideno avatar Mar 12 '25 09:03 Arideno

@Arideno try to select "Any iOS Device" as a run destination for Periphery target. It works for me.

adurymanov avatar May 11 '25 18:05 adurymanov