Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,6 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-KoreBotSDKDemo/Pods-KoreBotSDKDemo-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
Expand All @@ -696,8 +694,6 @@
"${BUILT_PRODUCTS_DIR}/SocketRocket/SocketRocket.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Charts.framework",
Expand Down
3 changes: 2 additions & 1 deletion Examples/CocoapodsDemo/SDKConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SDKConfiguration: NSObject {
static let clientSecret = "<client-secret>" // Copy this value from Bot Builder SDK Settings ex. Wibn3ULagYyq0J10LCndswYycHGLuIWbwHvTRSfLwhs=

static let botId = "<bot-id>" // Copy this value from Bot Builder -> Channels -> Web/Mobile Client ex. st-acecd91f-b009-5f3f-9c15-7249186d827d

static let chatBotName = "<bot-name>" // Copy this value from Bot Builder -> Channels -> Web/Mobile Client ex. "Demo Bot"

static let identity = "<identity-email> or <random-id>"// This should represent the subject for JWT token. This can be an email or phone number, in case of known user, and in case of anonymous user, this can be a randomly generated unique id.
Expand All @@ -32,6 +32,7 @@ class SDKConfiguration: NSObject {
struct serverConfig {
static let JWT_SERVER = String(format: "http://<jwt-server-host>/") // Replace it with the actual JWT server URL, if required. Refer to developer documentation for instructions on hosting JWT Server.


static func koreJwtUrl() -> String {
return String(format: "%@users/sts", JWT_SERVER)
}
Expand Down
5 changes: 1 addition & 4 deletions Examples/Shared/Common/KABotClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,7 @@ open class KABotClient: NSObject {
let dataStoreManager: DataStoreManager = DataStoreManager.sharedManager
let context = dataStoreManager.coreDataManager.workerContext
context.perform {
let resources: Dictionary<String, AnyObject> = ["threadId": botId as AnyObject, "subject": chatBotName as AnyObject, "messages":[] as AnyObject]

dataStoreManager.deleteThreadIfRequired(with: botId, completionBlock: { (success) in
let resources: Dictionary<String, AnyObject> = ["threadId": botId as AnyObject, "subject": chatBotName as AnyObject, "messages":[] as AnyObject]
dataStoreManager.insertOrUpdateThread(dictionary: resources, with: {(thread1) in
self?.thread = thread1
try? context.save()
Expand All @@ -383,7 +381,6 @@ open class KABotClient: NSObject {
failure?(error!)
})
})
})
}
}, failure: { (error) in
print(error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ class AppLaunchViewController: UIViewController {
identity = SDKConfiguration.botConfig.identity
}

let dataStoreManager: DataStoreManager = DataStoreManager.sharedManager
dataStoreManager.deleteThreadIfRequired(with: botId, completionBlock: { (success) in
print("Delete Sucess")
})

if !clientId.hasPrefix("<") && !clientSecret.hasPrefix("<") && !chatBotName.hasPrefix("<") && !botId.hasPrefix("<") && !identity.hasPrefix("<") {
let activityIndicatorView: UIActivityIndicatorView = UIActivityIndicatorView(style: .white)
activityIndicatorView.center = chatButton.center
Expand Down
Loading