-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
af_setImage doesn't work well with iOS 13 #370
Comments
Same problem |
Same problem. iOS 13 is releasing in a couple of weeks and our app is totally unusable due to this issue. We either need to stop using AlamofireImage or someone needs to give us more info. Thank you very much **Alamofire version: 4.8.2 |
All of our tests and demo project are working fine on iOS 13, so please provide additional information and, most helpfully, a demo project that reproduces the issue in the simulator. This includes:
You should also be retesting on the new betas as you go, as this year's beta process has been particularly buggy. |
Are you testing with iOS 13 SDK? Because the App developed for iOS 13 in Xcode 11 doesn't work well with Alamofire, instead, the same app that is already on the store for iOS 11 or superior, works fine. sample of code using af_setImage: The images are all .jpg or .png, furthermore there are no errors or warnings. There isn't a rule that make the images not loading, for example, sometimes it doesn't load the heavy images and sometimes it doesn't load the lights images. |
Yes, the testing was performed with Xcode 11 beta 6 on the iOS 13 simulator. If you could perform some investigation on your side to narrow down why images might not be showing up, we could think investigate a fix. It could be a few things:
Answering those questions would help narrow down a fix. |
I've tried and I found that this part of code in the af_setImage function is never called
|
Where does it return before then? From the initial |
sometimes, after |
That doesn't make much sense. Are you building with optimization? |
yes, it's set on Optimize for speed [-O] |
Please turn that off and test again, as it prevent breakpoints from working correctly. |
I turnet all the optimizations to No Optimization, but it doesn't work anyway |
Right, but you should now be able to trace the path more accurately. |
ok, now it enter in the code and the |
Right. You should be able to check the |
if I do a
|
Yes, you must turn off optimizations for debugging to work correctly. |
it's off |
There are other settings that can interfere with debugging. At this point this doesn't look like an AlamofireImage bug. Please continue debugging until you discover the cause, and if it is a bug, please comment and I can reopen the issue. |
In my case, I add support to the "application/octet-stream" into the acceptableImageContentTypes fix my problem
In iOS 13 Release note have the following statement: To enhance security, URLSession no longer sniffs the MIME type when the server sends Content-Type: application/octet-stream. (7820658) https://developer.apple.com/documentation/ios_ipados_release_notes/ios_13_release_notes |
Hi and in the console i see i tried the octet-stream from previous comment. didn't help |
I found myself having this issue when I recently upgraded to Xcode 11. I can confirm the above was the actual issue, and adding the image content type fixed it for me. Not sure if ImageDownloader should have a default configuration for this, or the developer should always need to add this image content type. Either way, I feel it should be explained in the readme file. Thanks. |
We've added the Cheers. 🍻 |
This is just for record and may help other developers in future.
AlamofireImage (3.6.0), Alamofire (4.9.1) |
I faced this issue(even in iOS 15, AlamofireImage 4.2.0). I was using af.setImage to download and set images. The images were perfectly downloading from every url, other than the images in aws s3 bucket. The s3 bucket images weren't downloading and displaying properly. But the images in s3 have response content type "binary/octet-stream", so although the images are downloading perfectly and can be further retrieved from response data, they're getting AlamofireImage.AFIError.alamofireError(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableContentType(..)) and so they are unable to set in the imageview. AFAIK AFI should include "binary/octet-stream" in the acceptable content-type as well! |
Yes had same issue and I solved it this way
|
AlamofireImage 4.2.0 should have both |
What did you do?
I'm having problems with Alamofire image with iOS 13, some images are loaded and placed, but other not. Is this a known problem with iOS 13? How can I fix it?
Alamofire Environment
**Alamofire version: 4.8.2
**Alamofire Image version: 3.5.2
**Xcode version: 11
**Swift version: 4
**Platform(s) running AlamofireImage: iOS 13
macOS version running Xcode:
Demo Project
ℹ Please link to or upload a project we can download that reproduces the issue.
The text was updated successfully, but these errors were encountered: