I am using fastlane
to generate a build.
Here is my environment detail,
Here is a some portion of my fastlane script,
//1. Using match to generate certificate and profile.[Code not shown here]
//2. Disabled automatic code singing
disable_automatic_code_signing(path: "Runner.xcodeproj")
//3. Setting code sign to manual
update_code_signing_settings(
build_configurations: configuration,
use_automatic_signing: false,
profile_name: profileName,
team_id: ENV['IOS_TEAM_ID'],
code_sign_identity: "iPhone Distribution"
)
//4. Running Flutter build iPa command without code signing.
sh_on_root(command: "export LANG=en_US.UTF-8 && export PATH=$PATH:/usr/local/bin && flutter build ipa #{params} --no-codesign")
//5. Generating iPA
build_app(
output_directory: "#{root_path}/build/ios",
build_path: "#{root_path}/build/ios",
archive_path: "#{root_path}/build/ios/archive/Runner.xcarchive",
export_method: method,
scheme: env,
configuration: configuration,
skip_build_archive: true,
workspace: "Runner.xcworkspace",
export_options: {
signingStyle: "manual",
provisioningProfiles: profileMap,
teamID: ENV['IOS_TEAM_ID'],
signingCertificate: "Apple Distribution",
compileBitcode: false
}
)
During 5th step, I am getting error Error Domain=IDEDistributionPipelineErrorDomain Code=0 "Code signing "App.framework" failed." UserInfo={NSLocalizedDescription=Code signing "App.framework" failed., NSLocalizedRecoverySuggestion=View distribution logs for more information.}
What I have already tried,
flutter build ipa
from terminal is working well. I just need to add ExportOptions.plist file.Any suggestion would be helpful.
Update Firing lane execution command from CD machine's terminal is working fine but when Jenkin is firing same command then it is causing issue of code signing.
In my case, build_app
was not able to access keychain and that's why it was showing error of code signing.
I used unlock_keychain
with the appropriate parameter and it started working.