- 인쇄
 
Event handler
- 인쇄
 
숏폼에서 발생한 알림을 클라이언트에서 ShopLiveShortformReceiveHandlerDelegate 함수를 통해 전달받고 필요에 따라 처리합니다.
onEvent(command: String, payload: String?)를 통해 숏폼에서 발생하는 여러 가지 이벤트를 직접 핸들링할 수 있는 messageCallback 함수를 제공합니다.
messanger를 통하여 ShopLiveWebView에 javascript을 사용하여 메세지를 보낼 수 있습니다.
ShopLiveShortformMessenger
onError
onError(error: Error)를 통해 숏폼에서 발생하는 에러를 직접 핸들링할 수 있는 messageCallback 함수를 제공합니다.
ShopLiveCommonError
Property name  | Type  | Description  | 
|---|---|---|
code  | Int  | Shoplive 지정 에러코드  | 
message  | String?  | 에러 메시지  | 
error  | Error?  | 에러 원문  | 
handleShare
handleShare(shareMetaData: ShopLiveShareMetaData)를 통해 숏폼에서 직접 공유하기 기능을 개발합니다.
ShopLiveMetaData
Property name  | Type  | Description  | 
|---|---|---|
shortsId  | String?  | 숏폼 고유 ID  | 
shortsSrn  | String?  | 숏폼의 고유 정보를 담는 ID  | 
title  | String?  | 숏폼 제목 (og tag 용도)  | 
descriptions  | String?  | 숏폼 설명 (og tag 용도)  | 
thumbnail  | String?  | 숏폼 썸네일 (og tag 용도)  | 
onDidAppear
onDidAppear()를 통해 숏폼 Full type 화면의 열림 이벤트를 받아볼 수 있습니다.
onShortsAttached(data : ShopLiveShortformData) / onShortsDetached(data : ShopLiveShortformData)
onShortsAttached :  Shorts의 Cell이 화면이 보일때 이벤트가 발생합니다.onShortsDetached :  Shorts의 Cell이 화면에서 사라질때 이벤트가 발생합니다.
ShopLiveShortformDetailHandlerDelegate
Shoplive Shortform에서 발생한 알림을 클라이언트에서 ShopLiveShortformDetailHandlerDelegate 함수를 통해 전달받고 필요하게 처리합니다.
class ViewController : ShopLiveShortformDetailHandlerDelegate { 
  func handleProductItem(shortsId : String, shortsSrn : String, product : Product){ }
  func handleProductBanner(shortsid : String, shortsSrn : String, scheme : String, shortsDetail : ShortsDetail){ } )
}
ShopLiveShortform.ShortsReceiveInterface.setDetailHandler(self)Product
Property name  | Type  | Description  | 
|---|---|---|
brand  | String?  | 상품의 브랜드 정보  | 
currency  | String?  | 상품의 통화  | 
description  | String?  | 상품에 대한 설명  | 
discountPrice  | Double?  | 상품의 할인 가격  | 
discountRate  | Double?  | 상품의 할인율  | 
imageUrl  | String?  | 상품 이미지 URL  | 
name  | String?  | 상품명  | 
originalPrice  | Double?  | 상품의 정상 가격  | 
productId  | String?  | 상품 고유의 아이디. 상품 등록 시 자동으로 발급  | 
showPrice  | Boolean  | 상품의 보이는 가격  | 
sku  | String?  | 상품 고유의 SKU 정보  | 
url  | String?  | 상품 상세 페이지의 URL  | 
handleProductBanner
handleProductBanner(shortsId: String, shortsSrn: String, scheme: String, shortsDetail: ShortsDetail)를 통해 숏폼에서 직접 배너 클릭 기능을 개발합니다.