Home > AI > IOS > SwiftUI >

open URL

Method 1: open a website

Link(destination: URL(string: "https://jobyme88.com")!) {
    ToolUnitView(home: home, imageName: "tool-2", des: "技术学习")
}

Use a button

Button("Visit Apple") {
    openURL(URL(string: "https://www.apple.com")!)
}

Open another App listed on the Apple Store

Step 1: find the app url

Go to Apple Store, find your app, click the share button, and copy the url!

Step 2:

ToolUnitView(home: home, imageName: "tool-1", des: "学印度语")
    .onTapGesture {
        UIApplication.shared.open(URL(string: "https://apps.apple.com/au/app/kidslearnhindi/id1551109769")!)
    }

Open the developer app list page on the Apple Store

Leave a Reply