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

feat: migrate QueueITLib to Swift #41

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

alexanderthoren
Copy link

@alexanderthoren alexanderthoren commented Dec 11, 2024

Why?

What does this PR do?

  • Migrates the project to Swift.

Changes

  • Modified .gitignore and Package.swift
  • Deleted old Objective-C files from QueueITLib
  • Added new Swift files to Sources/QueueITLib

Tech debt

  • Didn't add tests yet.
  • Didn't add protocols and injection.
  • Didn't migrate to async/await.
  • Didn't update the README.

Maybe I will take a look into these in the short future as I want to contribute to more open source projects.

- Modified .gitignore and Package.swift
- Deleted old Objective-C files from QueueITLib
- Added new Swift files to Sources/QueueITLib
Removed redundant return types from methods in QueueItEngine and
QueueITWaitingRoomProvider classes. This change simplifies the code
by eliminating unnecessary return statements.
Renamed various files and classes to improve naming consistency across
the project. Updated references in the README.md and source files to
reflect these changes. This includes renaming classes like
QueueITApiClient to ApiClient, QueueITWaitingRoomProvider to
WaitingRoomProvider, and others.
Make WaitingRoomProvider and WaitingRoomView classes and their protocols
publicly accessible to enable external usage of the SDK components.
- Upgrade swift-tools-version to 6.0 in Package.swift
- Update iOS deployment target to v15
- Refactor ApiClient to use async/await
- Remove Connection and ConnectionRequest classes
- Add @mainactor annotations to relevant methods
- Ensure Status struct conforms to Sendable
- Update various protocols and methods to use async/await
…nd Task wrapper

- Add @mainactor annotation for thread safety

- Change tryPass to be non-throwing and non-async

- Wrap async call in Task for better concurrency handling
- Replace legacy decidePolicyFor callback pattern with modern async/await version

- Update UIApplication.open call to be async

- Return navigation policy and webpage preferences tuple instead of using completion handler

Signed-off-by: alexanderthoren <[email protected]>
- Make queueUrl, targetUrl and queueToken non-optional in TryPassResult

- Update QueueITEngine and WaitingRoomProvider to handle non-optional
values

- Remove unnecessary optional handling in showQueue method

- Simplify getUserId call by removing async keyword
alexanderthoren and others added 4 commits March 28, 2025 09:43
Previously the WebView had a transparent background which could cause
visual issues.

Setting it to white provides a cleaner, more consistent appearance.
…_white

style(webview): change WebView background color to white
…pe safety

- Combine all queue delegate protocols into single QueueItEngineDelegate

- Remove unnecessary optional string parameters from delegate methods

- Improve error handling by passing actual error messages

- Simplify delegate management in QueueItEngine class
refactor(queue-engine): consolidate delegate protocols and improve type safety
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant