target 'HostProjectSdk' do
pod 'WishiSDK', '0.4.3'
end
2. run pod install
Add configuration for the SDK initialisation process before the first launch.
import WishiSDK
// register to Wishi client SDK protocol
class ViewController: UIViewController, WishiSDKDelegate
let clientInfo = ClientInfo.init(firstName: "Jhon", lastName: "Doe", email: "test@best.company.ever")
```swift
let configDictionary: [ConfigurationStyle: Any] = [
.rateTextiewFont: UIFont.systemFont(ofSize: 16.0),
.ratePlaceholderFont: UIFont.systemFont(ofSize: 16.0),
.lookViewPriceFont: UIFont.systemFont(ofSize: 16.0),
.itemViewPriceFont: UIFont.systemFont(ofSize: 16.0),
.matchReviewCellNameFont: UIFont.systemFont(ofSize: 16.0),
.matchReviewCellTextFont: UIFont.systemFont(ofSize: 16.0),
.matchInfoCellTitleFont: UIFont.systemFont(ofSize: 16.0),
.matchExpertCityNameFont: UIFont.systemFont(ofSize: 16.0),
.matchActivityIndicatorFont: UIFont.systemFont(ofSize: 16.0),
.quizAnswerUnselectedFont: UIFont.systemFont(ofSize: 16.0),
.rateDoneButtonFont: UIFont.boldSystemFont(ofSize: 16.0),
.chatLoveItReStyleItFont: UIFont.boldSystemFont(ofSize: 16.0),
.lookViewNameFont: UIFont.boldSystemFont(ofSize: 16.0),
.itemViewNameFont: UIFont.boldSystemFont(ofSize: 16.0),
.matchReviewCellTitleFont: UIFont.boldSystemFont(ofSize: 16.0),
.matchInfoCellHeaderFont: UIFont.boldSystemFont(ofSize: 16.0),
.matchExpertNameFont: UIFont.boldSystemFont(ofSize: 16.0),
.uploadPhotoButtonFont: UIFont.boldSystemFont(ofSize: 16.0),
.quizAnswerSelectedFont: UIFont.boldSystemFont(ofSize: 16.0),
.navigationTitleFont: UIFont.boldSystemFont(ofSize: 16.0),
.navigationSubTitleFont: UIFont.systemFont(ofSize: 14.0),
.rateTitleFont: UIFont.systemFont(ofSize: 22.0),
.quizButtonFont: UIFont.systemFont(ofSize: 16.0),
.rateAnswerTextCellFont: UIFont.systemFont(ofSize: 16.0),
.matchLooksCellTitleFont: UIFont.systemFont(ofSize: 22.0),
.historyProductsSectionHeaderFont: UIFont.systemFont(ofSize: 16.0),
.quizHeaderFont: UIFont.systemFont(ofSize: 22.0),
.quizSubHeaderFont: UIFont.systemFont(ofSize: 16.0),
.tooltipTitleFont: UIFont.systemFont(ofSize: 14.0),
.chatMessageTimestempFont: UIFont.systemFont(ofSize: 14.0),
.itemViewReviseItFont: UIFont.boldSystemFont(ofSize: 16.0),
.chatSectionHeaderFont: UIFont.systemFont(ofSize: 14.0),
.navigationTitleColor: UIColor.black,
.historyProductsSectionHeaderColor: UIColor.black,
.rateUnderscoreViewColor: UIColor.black,
.navigationSubTitleColor: UIColor.black,
.quizSubHeaderColor: UIColor.black,
.quizHeaderColor: UIColor.black,
.quizButtonColor: UIColor.black,
.matchLookCellBorderColor: UIColor.white,
.quizBorderUnselectedColor: UIColor.lightGray,
.uploadBackgroundColor: UIColor.darkGray,
.rateTextiewColor: UIColor.black,
.matchReviewCellNameColor: UIColor.black,
.matchReviewCellTitleColor: UIColor.black,
.matchReviewCellTextColor: UIColor.black,
.quizBorderSelectedColor: UIColor.black,
.quizAnswerLabelColor: UIColor.black,
.matchLooksCellTitleColor: UIColor.black,
.matchInfoCellHeaderColor: UIColor.black,
.matchInfoCellTitleColor: UIColor.black,
.uploadPhotoButtonColor: UIColor.black,
.matchExpertNameColor: UIColor.black,
.matchExpertCityNameColor: UIColor.black,
.matchActivityIndicatorColor: UIColor.black,
.quizButtonTextColor: UIColor.white,
.errorBackgroundColor: UIColor.DarkGray
]
let configuration = Configurations.init(configuration: configDictionary)
```
// function return empty string on failure and clientId on success.
Wishi.shared.initSDK(clientInfo: ClientInfo,
partnerKey: String,
partnerToken: String,
partnerUserId: String,
enviroment: WishiEnviroment = .development,
configuration: Configurations?,
delegate: WishiSDKDelegate,
completion: @escaping ((Bool) -> Void)) {}
Wishi.shared.launch(from: navigation)