'Add swift UI support to the framework that target's IOS 10,
I wrote framework on Swift UI, then Client told me that lower IOS was required to be supported on framework.
I rewrite framework on UIKit/UIViewController, And now I want to add swift UI application support in the framework.
While I was working on lib from my Swift UI application, target of the application was IOS 13, and framework's targets were IOS 10, I added swift UI support with if #available(iOS 13.0, *)
checks. it worked perfectly from the project that targets IOS 13.
But when I opened the framework project to export it, It is telling me that code which is under the if #available(iOS 13.0, *)
can't be complied. It does not know what is UIHostingCOntroller, View, Binding
and any swift UI functions.
What to do? How to add Swift UI support to the framework that also should work on lower than IOS 13?
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Thanish Reddy M. |