deliver/lib/deliver/submit_for_review.rb in fastlane-2.221.0 vs deliver/lib/deliver/submit_for_review.rb in fastlane-2.221.1
- old
+ new
@@ -18,11 +18,10 @@
end
build = select_build(options, app, version, platform)
update_export_compliance(options, app, build)
- update_idfa(options, app, version)
update_submission_information(options, app)
create_review_submission(options, app, version, platform)
UI.success("Successfully submitted the app for review!")
end
@@ -116,85 +115,9 @@
usesNonExemptEncryption: uses_encryption
})
UI.verbose("Successfully updated build for export compliance status of '#{build.uses_non_exempt_encryption}' on App Store Connect")
end
- end
-
- def update_idfa(options, app, version)
- submission_information = options[:submission_information] || {}
- submission_information = submission_information.transform_keys(&:to_sym)
-
- uses_idfa = submission_information[:add_id_info_uses_idfa]
-
- idfa_declaration = begin
- version.fetch_idfa_declaration
- rescue
- nil
- end
-
- updated_idfa = false
-
- # Set IDFA on version
- unless uses_idfa.nil?
- UI.verbose("Updating app store version for IDFA status of '#{uses_idfa}'")
- version = version.update(attributes: {
- usesIdfa: uses_idfa
- })
- UI.verbose("Updated app store version for IDFA status of '#{version.uses_idfa}'")
- updated_idfa = true
- end
-
- # Error if uses_idfa not set
- if version.uses_idfa.nil?
- message = [
- "Use of Advertising Identifier (IDFA) is required to submit",
- "Add information to the :submission_information option...",
- " Docs: http://docs.fastlane.tools/actions/deliver/#compliance-and-idfa-settings",
- " Example: submission_information: { add_id_info_uses_idfa: false }",
- " Example: submission_information: {",
- " add_id_info_uses_idfa: true,",
- " add_id_info_serves_ads: false,",
- " add_id_info_tracks_install: true,",
- " add_id_info_tracks_action: true,",
- " add_id_info_limits_tracking: true",
- " }",
- " Example CLI:",
- " --submission_information \"{\\\"add_id_info_uses_idfa\\\": false}\""
- ].join("\n")
- UI.user_error!(message)
- end
-
- # Create, update, or delete IDFA declaration
- if uses_idfa == false
- if idfa_declaration
- UI.verbose("Deleting IDFA declaration")
- idfa_declaration.delete!
- updated_idfa = true
- UI.verbose("Deleted IDFA declaration")
- end
- elsif uses_idfa == true
- attributes = {
- honorsLimitedAdTracking: !!submission_information[:add_id_info_limits_tracking],
- servesAds: !!submission_information[:add_id_info_serves_ads],
- attributesAppInstallationToPreviousAd: !!submission_information[:add_id_info_tracks_install],
- attributesActionWithPreviousAd: !!submission_information[:add_id_info_tracks_action]
- }
-
- if idfa_declaration
- UI.verbose("Updating IDFA declaration")
- idfa_declaration.update(attributes: attributes)
- UI.verbose("Updated IDFA declaration")
- else
- UI.verbose("Creating IDFA declaration")
- version.create_idfa_declaration(attributes: attributes)
- UI.verbose("Created IDFA declaration")
- end
-
- updated_idfa = true
- end
-
- UI.success("Successfully updated IDFA declarations on App Store Connect") if updated_idfa
end
def update_submission_information(options, app)
submission_information = options[:submission_information] || {}
submission_information = submission_information.transform_keys(&:to_sym)