periphery
periphery copied to clipboard
Periphery scan fails when target's Supported Platform differs from main app target
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.
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 try to select "Any iOS Device" as a run destination for Periphery target. It works for me.