Skip to content
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

Migrate to using Swift concurrency #613

Open
lawrence-forooghian opened this issue Mar 13, 2023 · 1 comment
Open

Migrate to using Swift concurrency #613

lawrence-forooghian opened this issue Mar 13, 2023 · 1 comment
Labels
code-quality Affects the developer experience when working in our codebase.

Comments

@lawrence-forooghian
Copy link
Collaborator

Now that we've confirmed a deployment target of iOS 13 (#597), we can start using Swift concurrency. As well as async/await and structured concurrency, this also allows us to use AsyncSequence, which we may wish to start using as a way of achieving parity with Android’s use of Kotlin streams.

We can start using these features internally immediately, and may wish to refactor existing internal code to use it. We should also consider migrating the public API to use them.

This issue serves to remind us of this opportunity, and we can split it out into separate more detailed tickets as we wish.

@lawrence-forooghian lawrence-forooghian added the code-quality Affects the developer experience when working in our codebase. label Mar 13, 2023
@sync-by-unito
Copy link

sync-by-unito bot commented Mar 13, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3450

lawrence-forooghian added a commit that referenced this issue Mar 13, 2023
Resolves #597.

Our README currently says that our minimum iOS version is 12 and above,
and during the development of this SDK we have been working with this
requirement in mind – for example by not using Swift concurrency, which
is only available in iOS 13 and above.

Our Package.swift was however updated in eeb88b0 to require iOS 13 and
above, without any explanation for this change.

To clear up this confusion, we have now spoken to clients to understand
their iOS version requirements, and have found out that we can target
iOS 13 for the subscriber SDK and iOS 14 for the publisher SDK.

For now, since there are no obvious features of the iOS 14 SDK that we
need, I’ll keep a deployment target of iOS 13 for both SDKs, but we may
wish to decouple them in the future so that they can have separate
deployment targets.

See #613 for taking advantage of the now-available Swift concurrency
features.

Internal threads re client requirements:

1. https://ably-real-time.slack.com/archives/C01EPJENRD0/p1677611526684719
2. https://ably-real-time.slack.com/archives/C01EPJENRD0/p1678698762445489
lawrence-forooghian added a commit that referenced this issue Mar 13, 2023
Resolves #597.

Our README currently says that our minimum iOS version is 12 and above,
and during the development of this SDK we have been working with this
requirement in mind – for example by not using Swift concurrency, which
is only available in iOS 13 and above.

Our Package.swift was however updated in eeb88b0 to require iOS 13 and
above, without any explanation for this change.

To clear up this confusion, we have now spoken to clients to understand
their iOS version requirements, and have found out that we can target
iOS 13 for the subscriber SDK and iOS 14 for the publisher SDK.

For now, since there are no obvious features of the iOS 14 SDK that we
need, I’ll keep a deployment target of iOS 13 for both SDKs, but we may
wish to decouple them in the future so that they can have separate
deployment targets.

See #613 for taking advantage of the now-available Swift concurrency
features.

Internal threads re client requirements:

1. https://ably-real-time.slack.com/archives/C01EPJENRD0/p1677611526684719
2. https://ably-real-time.slack.com/archives/C01EPJENRD0/p1678698762445489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Affects the developer experience when working in our codebase.
Development

No branches or pull requests

1 participant