spaceship/lib/spaceship/tunes/app_submission.rb in fastlane-2.63.0 vs spaceship/lib/spaceship/tunes/app_submission.rb in fastlane-2.64.0.beta.20171101010004
- old
+ new
@@ -69,11 +69,10 @@
# @return (String) Export Compliance - Platform
attr_accessor :export_compliance_platform
attr_mapping({
# Ad ID Info Section
- 'adIdInfo.limitsTracking.value' => :add_id_info_uses_idfa,
'adIdInfo.servesAds.value' => :add_id_info_serves_ads,
'adIdInfo.tracksAction.value' => :add_id_info_tracks_action,
'adIdInfo.tracksInstall.value' => :add_id_info_tracks_install,
'adIdInfo.usesIdfa.value' => :add_id_info_uses_idfa,
@@ -129,9 +128,19 @@
raw_data_clone = raw_data.dup
if self.content_rights_has_rights.nil? || self.content_rights_contains_third_party_content.nil?
raw_data_clone.set(["contentRights"], nil)
end
raw_data_clone.delete("version")
+
+ # Check whether the application makes use of IDFA or not
+ # and automatically set the mandatory limitsTracking value in the request JSON accordingly.
+ if !self.add_id_info_uses_idfa.nil? && self.add_id_info_uses_idfa == true
+ # Application uses IDFA, before sending for submission limitsTracking key in the request JSON must be set to true (agreement).
+ raw_data_clone.set(
+ ["adIdInfo", "limitsTracking", "value"],
+ true
+ )
+ end
client.send_app_submission(application.apple_id, application.edit_version.version_id, raw_data_clone)
@submitted_for_review = true
end