안녕하세요, 저는 시소몰 모바일 앱(하이브리드)을 개발 중인 외주 개발사입니다.
현재 kakaolink 부분 작업 중입니다.
IOS kakaolink 관련 기능이 정상적으로 작동하지 않아 질문드립니다.
질문드리는 kakaolink 기능 중
안드로이드 모바일 브라우즈, 안드로이드 하이브리드 앱, IOS 모바일 브라우즈 에서는
kakaolink 가 모두 정상적으로 작동됩니다.
유일하게 IOS 하이브리드 앱에서만 다음과 같은 오류 메시지가 나오고
그리고 바로 KAKAOTALK 설치 앱스토어로 이동됩니다.
오류 메시지는 [this app is not allowed to query for scheme kakaolink] 라고 오류 메시지가 나오면서
바로 앱스토어로 이동됩니다.
아래는 swift 로 작성된 소스코드 일부입니다.
func webView(_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) → Void) {
print("==========curUrl AAA=[" + curUrl.removingPercentEncoding! + "]=---------------")
if let url = navigationAction.request.url, ["kakaolink"].contains(url.scheme) {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
decisionHandler(.cancel)
return
}
아래는 디버그를 위해서 url 을 출력한 결과들 입니다.
- 첫번째 로그는 url.removingPercentEncoding! 처리해서 출력한 결과 입니다.
(앱 키 관련한 부분 일부만 마스킹 처리했습니다.)
kakaolink://send?appkey=5f50203a…aec4342452992ea76&appver=1.0&linkver=4.0&extras={“KA”:“sdk/1.43.1 os/javascript sdk_type/javascript lang/ko-KR device/iPhone origin/https%3A%2F%2Fm.seesawmall.com”}&template_json={“P”:{“TP”:“Feed”,“ME”:"${ME}",“SID”:“capri_688122”,“DID”:“https://seesawmall.com//m/dp/good/getPrdDtl.do?prdCd=1000072601",“SNM”:“시소몰”,“SIC”:“https://k.kakaocdn.net/14/dn/btrpQSJTqiZ/hL9sG5eYiAGRhQ8XmosdCk/o.jpg”,“L”:{“LPC”:“https://seesawmall.com//m/dp/good/getPrdDtl.do?prdCd=1000072601”,“LMO”:“https://seesawmall.com//m/dp/good/getPrdDtl.do?prdCd=1000072601”},“SL”:{“LCI”:"kakao186ecf04c1f51…f6244c33300://kakaolink”,“LPC”:“https://seesawmall.com”,“LMO”:“https://seesawmall.com”},“VA”:“6.0.0”,“VI”:“5.9.8”,“VW”:“2.5.1”,“VM”:“2.2.0”,“FW”:true,“RF”:“out-client”},“C”:{“THC”:3,“THL”:[{“TH”:{“THU”:“https://k.kakaocdn.net/dn/jCmJN/bl3YoUqqE6r/0mLV51LciPFTzKbmACxreK/kakaolink40_original.jpg",“W”:280,“H”:280,“SC”:1}}],“TI”:{“TD”:{“T”:"[EFM] ipTIME T5008 유선공유기 [중고/개봉품]”}},“BUL”:[{“BU”:{“T”:“자세히 보기”,“SR”:“both”}}]}}&template_args={"${title}":"[EFM] ipTIME T5008 유선공유기 [중고/개봉품]","${description}":"","${THU}":“https://k.kakaocdn.net/dn/jCmJN/bl3YoUqqE6r/0mLV51LciPFTzKbmACxreK/kakaolink40_original.jpg","${url}":"/m/dp/good/getPrdDtl.do?prdCd=1000072601”}&template_id=68754
- 아래는 url 값을 변경없이 그래로 출력한 값입니다.
안드로이드 하이브리드와 비교해 보니 device 부분만 다르고 모두 완전히 같은 값이더군요
kakaolink://send?appkey=5f50203a62…342452992ea76&appver=1.0&linkver=4.0&extras=%7B%22KA%22%3A%22sdk%2F1.43.1%20os%2Fjavascript%20sdk_type%2Fjavascript%20lang%2Fko-KR%20device%2FiPhone%20origin%2Fhttps%253A%252F%252Fm.seesawmall.com%22%7D&template_json=%7B%22P%22%3A%7B%22TP%22%3A%22Feed%22%2C%22ME%22%3A%22%24%7BME%7D%22%2C%22SID%22%3A%22capri_688122%22%2C%22DID%22%3A%22https%3A%2F%2Fseesawmall.com%2F%2Fm%2Fdp%2Fgood%2FgetPrdDtl.do%3FprdCd%3D1000072601%22%2C%22SNM%22%3A%22%EC%8B%9C%EC%86%8C%EB%AA%B0%22%2C%22SIC%22%3A%22https%3A%2F%2Fk.kakaocdn.net%2F14%2Fdn%2FbtrpQSJTqiZ%2FhL9sG5eYiAGRhQ8XmosdCk%2Fo.jpg%22%2C%22L%22%3A%7B%22LPC%22%3A%22https%3A%2F%2Fseesawmall.com%2F%2Fm%2Fdp%2Fgood%2FgetPrdDtl.do%3FprdCd%3D1000072601%22%2C%22LMO%22%3A%22https%3A%2F%2Fseesawmall.com%2F%2Fm%2Fdp%2Fgood%2FgetPrdDtl.do%3FprdCd%3D1000072601%22%7D%2C%22SL%22%3A%7B%22LCI%22%3A%22kakao186ecf04c…022c2f4f6244c33300%3A%2F%2Fkakaolink%22%2C%22LPC%22%3A%22https%3A%2F%2Fseesawmall.com%22%2C%22LMO%22%3A%22https%3A%2F%2Fseesawmall.com%22%7D%2C%22VA%22%3A%226.0.0%22%2C%22VI%22%3A%225.9.8%22%2C%22VW%22%3A%222.5.1%22%2C%22VM%22%3A%222.2.0%22%2C%22FW%22%3Atrue%2C%22RF%22%3A%22out-client%22%7D%2C%22C%22%3A%7B%22THC%22%3A3%2C%22THL%22%3A%5B%7B%22TH%22%3A%7B%22THU%22%3A%22https%3A%2F%2Fk.kakaocdn.net%2Fdn%2FjCmJN%2Fbl3YoUqqE6r%2F0mLV51LciPFTzKbmACxreK%2Fkakaolink40_original.jpg%22%2C%22W%22%3A280%2C%22H%22%3A280%2C%22SC%22%3A1%7D%7D%5D%2C%22TI%22%3A%7B%22TD%22%3A%7B%22T%22%3A%22%5BEFM%5D%20ipTIME%20T5008%20%EC%9C%A0%EC%84%A0%EA%B3%B5%EC%9C%A0%EA%B8%B0%20%5B%EC%A4%91%EA%B3%A0%2F%EA%B0%9C%EB%B4%89%ED%92%88%5D%22%7D%7D%2C%22BUL%22%3A%5B%7B%22BU%22%3A%7B%22T%22%3A%22%EC%9E%90%EC%84%B8%ED%9E%88%20%EB%B3%B4%EA%B8%B0%22%2C%22SR%22%3A%22both%22%7D%7D%5D%7D%7D&template_args=%7B%22%24%7Btitle%7D%22%3A%22%5BEFM%5D%20ipTIME%20T5008%20%EC%9C%A0%EC%84%A0%EA%B3%B5%EC%9C%A0%EA%B8%B0%20%5B%EC%A4%91%EA%B3%A0%2F%EA%B0%9C%EB%B4%89%ED%92%88%5D%22%2C%22%24%7Bdescription%7D%22%3A%22%22%2C%22%24%7BTHU%7D%22%3A%22https%3A%2F%2Fk.kakaocdn.net%2Fdn%2FjCmJN%2Fbl3YoUqqE6r%2F0mLV51LciPFTzKbmACxreK%2Fkakaolink40_original.jpg%22%2C%22%24%7Burl%7D%22%3A%22%2Fm%2Fdp%2Fgood%2FgetPrdDtl.do%3FprdCd%3D1000072601%22%7D&template_id=68754
- 마지막으로 info.plist 에서 LSApplicationQueriesSchemes 구성 내역입니다.
LSApplicationQueriesSchemes
kakaolink
kakaokompassauth
kakao5f50203a6…52992ea76
그리고 테스트 가능한 url 을 보내드립니다.
이상입니다.