# Swift Concurrency back-deploy issue

**URL:** <https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917>\
**Category:** Using Swift\
**Tags:** concurrency, xcode\
**Created:** [December 8, 2021, 8:09am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917 "2021-12-08T08:09:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/madimo/32/13055_2.png) [@Madimo](https://forums.swift.org/u/Madimo)\
**Post date:** [December 8, 2021, 8:09am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/1 "2021-12-08T08:09:21Z")

</div>

Hi,

I have an iOS app that has a minimal deployment target of iOS 11.0. It has some concurrency code with available check as below:

```swift
import Foundation

#if swift(>=5.5.2)

@available(iOS 13.0, *)
public func someAsyncMethod() async throws -> ReturnType {
    ...
}

#endif

```

After compiling with Xcode 13.2 RC, it crashed on an iOS 12.5.5 device with the following message:

```swift
dyld: Symbol not found: ___chkstk_darwin
Referenced from: /private/var/containers/Bundle/Application/XXX/XXX.app/Frameworks/libswift_Concurrency.dylib (which was built for iOS 13.0)
Expected in: /usr/lib/libSystem.B.dylib
in /private/var/containers/Bundle/Application/XXX/XXX.app/Frameworks/libswift_Concurrency.dylib

```

Other test cases:

- Using Xcode 13.2 RC with iOS 12 simulator cannot reproduce the issue.

- Using Xcode 13.1 with the same iOS 12.5.5 device cannot reproduce the issue either.

- Add `libswift_Concurrency.tbd` to `Build Phases - Link Binary With Libraries` and set its `Status` to `Optional` cannot solve the problem.

Is this a back-deploy issue?

---

<div class="post-metadata">

**Author:** ![xuhaodong1](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/xuhaodong1/32/20942_2.png) [@xuhaodong1](https://forums.swift.org/u/xuhaodong1)\
**Post date:** [December 16, 2021, 9:27am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/2 "2021-12-16T09:27:57Z")

</div>

i have same question, do you deal with it?

---

<div class="post-metadata">

**Author:** ![t8n](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@t8n](https://forums.swift.org/u/t8n)\
**Post date:** [December 16, 2021, 11:05am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/3 "2021-12-16T11:05:36Z")

</div>

Possibly similar and/or related:

- A couple of days ago I added the lib swift\_Concurrency.tbd workaround for Xcode 13.1 to fix the crash on iOS 15 when app opens
- Today, I upgraded to Xcode 13.2 and now app crashes on iOS 14, but only when you go to a view using if #available(iOS 15, \*) around code that uses view modifiers like .searchable, .refreshable, .badge, .swipeActions
- My fix was to remove the swift\_Concurrency.tbd lib workaround and turn off optimisations (-Onone)

---

<div class="post-metadata">

**Author:** ![tera](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tera/32/38201_2.png) [@tera](https://forums.swift.org/u/tera)\
**Post date:** [December 19, 2021, 11:30pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/4 "2021-12-19T23:30:29Z")

</div>

Xcode 13.2.1 released on Dec 17 has this:

#### Resolved Issues

- Fixed an issue where apps built with Xcode 13 or Xcode 13.1 sometimes crashed at launch with an error reporting that the `libswift_Concurrency.dylib` library was not loaded. This only affected apps that used Swift Concurrency features (such as `async` / `await` ), deployed to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and had bitcode enabled. (86349088)

---

<div class="post-metadata">

**Author:** ![Madimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/madimo/32/13055_2.png) [@Madimo](https://forums.swift.org/u/Madimo)\
**Post date:** [December 20, 2021, 7:53am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/5 "2021-12-20T07:53:56Z")

</div>

No :( I have not found a solution to the problem, I can only remove the concurrency-relevant code and wait for Apple to fix the problem.

---

<div class="post-metadata">

**Author:** ![Madimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/madimo/32/13055_2.png) [@Madimo](https://forums.swift.org/u/Madimo)\
**Post date:** [December 20, 2021, 7:55am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/6 "2021-12-20T07:55:13Z")

</div>

Thank you for your reply.  
I have tried everything but the problem is still not solved :(

---

<div class="post-metadata">

**Author:** ![Madimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/madimo/32/13055_2.png) [@Madimo](https://forums.swift.org/u/Madimo)\
**Post date:** [December 20, 2021, 7:56am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/7 "2021-12-20T07:56:32Z")

</div>

Unfortunately, after testing, Xcode 13.2.1 still has this problem.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [December 20, 2021, 8:16am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/8 "2021-12-20T08:16:21Z")

</div>

Yes, it seems iTunes Connect doesn't remove the concurrency library when deploying to versions predating the back deployment. Anyone on iOS 12 will a crash if the app includes any concurrency code at all. It would be a good idea to report the issues using Feedback and post the number here.

---

<div class="post-metadata">

**Author:** ![Madimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/madimo/32/13055_2.png) [@Madimo](https://forums.swift.org/u/Madimo)\
**Post date:** [December 20, 2021, 9:27am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/9 "2021-12-20T09:27:30Z")

</div>

OK, I have submitted a bug report: FB9815225

---

<div class="post-metadata">

**Author:** ![tera](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tera/32/38201_2.png) [@tera](https://forums.swift.org/u/tera)\
**Post date:** [December 20, 2021, 10:34am UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/10 "2021-12-20T10:34:17Z")

</div>

Does the following workaround from Xcode 13.2 release notes help?

#### Known Issues

- Apps built with Xcode 13 or Xcode 13.1 that make use of Swift Concurrency features (such as `async` / `await` ), deploy to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and have bitcode enabled may crash at launch with an error reporting that the `libswift_Concurrency.dylib` library was not loaded. (86349088) **Workaround** : Add `-Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift` to Other Linker Flags in the app’s build settings.

---

<div class="post-metadata">

**Author:** ![tgoyne](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tgoyne](https://forums.swift.org/u/tgoyne)\
**Post date:** [December 20, 2021, 3:14pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/11 "2021-12-20T15:14:14Z")

</div>

No, that only fixes the crash on iOS 13. 12 and lower still crash.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [December 20, 2021, 7:40pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/12 "2021-12-20T19:40:50Z")

</div>

I've filed FB9815812 as well. This isn't just an ASC issue like I though, it happens when running the app directly from Xcode.

---

<div class="post-metadata">

**Author:** ![Fahad](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/fahad/32/16096_2.png) [@Fahad](https://forums.swift.org/u/Fahad)\
**Post date:** [December 21, 2021, 8:29pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/13 "2021-12-21T20:29:52Z")

</div>

Just adding here - failing for us too. The workaround does _not_ work for us.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [December 21, 2021, 8:37pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/14 "2021-12-21T20:37:40Z")

</div>

They are two different issues, one in 13.2, another in 13.2.1. The workaround only applies to 13.2.

---

<div class="post-metadata">

**Author:** ![Douglas\_Gregor](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/douglas_gregor/32/1362_2.png) [@Douglas\_Gregor](https://forums.swift.org/u/Douglas_Gregor)\
**Post date:** [December 21, 2021, 11:03pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/15 "2021-12-21T23:03:40Z")

</div>

At this time, there is no known workaround for the issue with iOS 12.

Doug

---

<div class="post-metadata">

**Author:** ![AlexST](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AlexST](https://forums.swift.org/u/AlexST)\
**Post date:** [December 22, 2021, 4:31pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/16 "2021-12-22T16:31:23Z")

</div>

Not sure if this fits the topic, but is there a possibility that back-deployed Concurrency support will become available for iOS 12.2 at some point (as that's the first version that bundles a Swift runtime with the OS)?

---

<div class="post-metadata">

**Author:** ![tera](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tera/32/38201_2.png) [@tera](https://forums.swift.org/u/tera)\
**Post date:** [December 22, 2021, 4:37pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/17 "2021-12-22T16:37:44Z")

</div>

I wouldn't waste time on that even if that was theoretically possible.

---

<div class="post-metadata">

**Author:** ![Fahad](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/fahad/32/16096_2.png) [@Fahad](https://forums.swift.org/u/Fahad)\
**Post date:** [December 24, 2021, 12:18pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/18 "2021-12-24T12:18:23Z")

</div>

Just to add here - this is also an issue on macOS 10.12 / 10.13 at the moment. Downgrading to Xcode 13.1 seems to have helped for now.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [January 11, 2022, 9:58pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/19 "2022-01-11T21:58:51Z")

</div>

I'm sorry, I know this isn't appreciated, but is there any update on this or the other concurrency deployment issues? This is a rather critical issue, especially for those of us shipping frameworks which may trigger the problem in apps which don't otherwise use the concurrency APIs. Aside from just telling users to lock to the last pre-concurrency release, is there anything that can be done to mitigate the issue? Any timeline on fixes? I really hope we don't have to wait until the spring Xcode release for this to be fixed.

---

<div class="post-metadata">

**Author:** ![tgoyne](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tgoyne](https://forums.swift.org/u/tgoyne)\
**Post date:** [January 11, 2022, 10:33pm UTC](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917/20 "2022-01-11T22:33:25Z")

</div>

We (Realm) are considering just ripping out all of our async functions and moving them to a separate library to work around this.

[Next page](https://forums.swift.org/t/swift-concurrency-back-deploy-issue/53917.md?page=2)
