Leanplum / Leanplum-iOS-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
71 stars 59 forks source link

Fix for warning: "upload task should not contain a body" #574

Closed nzagorchev closed 6 months ago

nzagorchev commented 6 months ago
What Where/Who
People Involved @nzagorchev

Background

Fix for Xcode 15 warning:

The request of a upload task should not contain a body or a body stream, use `upload(for:fromFile`, `upload(for:from`, or supply the body stream through the `urlSession(_:needNewBodyStreamForTask` delegate method.

Issue: https://github.com/Leanplum/Leanplum-iOS-SDK/issues/573

This is reproduced only in Dev mode if App Icons are uploaded.

Implementation

Do not set the request body for upload requests. Set the data into the fromData parameter.

Testing steps

Manual

Is this change backwards-compatible?

Yes