我处于需要自动删除应用商店配置文件的情况。我尝试了fastlane match nuke distribution
,但它撤销了证书,我只想删除配置文件。
此脚本可以完成,您需要传递TeamID和bundellID
lane :delete_profiles do |options|
require "spaceship"
ENV['FASTLANE_TEAM_ID'] = options[:team_id]
Spaceship::Portal.select_team
matching_profiles = Spaceship::Portal.provisioning_profile.app_store.find_by_bundle_id(bundle_id: options[:bundle_id])
Spaceship::Portal.client.delete_provisioning_profile!(matching_profiles.first.id)
end
fastlane delete_profiles bundle_id:'YourBundelID'team_id:'YourTeamId']>
由于我的Apple ID已添加到多个团队中,所以我只选择第一个团队。然后通过ID获取配置文件,然后将其删除。