Skip to content

Commit 4138ff1

Browse files
committed
modify configure_bundle_id
1 parent bb5ef6e commit 4138ff1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

fastlane/Fastfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,15 @@ platform :ios do
171171
)
172172

173173
def configure_bundle_id(name, identifier, capabilities)
174-
bundle_id = Spaceship::ConnectAPI::BundleId.find(identifier) || Spaceship::ConnectAPI::BundleId.create(name: name, identifier: identifier)
175-
capabilities.each { |capability|
176-
bundle_id.create_capability(capability)
177-
}
174+
bundle_id = Spaceship::ConnectAPI::BundleId.find(identifier) || Spaceship::ConnectAPI::BundleId.create(
175+
name: name,
176+
identifier: identifier,
177+
platform: "IOS"
178+
)
179+
existing = bundle_id.get_capabilities.map(&:capability_type)
180+
capabilities.reject { |c| existing.include?(c) }.each do |cap|
181+
bundle_id.create_capability(cap)
182+
end
178183
end
179184

180185
configure_bundle_id("Loop", "com.#{TEAMID}.loopkit.Loop", [

0 commit comments

Comments
 (0)