iOS Development

ios – utilizing qualtrics in a SwiftUI app with a UIViewControllerRepresentable

I am attempting to make a easy swiftui app utilizing qualtrics and I am attempting to make use of a uiviewrepresentable to make it work

struct QualtricsViewRep: UIViewControllerRepresentable {

typealias UIViewControllerType = UIViewController

func makeUIViewController(context: Context) -> UIViewController {
    let vc = UIViewController()
    Qualtrics.shared.evaluateProject { (targetingResults) in
        for (interceptID, consequence) in targetingResults {
            if consequence.handed() {
                let displayed = self, autoCloseSurvey: true)

on let displayed = … I maintain getting the error “Can not convert worth of kind ‘QualtricsViewRep’ to anticipated argument kind ‘UIViewController'”, how can I return this code as a UIViewController to make use of in a swiftui app, or is there another method I ought to be approaching this?

What's your reaction?

Leave A Reply

Your email address will not be published.