13

EDIT : note that this issue is now resolved in Xcode 9.3, hourrah !

OK, it's a Xcode bug, but does anyone has a workaround for this ?

Since I made the update to Xcode 9 and compile my app, I get a bug with my images. All images in my app get distorted, only on iOS 8. I have to point out that when recompiling the exact same project with Xcode 8, every image shows well !

Here is my launch screen when my app is run on iOS 8, then on iOS 9 (or 10 or 11), both with Xcode 9.

launchscreen comparaison

I know that some people encounter this bug with Xcode 8 beta 6 (Xcode 8 simulator ios 8 image get distorted and Xcode 8 beta 6 - App image broken in iOS 8) but they say this was a Xcode bug that was resolved in Xcode 8 GM. I can't find anybody having this issue in Xcode 9.

Xcode 9 brings many changes to images assets, so I've tried to play with them (ticking "Preserve Vector Data", changing to "Individual scales" etc) but it didn't helped.

I'm using Xcode 9.2 (9C40b), which I think is the last Xcode version available.

Does anybody has a clue for this ?

AnthoPak
  • 4,191
  • 3
  • 23
  • 41
  • Possible duplicate of [Xcode 8 simulator ios 8 image get distorted](https://stackoverflow.com/questions/38972093/xcode-8-simulator-ios-8-image-get-distorted) – Tamás Sengel Jan 02 '18 at 10:39
  • 1
    @the4kman I have specified in my question that I've seen this post, and that it doesn't answer the question as it should be resolved in Xcode 8 GM. So it is not a duplicate at all. – AnthoPak Jan 02 '18 at 10:41
  • The issue, sadly, persisted and didn't get a full fix in Xcode 9 GM. Other questions were flagged as duplicates as well, including this one: https://stackoverflow.com/questions/48019309/image-in-assets-xcassets-rendering-error?noredirect=1&lq=1 – Tamás Sengel Jan 02 '18 at 10:44
  • None of the answers of these posts stated that it still appear in Xcode 9, that's why I had to ask. Someone stated that for Xcode 8 : "The GM build fixed this problem". Have you got any advice to resolve the problem thought ? – AnthoPak Jan 02 '18 at 10:47
  • Sadly, this bug did not get a fix of any kind AFAIK. Use a physical device for testing if you can. – Tamás Sengel Jan 02 '18 at 10:52
  • I've tried on physical device and the bug append… That's why it's so a concern for me. – AnthoPak Jan 02 '18 at 10:53

2 Answers2

10

Can refer on Xcode 9 Release Notes https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW936

Two workarounds :

  • Build the app using Xcode 9.1 (official download link)

  • OR use Xcode 9.2 and set the deployment target to iOS 8.4 or later.

It works for me. The first one is recommended as the second will only allow iOS 8.4 support.

AnthoPak
  • 4,191
  • 3
  • 23
  • 41
mastermind
  • 116
  • 2
  • 3
  • Thanks for your answer. But I think that if I set deployment target to iOS 8.4, earlier versions won't work isn't it ? – AnthoPak Jan 05 '18 at 18:05
  • Yes, if u set to iOS 8.4 earlier version won't work. It's better if you use Xcode 9.1 to compile your project. – mastermind Jan 15 '18 at 10:20
  • For anyone wondering, here's the download link for Xcode 9.1 https://download.developer.apple.com/Developer_Tools/Xcode_9.1/Xcode_9.1.xip – AnthoPak Jan 22 '18 at 18:18
  • Something else to consider. There is no reason to support iOS 8. Any iOS device that is running iOS 8 can be updated to iOS 9 (or possibly later). – rmaddy Jan 26 '18 at 17:11
  • 2
    @rmaddy Totally agree, but I still notice a few users on iOS 8 on my apps. I think those people don't update for few reasons (I'm especially thinking of jailbreak for example) – AnthoPak Jan 27 '18 at 15:34
  • 2
    @rmaddy If you're on an iPhone 4s, performance will be very sluggish on iOS 9. Some users chose to keep iOS 8 instead. – Tamás Sengel Feb 16 '18 at 17:15
  • Does anyone know any work around to build using xcode 9.2 in an iOS 8.1 device other than moving to bundle? – krishnanunni Mar 20 '18 at 11:27
  • @krishnanunni Why don't you want to build using Xcode 9.1 ? You can build the exact same project with Xcode 9.1. – AnthoPak Mar 20 '18 at 13:39
  • I have updated to xcode 9.2. I was hoping to skip the xcode 9.1 download. – krishnanunni Mar 21 '18 at 03:57
0

I found move the image from assets to bundle can fix this bug

ADDICE
  • 23
  • 5
  • What do you mean by bundle ? Directly in the project files ? – AnthoPak Jan 15 '18 at 14:57
  • Yes indeed it works, but when i tried, all my images were disproportioned (because of loss of x1, x2, x3 images). This solution is good if you have only a few images, but will be horrible and time consuming if you have a lot... – AnthoPak Jan 18 '18 at 10:06
  • Sorry. I found that, but I have many images, so the last using Xcode 9.1 to upload my app. Maybe using Xcode 9.1 is the best way. Or waiting for the Apple to fix it in next version. – ADDICE Jan 19 '18 at 05:42
  • Yes I think Xcode 9.1 is the best solution in order to not mess your project. Thanks for your suggestion though. – AnthoPak Jan 19 '18 at 17:10