tulsi icon indicating copy to clipboard operation
tulsi copied to clipboard

Any plans to support SwiftUI preview ?

Open ra1028 opened this issue 4 years ago • 4 comments

Currently, we can't enable SwiftUI preview on tulsi using bazel build system.

I believe that it's available with some tricks like adding build phase 'Compile Sources' manages target swift sources again and setting stub script to SWIFT_EXEC.

Maybe it's needed to pass swiftmodules generated by bazel to swiftc with '-I' option, then Xcode can compile preview-thunk.swift to preview-thunk.dylib.

I think it's an essential feature for iOS app development now.

Thanks!

ra1028 avatar Apr 10 '20 10:04 ra1028

Where did you find these tips? I am looking at trying to get this working but it seems like you have some information on how to get this to work.

tinder-maxwellelliott avatar Jun 30 '20 20:06 tinder-maxwellelliott

In its current form, Tulsi isn't compatible with previews since previews require proper buildable target/schemes (AFAIK limited to the active scheme). An alternative approach like XCHammer seems better suited to let Xcode handle part of the build.

DavidGoldman avatar Jun 30 '20 22:06 DavidGoldman

@DavidGoldman Thank you for your response. You mean to recommend the use of XCHammer? I tried that before, but it wasn't stable, so I'm using Tulsi now. Does Tulsi have any plans to make improvements to support SwiftUI?

ra1028 avatar Jul 01 '20 03:07 ra1028

Any news on adding support for this?

tinder-garricnahapetian avatar Mar 31 '22 19:03 tinder-garricnahapetian

hoping for an update on this :)

sualehasif avatar Dec 09 '22 02:12 sualehasif

The future for this is likely for folks to use rules_xcodeproj which already supports this.

keith avatar Dec 09 '22 02:12 keith

Thanks for submitting this issue but this tool is being deprecated. Please checkout rules_xcodeproj for a more complete and maintained Xcode integration.

keith avatar Feb 15 '23 17:02 keith