Fastlane如何自动删除配置文件?

问题描述 投票:0回答:1

我处于需要自动删除应用商店配置文件的情况。我尝试了fastlane match nuke distribution,但它撤销了证书,我只想删除配置文件。

ios fastlane
1个回答
0
投票

此脚本可以完成,您需要传递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获取配置文件,然后将其删除。

© www.soinside.com 2019 - 2024. All rights reserved.