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

fix: preview mode issues #114

Open
wants to merge 3 commits into
base: 2U/develop
Choose a base branch
from
Open

fix: preview mode issues #114

wants to merge 3 commits into from

Conversation

mta452
Copy link

@mta452 mta452 commented Jan 20, 2025

LEARNER-10378: Preview mode not working for Swift UI

This PR addresses two issues due to which the preview mode was failing.

  • The first one is related to syntax errors which occurs due to SwiftLint on @Environment (\.isHorizontal) lines caused by a space before the parenthesis.
  • The second one is related to a crash caused by Swinject as it's unable to resolve the BackNavigationProtocol in preview mode. I have written the logic to use a mock of this protocol to avoid the crash in case the code is running in preview mode.

It still requires legacy mode, which can be easily enabled on Xcode 16 by selecting the menu Editor -> Canvas -> Use Legacy Previews Execution.

@rnr
Copy link
Collaborator

rnr commented Jan 22, 2025

@mta452 could you please merge with the latest 2u/develop to resolve the conflict in Core.xcodeproj. Thank you

Copy link
Collaborator

@rnr rnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants