13

I'm trying to release an iOS app - it builds fine on simulator or device in Xcode 11, and can be archived fine in Xcode 10, but when I try to archive it for release in the App Store the build hangs indefinitely. I hit Product > Archive, it completes 3960 out of 4040 steps, and then hangs in indefinitely at the stage of "Archiving Firebase/Firestore". This is happening on 4 different Xcode 11 versions - 3,6,7 and most recently the GM that was released earlier today.

I've tried flipping a bunch of the build settings - the Optimization flags, incremental/whole modules, enabling Bitcode, exclusive memory, and have also reinstalled Xcode with different 11 versions a few times. I've also tried this with various versions of cocoapods, including the Firebase/Firestore pod that is being compiled when the build hangs (i.e., I've used an old version and tried updating to the latest version of the pod) Nothing I've done has worked. Does anyone have any advice for other things I could try to stop this from hanging?

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
milohoffman
  • 287
  • 1
  • 11

3 Answers3

3

@leonluc-dev tracked this infinite loop down to a Swift compiler bug building the SwiftSoup CocoaPod.

Full description here.

See this answer for a screen shot of disabling optimization of Swift Soup to work around.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • I run pod update but the version is still 2.2.0. Did you specify something additional in your Podfile? – pooopy Sep 21 '19 at 16:30
  • 1
    Yeah, I don't see the updated pod at https://cocoapods.org/pods/SwiftSoup. I was going by the description at https://github.com/scinfu/SwiftSoup/issues/125. Also the follow up discussion claims the fix didn't work. So probably best for now would be removing SwiftSoup or turning off Optimization in the Release Configuration of the SwiftSoup target. – Paul Beusterien Sep 21 '19 at 19:56
  • 1
    2.2.1 made no difference but I can confirm that turning off the optimization for the SwiftSoup target works around the problem for now. – Robert Gummesson Sep 23 '19 at 09:49
1

It seems to be a bug with Xcode 11. I reported the issue to the Firebase team over here: https://github.com/firebase/firebase-ios-sdk/issues/3884#issuecomment-533663539

and I also reported the issue to Apple using feedback assistant (bug FB7303206). I'll update this answer when Apple responds.

CentrumGuy
  • 576
  • 1
  • 4
  • 16
1

If you're also using Firebase Crashlytics, moving

"${PODS_ROOT}/FirebaseCrashlytics/run"

after

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols"

in your Run Script phase should solve the issue.

fabdurso
  • 2,366
  • 5
  • 29
  • 55
  • 1
    Thank you for your answer. Actually it didn't work for me, but I removed 'upload-symbols' from the script, and the problem is gone. I'd better upload dSYMs manually) – alc77 Feb 03 '21 at 06:42