作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试向我们的项目添加小部件,而 faSTLane 无法再自动化了。
desc "Build the app and send it to Testflight for testing"
lane :build_adhoc do
UI.message("app_name: #{app_name}")
UI.message("app_identifier: #{app_identifier}")
UI.message("apple_id: #{apple_id}")
UI.message("team_id: #{team_id}")
UI.message("sku: #{sku}")
xcodeprojpath = "../ios/" + app_name + ".xcodeproj"
proj = Xcodeproj::Project.open("../" + xcodeprojpath)
proj.build_configurations.each do |item|
item.build_settings["DEVELOPMENT_TEAM"] = team_id
item.build_settings["PROVISIONING_PROFILE_SPECIFIER"] = match_ad_hoc_provisioning
item.build_settings["CODE_SIGN_IDENTITY[sdk=iphoneos*]"] = match_ad_hoc_signing
item.build_settings["SWIFT_VERSION"] = swift_version
item.build_settings["ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"] = "YES"
end
proj.recreate_user_schemes
proj.save
begin
disable_automatic_code_signing
rescue => ex
UI.message("failed to disable automatic signing")
UI.error(ex)
end
get_certificates(
development: false,
username: apple_id,
team_id: team_id,
)
unlock_keychain(
password: keychainPassword,
)
#bumpBuildNumber
sigh(username: apple_id, adhoc: true, readonly: false, app_identifier: app_identifier, team_id: team_id) #force: false,
gym(export_method: "ad-hoc",
clean: true,
configuration: "Release",
codesigning_identity: match_ad_hoc_signing,
export_team_id: team_id,
skip_profile_detection: true,
export_options: {
method: "ad-hoc",
signingStyle: "manual",
provisioningProfiles: { "#{app_identifier}": "#{match_ad_hoc_provisioning}" },
})
end
最佳答案
gym(export_method: "ad-hoc",
clean: true,
configuration: "Release",
codesigning_identity: match_ad_hoc_signing,
export_team_id: team_id,
skip_profile_detection: true,
export_options: {
method: "ad-hoc",
signingStyle: "manual",
provisioningProfiles: { "#{app_identifier}": "#{match_ad_hoc_provisioning}" },
{ "#{widget_identifier}": "#{match_ad_hoc_provisioning_for_widget}" }
})
您可以在export_options->provisioningProfiles 中为widget 添加一个key,用于指定widget 的provisioning profile。
关于ios - 如何在 faSTLane 中处理多个 iOS 目标(小部件),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64208343/
我是一名优秀的程序员,十分优秀!