jaywcjlove / swiftui-markdown

Render Markdown text in SwiftUI.
https://jaywcjlove.github.io/swiftui-markdown
MIT License
83 stars 12 forks source link

'openURL' is only available in iOS 14.0 or newer #4

Open RemiBardon opened 2 years ago

RemiBardon commented 2 years ago

The package indicates .iOS(.v13) platform support, but doesn't compile for iOS 14 just because its package description is erroneous.

jaywcjlove commented 2 years ago

@RemiBardon How should it be configured?

https://github.com/jaywcjlove/swiftui-markdown/blob/65ec741eed76dd3c71c44b6e8c41ae7b50fe4f53/Package.swift#L9

RemiBardon commented 2 years ago

As the compiler says, "'openURL' is only available in iOS 14.0 or newer". You can either add an @available tag to your function using openURL, but then you'll probably need it everywhere else (as it's the main component of the library). Or you can change .iOS(.v13) to .iOS(.v14) and the compiler will be happy 🙂

Either way, it breaks backwards compatibility, but you already broke it when introducing openURL anyway 💁🏻‍♂️.

jaywcjlove commented 2 years ago

@RemiBardon thx