跳转到AppStore
https://blog.youkuaiyun.com/qq_24459277/article/details/136669985
import SwiftUI
struct ContentView: View {
var body: some View {
Button(action: {
// 跳转到 App Store
if let url = URL(string: "itms-apps://itunes.apple.com/app/idYOUR_APP_ID") {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}) {
Text("跳转到 App Store")
}
}
}
NavigationLink复杂页面跳转
https://www.jianshu.com/p/7861a84b5168
依赖库
库 | 作用 | 地址 |
---|---|---|
Alamofire | http | https://github.com/Alamofire/Alamofire |
SwiftyJSON | 解json | https://github.com/SwiftyJSON/SwiftyJSON |
CocoaMQTT | MQTT | https://github.com/emqx/CocoaMQTT |