如何解决如何在Fastlane中处理多个iOS目标小部件
我正在尝试将小部件添加到我们的项目中,而fastlane不再能够实现自动化。
- 如何在Fastlane中编辑小部件包标识符
- 如何为正确的目标设置正确的配置文件
我需要的东西
- 在xcode中,应用程序目标应具有捆绑包标识符x.y.z
- 在xcode中,小部件目标应具有捆绑包标识符x.y.z.widget
当前Fastfile通道:
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中为该窗口小部件再添加一个密钥,以指定窗口小部件的配置文件。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。