Konstantin.Efimenko
Konstantin.Efimenko

Reputation: 1450

Trigger app clip from view of another app

If I able to trigger app clip from another app? For example, I tap on Button or View and in gesture recogniser call a link. Something like this :

struct ContentView: View {
    var body: some View {
        ScrollView {
            Text("Hello, user!")
            .padding()
            VStack {
                Text("Take a loan")
                    .foregroundColor(.white)
            }
            .padding()
            .background(Color.blue)
            .cornerRadius(6)
            .onTapGesture(perform: {
                if let url = URL(string: "https://ScroogeLoans.example.com/order?lat=33.8644&lon=-118.2611") {
                    UIApplication.shared.open(url)
                }
            })
        
            VStack {
                Text("Make a deposite")
            }
            .padding()
            .background(Color.green)
            .cornerRadius(6)
        }
    }
}

If no, where I can find direct explanation, - why? (I believe you, but my management don't ))) )

Upvotes: 1

Views: 327

Answers (2)

Konstantin.Efimenko
Konstantin.Efimenko

Reputation: 1450

In iOS 14 it is not possible to trigger App Clip from another application. This will be added in iOS 15

Upvotes: 1

pietrorea
pietrorea

Reputation: 898

You're not able to trigger an App Clip from another app. According to Apple, as of iOS 14, the only invocation methods are...

"Default" App Clip experiences:

  • Safari App Clip banner
  • Messages

"Advanced" App Clip experiences:

  • Maps
  • NFC Tag
  • QR Code
  • Location

Upvotes: 3

Related Questions