I’m trying to build an iOS project in Fastlane. Here is my Fastfile:
default_platform(:ios)
platform :ios do
desc "Description of what the lane does"
lane :metrics do
scan(scheme: "ABC",
code_coverage: true,
derived_data_path: "./DerivedData",
output_directory: "./sonar-reports",
configuration: "Debug",
workspace: "ABC.xcworkspace",
sdk: "iphonesimulator",
destination: "platform=iOS Simulator,name=iPhone 15,OS=17.0.1"
)
end
end
When I run fastlane metrics, I got the following error message:
** BUILD FAILED **
The following build commands failed:
CodeSign /Users/user/ABC/DerivedData/Build/Products/Debug-iphonesimulator/MJRefresh/MJRefresh.framework (in target ‘MJRefresh’ from project ‘Pods’)
CodeSign /Users/user/ABC/DerivedData/Build/Products/Debug-iphonesimulator/INTULocationManager/INTULocationManager.framework (in target ‘INTULocationManager’ from project ‘Pods’)
CodeSign /Users/user/ABC/DerivedData/Build/Products/Debug-iphonesimulator/PromisesObjC/FBLPromises.framework (in target ‘PromisesObjC’ from project ‘Pods’)
Apparently it fails in my Podfiles. But it’s fine to run my project in Xcode or build with xcodebuild command:
xcodxcodebuild \
-workspace ABC.xcworkspace \
-scheme "ABC" \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0.1' \
test
I think there must be something wrong in my Fastfile configuration. Can anybody suggest what I should do? Thanks.




