29

Our app crashed in iOS 9 which upload to App Store by Xcode 10 GM Seed. It's running perfectly when using XCode 10 GM Debug Or Archive To Ad_Hoc. Here's some call stack.

crash1

crash2

crash3

Is Xcode 10 GM do anything with image.assets or others?

apple reply apple reply

Cœur
  • 37,241
  • 25
  • 195
  • 267
apricot
  • 434
  • 1
  • 4
  • 10
  • You'll need to post at least the crash logs in order for anyone to be able to help. There is not much information in this question. – Fogmeister Sep 17 '18 at 09:09
  • i send the linked image,but it doesnt show. – apricot Sep 17 '18 at 09:11
  • it's crashed below iOS 9.3 – apricot Sep 17 '18 at 09:21
  • 2
    We have got same crash in our application after update to xcode 10. Application is crashing in random places on iOS 9.1 on start – Evgeniy Yurtaev Sep 17 '18 at 11:33
  • @EvgeniyYurtaev Do you have any idea? https://medium.com/@rickynguyen/weird-crash-on-ios-9-0-9-1-9-2-5583c25c7f5b , here is a similarity issue, but i think its not what cause these crashes in this time. – apricot Sep 17 '18 at 12:22
  • We haven't found reason of crash. It looks like a memory management issue in our application or iOS 12 SDK. We want to know whether anyone gets this crash – Evgeniy Yurtaev Sep 17 '18 at 13:10
  • btw,the app crashed when launch. – apricot Sep 17 '18 at 14:06
  • @Fogmeister i have attached some pictures,do u have any idea? – apricot Sep 17 '18 at 14:27
  • 3
    I'm seeing a similar crash on my app as well on [UIImage imageNamed:] calls only on iOS below 9.3 and it started with the version of the app compiled with Xcode 10 linked against the iOS 12 SDK. None of the code or images have been changed in years and never crashed prior. – Greg G Sep 17 '18 at 17:26
  • best one download Xcode latest Xcode 10 version then solve out your problem – Ramani Hitesh Sep 20 '18 at 09:52
  • @RamaniHitesh the problem is still exist. :( – apricot Sep 20 '18 at 09:53
  • which editor here xcode 10 or Xcode 10 gm seed ? – Ramani Hitesh Sep 20 '18 at 09:54
  • latest final people using latest Xcode 10 version not gm seed version. – Ramani Hitesh Sep 20 '18 at 09:55
  • @RamaniHitesh we use Xcode 10(10a255) and upload again,also crash below iOS 9.3. – apricot Sep 20 '18 at 09:57
  • which time crash please clarify then , i solve ...out – Ramani Hitesh Sep 20 '18 at 10:02
  • @RamaniHitesh app on launch,did you use xcode 10 gm upload prior? – apricot Sep 20 '18 at 10:10
  • yes use Xcode 10 version and upload many apps ... – Ramani Hitesh Sep 21 '18 at 08:56
  • We have got same crash in our application after update to xcode 10、Xcdoe10.1 beta。 I tried the method(https://forums.developer.apple.com/thread/60919?start=30&tstart=0) but it doesn't work。And if I use Xode 9 it's OK. – SuperHappy Sep 23 '18 at 04:56
  • @SuperHappy xcode10.1 has been released?I try to contact apple dts,and they reply,here’s some bug then let us to reporting bug for apple,we did.it does not fix in Xcode 10.1?beta version can upload apps? – apricot Sep 23 '18 at 05:08
  • @apricot So, Apple has confirmed that this is a bug from their side? We face the same situation too. Thanks. – Raymond Sep 23 '18 at 05:15
  • @apricot Xcode10.1beta have not fix it. We can use Ad Hoc after appthining to test this crash. – SuperHappy Sep 23 '18 at 05:27
  • @Raymond I have attached a snapshot of apple reply email on this post. we have report this bug for apple,you can report it also,hope apple can resolve it fast. – apricot Sep 23 '18 at 07:26
  • 1
    My released apps (using Xcode 10 GM) are also crashing randomly at startup on iOS 9 (below iOS 9.3.x). Seems like the random crashes happen after a view is loaded from storyboard or xib file....... Now preparing to submit again using Xcode 9 – Kashif Hisam Sep 24 '18 at 06:22
  • @apricot yes, I already submit it as bug too. Hope they fix it soon! – Raymond Sep 24 '18 at 08:32
  • I found that delete all *.xcassets file it is fine in iOS9.2.1.So check the image first. – SuperHappy Sep 27 '18 at 05:11
  • well done,but It‘s unpractical for us.I think it is the xcasset's problem always.Xcode 10 release note and wwdc said xcassets has been optimized,it is a joke... – apricot Sep 28 '18 at 01:09
  • Instead of waiting for Apple to fix, submit using Xcode9 while using NSInvocation for the new API – Kashif Hisam Sep 28 '18 at 10:57
  • ln -s Xcode9.3.app/Contents/Developer/usr/bin/ibtoold Xcode10app/Contents/Developer/usr/bin/ibtoold this can solve it – SuperHappy Sep 29 '18 at 07:45
  • Seems to crash in iOS 9.2.x, 9.1.x, and 9.0.x, and not in iOS 9.3.x. – Larry Aasen Oct 10 '18 at 14:17

4 Answers4

21

Edit 4: From the Xcode 10.2 beta release notes:

Resolved an issue that affected app compatibility with iOS 9.0, 9.1, and 9.2 when distributing an app for local or enterprise distribution. App asset catalogs built using Xcode 10 with a deployment target of iOS 9.0, 9.1 or 9.2 produced content incompatible with the runtimes of those iOS versions when distributed using local or enterprise distribution. Rebuilding the app with Xcode 10.2 resolves this issue. (46893768, 44535967)

Edit 3: From the revised Xcode 10.1 release notes:

Asset Catalog

Known Issues

Apps that contain asset catalogs built using Xcode 10 or later with a deployment target set to iOS 9.0, 9.1 or 9.2 produce content incompatible with the runtimes of those iOS versions. (44535967, 45723580, 45723189)

The issue remains. ‍♂️

Edit 2: Apparently, the issue is still not completely fixed.

Edit: Xcode 10.1 is out now.

This has been fixed in Xcode 10.1 beta 2:

Resolves an issue that affected app compatibility with iOS 9.0, 9.1 and 9.2. Apps containing asset catalogs built with Xcode 10 whose deployment target was set to iOS 9.0, 9.1 or 9.2 would produce content incompatible with the runtimes of those iOS versions. Rebuilding the application with Xcode 10.1 resolves this issue. (44535967)

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_beta_2_release_notes?language=objc

Léo Natan
  • 56,823
  • 9
  • 150
  • 195
  • Is it means the app won't crash whose deployment target was iOS8.0? But my app's deployment target was 8.0, and still crash with iOS9.0. Why? – mengxiangjian Oct 24 '18 at 05:42
  • Why do you assume that if it crashes for 9.0, it wouldn't crash on 8.0? Wait for Xcode 12.1 to GM – Léo Natan Oct 24 '18 at 08:18
  • @Coeur we can't submit an app that supports XS, XS Max, XR and compatible with iOS 9 with Xcode 10.1 ? – samir Oct 31 '18 at 16:57
  • 1
    @samir Xcode 10.1 solved the problem, but was released just 1.5 days ago. My comment was from 4 weeks ago. – Cœur Nov 01 '18 at 00:44
  • 2
    I just released a new version of my app using Xcode 10.1 and I'm still seeing crashes on devices running iOS 9.0-9.2. I tested this bug when it said it was fixed in the release notes and it did seem to fix it, but it looks like the final version of Xcode 10.1 doesn't fix this issue. Or not all instances of it. – Greg G Nov 02 '18 at 16:55
  • 2
    This bug has not been fixed in XCode 10.1. – ovo Nov 05 '18 at 06:13
  • 3
    Apple just modified their release notes for 10.1 to make this issue open once again: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes?language=objc – Léo Natan Nov 07 '18 at 01:23
  • From the Xcode 10.2 beta release notes, it fixed for "local or enterprise distribution", not sure if it fixed for non-enterprise distribution build. – BoH Jan 28 '19 at 15:56
  • It should be fixed for everyone once Apple allows people to upload builds using Xcode 10.2 to the AppStore. That means only when 10.2 is publicly released. – Léo Natan Jan 28 '19 at 21:09
  • Can anyone confirm whether it is fixed in Xcode 10.2 or not? – Kashif Hisam Mar 26 '19 at 11:56
  • According to the release notes, it is fixed. I cannot personally test. – Léo Natan Mar 26 '19 at 11:58
1

Instead of waiting for Apple to fix, submit using Xcode 9 while using NSInvocation for the new API. It involves more code but your users will be happy.

Kashif Hisam
  • 2,201
  • 1
  • 15
  • 6
  • 2
    This is a terrible idea. When you compile against an old SDK, Apple runs its frameworks in a compatibility mode. If you then proceed to call API that is unexpected in said compatibility mode, you can expect your app to misbehave at best and crash at worst. At this point, the best thing to do is temporarily disable support for < 9.3 – Léo Natan Sep 29 '18 at 09:17
  • 1
    My app is already approved without any weird crashes. My app is using new complications for Apple Watch Series 4 which I have implemented using NSInvocation calls. – Kashif Hisam Oct 05 '18 at 10:34
  • @LeoNatan great explanations, do you have the source that explains this mechanism please I can't manage to find it my self on apple website :S – Ayrton Werck Nov 13 '18 at 16:40
  • Source: experience of over 8 years in the iOS ecosystem. Apps run in compat mode when compiled against old SDKs. – Léo Natan Nov 13 '18 at 20:18
1

I found a solution for Xcode 10.1 Archive

Set The build system as Legacy Build System instead of Default build system

File -> Workspace Settings -> Build System: change to Legacy Build System

I test it on my own app and it works well.

Hope Apple can fix this crash soon.

enter image description here

shujucn
  • 145
  • 1
  • 5
0

This bug has been resolved.

Asset Catalog

Resolved Issues

Resolved an issue that affected app compatibility with iOS 9.0, 9.1, and 9.2 when distributing an app on the App Store. App asset catalogs built using Xcode 10 with a deployment target of iOS 9.0, 9.1 or 9.2 produce content incompatible with the runtimes of those iOS versions when distributed via the App Store. Rebuild and resubmit the app using Xcode 10.1 to resolve the issue. (44535967, 45723580, 45723189) Xcode 10.1 Release Notes

ovo
  • 1,904
  • 13
  • 26