[Swift] 다른 앱 실행시키기
2022. 12. 4. 20:43
- info.plist에서 [Information Property List] - [LSApplicationQueriesSchemes] - [Array]로 생성
- Array Element에 string Type에 Scheme 추가
let kakaoTalk = "kakaotalk://"
let kakaoTalkURL = NSURL(string: kakaoTalk)
if (UIApplication.shared.canOpenURL(kakaoTalkURL! as URL)) {
UIApplication.shared.open(kakaoTalkURL! as URL)
}
else {
print("No kakaotalk installed.")
}
출처
728x90
'iOS > Swift' 카테고리의 다른 글
[Swift] 소수점 없애기 (0) | 2023.01.01 |
---|---|
[Swift] 클로저 (0) | 2022.12.24 |
[Swift] URLComponent (0) | 2022.11.20 |
[Swift] URLSession https 인증서 신뢰 (0) | 2022.11.20 |
[Swift] URLSession (0) | 2022.11.17 |