Skip to content

SwiftUI Previews in Xcode cause Skip to re-launch Android build #263

Pinned Answered by marcprux
arshmeets asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is discussed at https://developer.apple.com/forums/thread/761439: Xcode no longer sets the ENABLE_PREVIEWS environment variable for SwiftUI previews, which is the only way we have to prevent running the skip gradle command that handles the compile/launch on Android. Toggling the "Editor > Canvas > Use Legacy Previews Execution" menu item should work around the issue for now, but note that that setting will be reset every time Xcode upgrades, so you will need to re-enable it every time there is an update.

The other solution, of course, is to just comment-out the "skip gradle" command in the "Run skip gradle" build script when you are developing with SwiftUI previews, and then j…

Replies: 10 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@marcprux
Comment options

@arshmeets
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@davidakoontz
Comment options

@arshmeet-s
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@davidakoontz
Comment options

@davidakoontz
Comment options

Answer selected by marcprux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants