spaceship/lib/spaceship/portal/provisioning_profile.rb in fastlane-2.16.0 vs spaceship/lib/spaceship/portal/provisioning_profile.rb in fastlane-2.17.0
- old
+ new
@@ -172,13 +172,10 @@
Direct # Mac-only
else
raise "Can't find class '#{attrs['distributionMethod']}'"
end
- # eagerload the Apps using the same client if we have to.
- attrs['appId'] = App.set_client(@client).factory(attrs['appId'])
-
klass.client = @client
obj = klass.new(attrs)
return obj
end
@@ -256,18 +253,22 @@
# @return (Array) Returns all profiles registered for this account
# If you're calling this from a subclass (like AdHoc), this will
# only return the profiles that are of this type
# @param mac (Bool) (optional): Pass true to get all Mac provisioning profiles
- # @param xcode (Bool) (optional): Pass true to include Xcode managed provisioning profiles
+ # @param xcode DEPRECATED
def all(mac: false, xcode: false)
profiles = client.provisioning_profiles(mac: mac).map do |profile|
self.factory(profile)
end
# filter out the profiles managed by xcode
- profiles.delete_if(&:managed_by_xcode?) unless xcode
+ if xcode
+ warn('Apple API no longer returns XCode managed Provisioning Profiles')
+ else
+ profiles.delete_if(&:managed_by_xcode?)
+ end
return profiles if self == ProvisioningProfile
# To distinguish between AppStore and AdHoc profiles, we need to send
# a details request (see `fetch_details`). This is an expensive operation
@@ -472,10 +473,16 @@
@certificates = (profile_details["certificates"] || []).collect do |cert|
Certificate.set_client(client).factory(cert)
end
end
- return @certificates
+ @certificates
+ end
+
+ def app
+ fetch_details
+
+ App.set_client(client).new(profile_details['appId'])
end
# @return (Bool) Is this current provisioning profile adhoc?
# AppStore and AdHoc profiles are the same except that AdHoc has devices
def is_adhoc?