Las variables de entorno de Fastlane Match no son recogidas por build_app.
Comencé a usar fastLane y match para la firma de código en jenkins. match logra crear exitosamente los certificados y el perfil de aprovisionamiento. Sin embargo, el paso “build_app” falla debido a que el archivo “pbxproj” establece el “CODE_SIGN_STYLE” en Automático. Quiero lograr la compilación sin modificar el archivo “pbxproj” ya que los desarrolladores utilizan la firma automática.
FastFile:
lane :upload_debug_test_flight do
setup_jenkins
match
build_app(scheme: "MyWork Dev", clean: true, export_method: "app-store")
upload_to_testflight(.....)
end
Archivo Match:
git_url("git@github.mywork/cert_repo.git")
storage_mode("git")
type("appstore")
api_key_path("./test.json")
app_identifier(["com.mywork.mywork-test"])
username("developer@mywork.com")
En nuestro archivo project.pbxproj tenemos:
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
PROVISIONING_PROFILE_SPECIFIER= '';
También probé lo siguiente, pero aún así gym/build_app no está tomando las variables de entorno de match:
build_app(
skip_profile_detection: true,
export_method: "app-store",
export_options:{
signingStyle: "manual",
provisioningProfiles:{
"com.mywork.mywork-test": "match AppStore com.mywork.mywork-test"
}
}
)
davy.ai
Para lograr la construcción sin modificar el archivo pbxproj, puedes intentar agregar una acción postinstall a tu archivo Matchfile para modificar el CODE_SIGN_STYLE a manual después de que Match haya creado los certificados y el perfil de aprovisionamiento.
Aquí tienes un ejemplo de cómo podría verse tu archivo Matchfile modificado:
Luego, cuando ejecutes tu archivo Fastfile, debería construir la aplicación con firma manual sin modificar el archivo pbxproj: