Swift 앱스토어 링크 연결

June·2023년 2월 8일
1

iOS

목록 보기
1/1
post-thumbnail

appId는 App Store Connect에서 확인할 것.

func openAppStore(appId: String) {
    let url = "itms-apps://itunes.apple.com/app/" + appId
    if let url = URL(string: url), UIApplication.shared.canOpenURL(url) {
        if #available(iOS 10.0, *) {
            UIApplication.shared.open(url, options: [:], completionHandler: nil)
        } else {
            UIApplication.shared.openURL(url)
        }
    }
}
profile
안다고 착각하지 말기

0개의 댓글