shaps80 / SwiftUIBackports

A collection of SwiftUI backports for iOS, macOS, tvOS and watchOS
MIT License
931 stars 59 forks source link

Add `@_exported import` #32

Closed hstdt closed 1 year ago

hstdt commented 1 year ago

Have you read the Contributing Guidelines? Yes

Describe the feature

Since SwiftUIBackports is based on SwiftUI, @_exported import SwiftUI is appropriate. No necessary to import SwiftUI after imported SwiftUIBackports.

Is your feature request related to a problem?

No

Proposed solution

Add @_exported import to Backport.swift

https://github.com/hstdt/SwiftUIBackports/blob/3fd863242bedbcb4ccf21e0d6503d489c3f36bd6/Sources/SwiftUIBackports/Backport.swift#L4

shaps80 commented 1 year ago

Actually I considered this but intentionally left it out.

If you try that you’ll notice a lot of the time Xcode previews stop working in any file that doesn’t explicitly include import SwiftUI

Its really annoying but until they fix/allow that I won’t be including since I don’t want to break (with no helpful feedback) any previews in your project ;)