[英]Fastlane Gym change provisioning profile only for one target
I am trying to setup Jenkins
with fastlane
.我正在尝试使用fastlane
设置Jenkins
。 I got two targets in my project - main app and watch kit extension.我的项目中有两个目标 - 主应用程序和手表套件扩展。 When I try to change profile for Ad Hoc signing with xcargs
, gym
change profile for all targets and my builds fail.当我尝试使用xcargs
更改 Ad Hoc 签名的配置文件时, gym
更改所有目标的配置文件并且我的构建失败。
This is my gym command.这是我的健身房命令。
gym(scheme: "MyApp",
workspace: "MyApp.xcworkspace",
xcargs: "PROVISIONING_PROFILE_SPECIFIER='MyApp Ad Hoc'")
This is output.这是输出。
Building MyApp/MyApp WatchKit App [Release]
[08:34:48]: ▸ Check Dependencies
[08:34:48]: ▸ ❌ Provisioning profile "MyApp Ad Hoc" doesn't match the entitlements file's value for the application-identifier entitlement.
How to change profile only for a specific target?如何仅为特定目标更改配置文件? Thank you.谢谢你。
You should use the provisioningProfiles option as follows: 您应按以下方式使用ProvisioningProfiles选项:
gym(
...
export_options:{
signingStyle: "manual",
provisioningProfiles:{
"com.myapp.iosapp": "match AdHoc com.myapp.iosapp"
}
You do not need export_options
at all, if you correctly define sigh
for every target.如果您为每个目标正确定义了sigh
,则根本不需要export_options
。
cert()
sigh(
adhoc: options[:adhoc],
app_identifier: options[:bundle_id],
provisioning_name: options[:provisioning],
ignore_profiles_with_different_name: true,
)
sigh(
adhoc: options[:adhoc],
app_identifier: options[:share_bundle_id],
provisioning_name: options[:share_provisioning],
ignore_profiles_with_different_name: true,
)
build_ios_app(
workspace: PLZ_WORKSPACE,
scheme: options[:scheme],
clean: true,
export_method: options[:adhoc] ? "ad-hoc" : "app-store",
export_xcargs: "-allowProvisioningUpdates",
output_directory: OUTPUT_PATH,
)
Remember that this way you need to manually install your provisioning profiles on CI machine or wherever you gonna run this out.请记住,通过这种方式,您需要在 CI 机器上或您要运行它的任何地方手动安装您的配置文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.