crisp-im / crisp-sdk-ios Goto Github PK
View Code? Open in Web Editor NEW:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
Home Page: https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
License: Other
:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
Home Page: https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
License: Other
Can you publish the latest version to Cocoapods https://cocoapods.org/pods/Crisp?
At the moment version 1.0.3 is the latest that is available for download
Hello, I'm using the iOS sdk v1.0.13 and sometimes the app crashes with this stacktrace.
Are there any issues if I call CrispSDK.configure(websiteID: "YOUR_WEBSITE_ID") twice with different website ids? There are any issues if I call it on a background thread?
I got it in Xcode just now: Thread 1: Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value
I'm experiencing a crash caused by the ChatContentViewController.updateAlertView()
function.
The description of the crash is
Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
Stacktrace
0 CoreFoundation 0x18fcbb754 __exceptionPreprocess
1 libobjc.A.dylib 0x1a47827a8 objc_exception_throw
2 CoreAutoLayout 0x1a4a0d7d0 -[NSISEngine tryToOptimizeReturningMutuallyExclusiveConstraints]
3 CoreAutoLayout 0x1a4a0dab0 -[NSISEngine withBehaviors:performModifications:]
4 UIKitCore 0x192bd5678 -[UIView(Hierarchy) _postMovedFromSuperview:]
5 UIKitCore 0x192be44bc -[UIView(Internal) _addSubview:positioned:relativeTo:]
6 Crisp 0x105233a04 ChatContentViewController.updateAlertView() + 692 (ChatContentViewController.swift:692)
7 Crisp 0x105233458 ChatContentViewController.chatViewModelDidUpdateState(_:oldState:) + 456 (ChatContentViewController.swift:456)
8 Crisp 0x10528f3d8 ChatViewModel.state.setter + 66 (ChatViewModel.swift:66)
9 Crisp 0x10528fca4 ChatViewModel.applyChangesFromStore() + 564 (ChatViewModel.swift:564)
10 Crisp 0x10530d890 WeakRef<>.storeStateDidChange(_:oldState:) + 227 (Store.swift:227)
11 Crisp 0x10530c18c Store.state.didset + 57 (Store.swift:57)
12 Crisp 0x10530ca50 Store.reduce(_:) + 149 (Store.swift:149)
13 Crisp 0x10530c760 closure #1 in Store.init(websiteID:sessionData:transport:) + 84 (Store.swift:84)
14 Crisp 0x105216450 closure #5 in closure #1 in variable initialization expression of LifecycleMiddleware + 40 (LifecycleMiddleware.swift:40)
15 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
16 Crisp 0x105350708 closure #1 in closure #1 in closure #1 in variable initialization expression of RequestUploadURLTimeoutMiddleware + 38 (RequestUploadURLTimeoutMiddleware.swift:38)
17 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
18 Crisp 0x1052f42e0 closure #1 in closure #1 in closure #1 in variable initialization expression of MarkDeliveryFailuresMiddleware + 38 (MarkDeliveryFailuresMiddleware.swift:38)
19 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
20 Crisp 0x105324e20 closure #1 in closure #1 in closure #1 in variable initialization expression of HeartbeatMiddleware + 38 (HeartbeatMiddleware.swift:38)
21 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
22 Crisp 0x1053255a4 closure #1 in closure #1 in closure #1 in variable initialization expression of DelayedGameInviteMessageMiddleware + 44 (DelayedGameInviteMessageMiddleware.swift:44)
23 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
24 Crisp 0x105277dc4 closure #1 in closure #1 in variable initialization expression of MessageAcknowledgementMiddleware + 17 (MessageAcknowledgementMiddleware.swift:17)
25 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
26 Crisp 0x10530a7e0 closure #1 in closure #1 in variable initialization expression of PersistSessionDataMiddleware + 23 (PersistSessionDataMiddleware.swift:23)
27 Crisp 0x10526a6a4 partial apply for closure #1 in closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
28 Crisp 0x10521a46c closure #1 in closure #1 in variable initialization expression of ServerStorageMiddleware + 106 (ServerStorageMiddleware.swift:106)
29 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
30 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
31 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
32 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
33 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
34 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
35 Crisp 0x10526a674 partial apply for closure #1 in closure #1 in static Middleware.<> infix(_:_:) (<compiler-generated>)
36 Crisp 0x10530e4c0 partial apply for closure #6 in Store.init(websiteID:sessionData:transport:) (<compiler-generated>)
37 Crisp 0x1052c0374 User.email.setter
38 tiimo 0x1048e8974 specialized CrispDriver.addUserinfo(withEmail:userID:) + 27 (CrispDriver.swift:27)
39 tiimo 0x1047f8cb4 closure #1 in TabBarViewController.verifyUserAuthentication() (<compiler-generated>)
40 tiimo 0x1048eaf28 closure #1 in closure #1 in Auth0Driver.verifyAuthentication(_:) + 130 (Auth0Driver.swift:130)
41 tiimo 0x1048ebc58 partial apply for closure #1 in closure #1 in Auth0Driver.verifyAuthentication(_:)
42 tiimo 0x1048ebbd8 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed Result<Credentials, Error>) -> () (<compiler-generated>)
43 Auth0 0x104f52004 specialized authenticationObject<A>(from:callback:) + 57 (Handlers.swift:57)
44 Auth0 0x104f89000 closure #1 in Request.start(_:) + 93 (Request.swift:93)
45 Auth0 0x104f890a4 partial apply for closure #1 in Request.start(_:) (<compiler-generated>)
46 Auth0 0x104f89134 thunk for @escaping @callee_guaranteed (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () (<compiler-generated>)
47 CFNetwork 0x1902df3dc CFNetServiceBrowserSearchForServices
48 CFNetwork 0x1902f1768 _CFHTTPMessageSetResponseProxyURL
49 libdispatch.dylib 0x18f8a6a84 _dispatch_call_block_and_release
50 libdispatch.dylib 0x18f8a881c _dispatch_client_callout
51 libdispatch.dylib 0x18f8b0004 _dispatch_lane_serial_drain
52 libdispatch.dylib 0x18f8b0c34 _dispatch_lane_invoke
53 libdispatch.dylib 0x18f8bb4bc _dispatch_workloop_worker_thread
54 libsystem_pthread.dylib 0x1daca27a4 _pthread_wqthread
55 libsystem_pthread.dylib 0x1daca974c start_wqthread```
I use Pod and installed pod version crisp 1.0.3
I tried with Pod install --repo-update works and says that Crisp 1.0.3 is installed and I see the framework in my Project.
But the "import Crisp" failed with No such module 'Crisp' and I found an error like
{{path}}/DerivedData/CrispDemo1-gkfxoeytlqjtltcxsdnybdsbtika/Build/Products/Debug-iphonesimulator/Crisp.framework/Modules/Crisp.swiftmodule/x86_64-apple-ios-simulator.swiftinterface:19:35: Unknown attribute '_hasMissingDesignatedInitializers'
I also tried with manual integration of the framework but I get the same error. I also tried downgrading pod and user but the same error getting.
I cleaned my project and deleted derived data between 0.1.30 to 1.3.0 migration.
My environement is :
Pod : 1.10.0
Xcode : Version 11.3
platform :ios, '11.0',
swift version : 5
Hello,
I would like to open a session on iOS with an existing session from the web.
Just what has been said in this link:
https://help.crisp.chat/en/article/how-to-restore-chat-sessions-with-a-token-c32v4t/
For now, the SDK doesn't accept an existing session, I can just get the current one.
Thanks
François
Hi, I'm currently trying Crisp SDK in my iOS app. It seems to work fines except for the following flow (user logout from my app then login with another account, I would like to have a new conversation started).
Maybe I'm not doing what's right.
I have the following flow :
-> User log in (or is logged in and open the app)
-> User profile data is fetched from my server
-> CrispSDK is called to update the user info
CrispSDK.setTokenID(tokenID: "crisp_" + user.id)
CrispSDK.session.setString(user.id, forKey: "userId")
CrispSDK.user.email = user.email
CrispSDK.user.nickname = user.firstName + " " + user.lastName
-> User open a chat sdk, write a message
-> A conversation A is created in Crisp, with the correct user info presented
-> User logs out from my app and CrispSDK.session.reset()
is called
-> User logs into another account
-> New user data is fetched from my server, and filled into CrispSDK (same code as in step 3)
-> New user open chat sdk
-> 🛑 KO: New User sees conversation A entered by the previous user
-> 🛑 KO: New User can write and send, and message appear in the conversation A created by the original user
-> 🛑 KO: In Crisp, the conversation A with the original user is updated with the data of the new user
-> New user kill the app
-> New user relaunch the app
-> New user open chat sdk
-> ✅ Expected behaviour: Chat is blank, new conversation B is created in Crisp, with the new user data
Thanks
Hello,
I have an error on IOS13 with the last version 1.0.6
objc[1096]: Class CLSUserDefaults is implemented in both /System/Library/Frameworks/ClassKit.framework/ClassKit (0x1dd099d40) and /private/var/containers/Bundle/Application/C0CE37E1-ED16-4C2A-B655-9728D374A56C/XXX.app/XXXXX (0x104d4b240). One of the two will be used. Which one is undefined.
The code was in Swift, but with the latest version it just compiled in Objective c.
Thanks for your help
hello, how to hide or show the conversation. it always opens in full screen and one can't back or close or do anything.
Crisp.chat is not defined!
how could I control it?
Pod install fails with error:
Remote branch 1.0.12 not found in upstream origin
I just submitted an app to itunes and got rejected due to "During review, your app installed or launched executable code, which is not permitted on the App Store..".
I'm not sure if this is because of Crisp as I have a lot of code in the app but this line looks suspicious:
_script.src = "https://client.crisp.chat/l.js";
Effectively this is downloading code at runtime to run within the app. It's possible this caused the issue. I'm looking for other reasons though.
Guideline 2.5.2 - Performance - Software Requirements
During review, your app installed or launched executable code, which is not permitted on the App Store..
Please note that while educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code, such code may not be used for other purposes and such apps must make the source code completely viewable and editable by the user.
The next submission of this app may require a longer review time, and this app will not be eligible for an expedited review until this issue is resolved.
Example command: po test
Result:
error: virtual filesystem overlay file '/Users/mb/Library/Developer/Xcode/DerivedData/Crisp-aaaajuyrfyjaumgrrotvdtjcuvti/Build/Intermediates.noindex/ArchiveIntermediates/Crisp/IntermediateBuildFilesPath/Crisp.build/Release-iphonesimulator/Crisp.build/all-product-headers.yaml' not found
error: couldn't IRGen expression. Please check the above error messages for possible root causes.
According to this comment, your team needs to "compile their binary framework with -no-serialize-debugging-options
if they are planning to distribute them to another machine."
I have made a sample project that just contains Crisp as a dependency. Please run pod install
and set a breakpoint in the viewDidLoad
. Run po test
in the console and you should get the same error. I can confirm it is related to Crisp because when I removed it from Cocoapods, it can po test
normally.
Note: I recommend to run on this on a machine that is not used to develop the Crisp framework as it should be missing the all-product-headers.yaml.
I am using Xcode 12.2, Cocoapods 1.10 and Crisp 1.0.6.
Is there a way to setup push notification that integrates with APNS or Firebase to notify the user when there is a new message comes?
It would be great to know if the user has some unread messages, or notifications also.
Is it possible to have in the SDK? Do you have any plans about it?
I can't attach any image to sending messages, as image selection vc isn't disappearing.
The SDK is currently working under Swift 4, however some pods needs to be reverted to Swift 3.2.
It would be nice to have a complete Swift 4 support with updated dependencies.
Hi,
I have a couple of queries on the React Native SDK asking if they can set the language of the SDK to something other than English. Is this possible? I might of missed something when configuring the iOS SDK for react native.
Open issue can be found here - walterholohan/react-native-crisp-chat-sdk#21
How to Resolve this issue..?
both objC and Swift samples are working on simulator but throwing signal SIGABRT error on real device
iphone pro max latest ios version.
another issue faced is on simulator if the chat dialog is minimized it wont receive any new messages or show any indicator.
chat history in the chat box is it identified by token_id or identified by device ?
scenario :
what to be concluded that chat history is identified by Device...
need to fix this issue
and if possible give use clear implementation guide to know how tackle this issue
Xcode12.3, iOS14.3, iPhone6s、iPhone11
Initialized Crisp Crisp SDK Version 1.0.6 (Build 93).
[error] We could not connect to the chat. Try again now, or later.
Info: I'm using iOS 14.6, in Xcode 12.5, and I'm using the SDK version 1.0.13 taken from Cocoapods.
So the product I'm integrating the Crisp chat is available on both iOS and Android.
In the Android version, the other developers already used the nickname with format "[name] ([role] / [userID])". But in the iOS version, I set it as "[name]" only, because the "role" and "userID" will be put as the visitor data.
However, I forgot that in our product, the user name is optional, thus in iOS it'll automatically sent as an empty string.
Then, I changed the implementation to avoid the nickname to be set as empty string from the iOS version. However, every time I opened ChatViewController(), it keeps showing the "Error starting chat" alert. Like the picture below.
On the console, it prints:
[error] (Parsing) Missing field 'nickname' in class Participant
I already fixed for further using, but for this particular account, it's kinda too late to fix it since it seems that the empty string has already been recorded although I've changed the user name to not be empty.
So in summary, the steps to reproduce are:
[name] ([role] / [userID])
. ([role] / [id]
(a space at the beginning is because the name is empty. Then send a message from Android.[name]
.[error] (Parsing) Missing field 'nickname' in class Participant
showed on console.The problem is that in Android, the error doesn't shown, but only in iOS version. Please help me solve this issue. Thanks!
I set name and email through your API but it won't be set at the first time crispView is loaded
But when the user opens a crisp view for the second time it will be Set.
I didn't know where is the best place for setting these properties so I tried putting it in app delegate or my home view controller and event multiple places or calling it twice but the problem persists. and the only way to set these properties is opening a crisp view more than once.
What do you think should I do?
I get this error in logs :
2021-06-10 13:18:05.395878+0200 thndr β[23296:199990] Warning: Attempt to present <CRSPChatViewController: 0x7fd67aec0400> on <UIViewController: 0x7fd67bb062a0> whose view is not in the window hierarchy!
2021-06-10 13:18:05.396762+0200 thndr β[23296:217576] Task <9B408643-C7BE-4363-9928-6E891A353E4B>.<116> finished with error [-999] Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://settings.crisp.chat/client/website/`${website-id}`/prelude/?2021-06-10-13-18, NSLocalizedDescription=cancelled, NSErrorFailingURLKey=https://settings.crisp.chat/client/website/`${website-id}`/prelude/?2021-06-10-13-18}
[error] cancelled
2021-06-10 13:18:05.400294+0200 thndr β[23296:216514] Connection 260: unable to determine interface type without an established connection
2021-06-10 13:18:05.400512+0200 thndr β[23296:216514] Connection 260: unable to determine fallback status without a connection
2021-06-10 13:18:05.400905+0200 thndr β[23296:216514] Task <9B408643-C7BE-4363-9928-6E891A353E4B>.<116> HTTP load failed, 0/0 bytes (error code: -999 [1:89])
2021-06-10 13:18:12.888380+0200 thndr β[23296:199990] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2021-06-10 13:18:30.786602+0200 thndr β[23296:199990] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
I have implemented crisp in my app.. but view not responsive in iphone 5.. loading icon in right of my screen.. is there any option to custom the view ?
PS. i implement exact like your example
I'm trying to install the native Crisp iOS SDK using Cocoapods but it keeps reverting to the old version. After looking around I realized that it is in a separate branch called 'native-sdk'.
Is this not available for use yet? If it is available can you please merge it with the master branch? Otherwise we would have to install it manually and it would look out of place.
Thanks!
Hi,
A user has not been able to open Crisp at all and keeps getting "Error starting chat" when opening the chat. I noticed that this error below keeps showing. We are using Crisp 1.0.10. All we did from our side is upon login this user sets a token ID. The user then gets this error regardless of the device this person is using when opening the chat. Can you please fix this as soon as possible? It seems to have permanently stopped this user from using Crisp.
[error] (Parsing) Found incorrect type for field 'scroll' in class ChatSessionState. Expected 'Int', found __NSCFNumber instead.
Hello,
We are running Crisp 1.03 and got this crash :
Crashed: com.apple.main-thread
0 Crisp 0x10511699c _hidden#7195_ + 35 (__hidden#1194_:35)
1 Crisp 0x105050950 _hidden#7191_ + 252 (__hidden#7317_:252)
2 Crisp 0x10504e794 _hidden#7170_ + 234 (__hidden#7317_:234)
3 Crisp 0x10504e230 _hidden#7169_ + 97 (__hidden#7317_:97)
4 Crisp 0x10504efb4 _hidden#7178_ + 4377145268 (__hidden#1194_:4377145268)
5 Crisp 0x1050fe22c _hidden#8869_ + 177 (__hidden#15907_:177)
6 Crisp 0x105076cb0 _hidden#2930_ + 98 (__hidden#9220_:98)
7 Crisp 0x104ffc51c _hidden#2779_ + 4376806684 (__hidden#3204_:4376806684)
8 Crisp 0x104ffc654 _hidden#2780_ + 4376806996 (__hidden#1194_:4376806996)
9 Crisp 0x1050d086c _hidden#13690_ + 4377675884 (__hidden#1194_:4377675884)
My DSyms are correctly upload.
Any idea how to fix it ?
Thanks
Our app build fails after installing Crisp chat on pod install
Does this seem to happen for anyone else at all?
In the Crisp website settings you have "Show a link to helpdesk in the chatbox (if Crisp Helpdesk is configured)" setting. If you disable it, then the "search on helpdesk" icon in the top right of the chatbox window should disappear, along with the link from the first message of the chat.
This works on the web chatbox, but not on the iOS SDK. On the iOS SDK, only the link in the first message of the chat is hidden, not the top right icon below the operators.
It's important to be able to hide it not only because of consistency but, if that icon appears, upon clicking, it shows a search bar and on the bottom a link "Open Helpdesk" which opens a browser window. It is not desirable to exit the app like this.
Thank you
Any plans for Cordova support?
There is a forced unwrap, which will cause a crash on real devices.
MessageViewController:218
if sharedStore.session!.activeOperators.count == 0 {
navigationItem.rightBarButtonItem?.isEnabled = false
}
Possible fix:
if let session = sharedStore.session, session.activeOperators.count == 0 {
navigationItem.rightBarButtonItem?.isEnabled = false
}
I have an issue with iOS SDK.
If a view controller is presented modally, the chat window won't show up from that modal controller.
Tried using the built-in chat button and the api call (Crisp.chat.open()) too.
code objective call class swift
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
self.view.backgroundColor = BASE_COLOR_WHITE;
_crispView = [CrispView new];
[_crispView setTokenIdWithTokenId:[UserSettings token]];
[_crispView loadWebView];
_crispView.bounds = self.view.bounds;
_crispView.center = self.view.center;
[self.view addSubview:_crispView];
in swift class
//
// CrispView.swift
// Crisp
//
// Created by Baptiste Jamin on 29/12/2017.
// Copyright © 2017 crisp.im. All rights reserved.
//
import Foundation
import UIKit
import WebKit
open class CrispView: UIView, UIWebViewDelegate {
static var webView: UIWebView?
static var commandQueue: [String] = []
static var isLoaded = false
var tokenIdDJ: String!
var websiteIdDj: String!
override init(frame: CGRect) {
super.init(frame: frame)
CrispView.webView = UIWebView()
addSubview(CrispView.webView!)
Crisp.initialize(websiteId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
//loadWebView()
CrispView.webView?.scrollView.isScrollEnabled = false;
CrispView.webView?.scalesPageToFit = true;
CrispView.webView?.contentMode = .scaleAspectFit;
CrispView.webView?.delegate = self
}
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override open func layoutSubviews() {
super.layoutSubviews()
guard let webView = CrispView.webView else { return }
webView.frame = bounds
webView.center = center
}
override open func removeFromSuperview() {
guard let webView = CrispView.webView else { return }
CrispView.isLoaded = false
webView.removeFromSuperview()
CrispView.webView = nil
super.removeFromSuperview()
}
public func webViewDidFinishLoad(_ webView: UIWebView) {
CrispView.isLoaded = true
CrispView.flushQueue()
}
@objc public func loadWebView() {
guard let webView = CrispView.webView else { return }
var frameworkBundle = Bundle(for: CrispView.self)
let bundleURL = frameworkBundle.resourceURL?.appendingPathComponent("Crisp.bundle")
let bundle = Bundle.init(url: bundleURL!)
var filePath: String? = bundle?.path(forResource: "index", ofType: "html")
if (filePath == nil) {
frameworkBundle = Bundle(for: type(of: self))
filePath = frameworkBundle.path(forResource: "assets/index", ofType: "html")
}
let urlPath = URL(string: filePath!)
webView.loadRequest(URLRequest(url: urlPath!))
if (Crisp.tokenId != "") {
CrispView.execute(script: "window.CRISP_TOKEN_ID = \"" + tokenIdDJ + "\";");
// CrispView.execute(script: "window.CRISP_TOKEN_ID = \"" + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + "\";");
}
CrispView._load()
}
static func _load() {
CrispView.execute(script: "window.CRISP_WEBSITE_ID = \"" + Crisp.websiteId + "\";");
// CrispView.execute(script: "window.CRISP_WEBSITE_ID = \"" + "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + "\";");
CrispView.execute(script: "initialize()");
}
static func execute(script: String) {
commandQueue.append(script)
if (isLoaded) {
flushQueue()
}
}
static func flushQueue() {
for script in commandQueue {
callJavascript(script: script)
}
commandQueue = []
}
static func callJavascript(script: String) {
guard let webView = CrispView.webView else { return }
webView.stringByEvaluatingJavaScript(from: script)
}
@objc public func setWebId(websiteId: String) {
self.websiteIdDj = websiteId
}
@objc public func setTokenId(tokenId: String) {
self.tokenIdDJ = tokenId
}
}
everything goes normally, but click add file (photo, camera, other) if click ok/select the application display changes to a white screen
I use Pod and can't migrate from Crisp 0.1.30 to crisp 1.0.3
Pod install --repo-update works and says that Crisp 1.0.3 is installed and I see the framework in my Project.
But the "import Crisp" failed with No such module 'Crisp'
I cleaned my project and deleted derived data between 0.1.30 to 1.3.0 migration.
My environement is :
Pod : 1.8.4
Xcode : Version 11.7 (11E801a)
platform :ios, '11.0',
swift version : 4.2
What is the minimum version of IOS?
I cant submit with 12.0.
Thanks for your help
Julien
(I have no error with Pod install)
I've seen the chat failing when it's restoring a chat from a token also session reset seems unreliable, changing user and token keeps showing the previous chat.
My iOS app is crashing when I try to use Crisp SDK in my project. It is happening inside Starscream pod which is used in my app and also used inside Crisp SDK. Tested with Crisp SDK version 1.0.13
Also I get run time warnings in logs when app starts due to same pod Starscream being used in both my app and Crisp SDK.
objc[8734]: Class PodsDummy_Starscream is implemented in both /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Starscream.framework/Starscream (0x10988c728) and /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Crisp.framework/Crisp (0x105bd11f0). One of the two will be used. Which one is undefined. objc[8734]: Class _TtC10Starscream12Decompressor is implemented in both /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Starscream.framework/Starscream (0x10988e4f8) and /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Crisp.framework/Crisp (0x105be03d0). One of the two will be used. Which one is undefined. objc[8734]: Class _TtC10Starscream10Compressor is implemented in both /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Starscream.framework/Starscream (0x10988e620) and /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Crisp.framework/Crisp (0x105be04f8). One of the two will be used. Which one is undefined. objc[8734]: Class _TtC10Starscream9WebSocket is implemented in both /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Starscream.framework/Starscream (0x10988df70) and /private/var/containers/Bundle/Application/F4E7AFDC-A9D2-45F3-B1C2-F976D762FD68/MyApp.app/Frameworks/Crisp.framework/Crisp (0x105bd13e8). One of the two will be used. Which one is undefined.
Faced this issue when on Crisp example app,
CrispChatIssue.pdf
My project uses SocketIO-Client-Swift (15.2.0) and I'm getting a ton of warnings about classes being implemented in both frameworks (my app and the Crisp SDK) and also some runtime crashes from my calls to those classes.
Hello,
It could be cool to support Swift Packet Manager for the installation : https://github.com/apple/swift-package-manager
Hi, I'm trying to use the SDK on ios with swift, and I'm facing this error in the console:
[error] Could not create URL from string 'https://settings.crisp.chat/client/website//"MyWebsitID"/prelude/?2020-12-22-2-54 PM'. Please report this to https://github.com/crisp-im/crisp-sdk-ios/issues/new and quote this message there.
My iPhone: iPhone x
iOS version: 14.2
Language: en
Region: Turkey
Steps:
1- Install the SDK using CocoaPods, and run pod update, SDK current version now is: 1.0.6
2- Updated my Info.plist with the privacy required.
3- Setup the SDK configuration in the AppDelegate by calling CrispSDK.configure(websiteID: "MyWebsitID") in didFinishLaunchingWithOptions.
4- Present ChatViewController from a button like this: present(ChatViewController(), animated: true).
Result:
1- ChatViewController get presented showing loading indicator with "Starting chat.." text
2- get error in the console: [error] Could not create URL from string 'https://settings.crisp.chat/client/website//"MyWebsitID"/prelude/?2020-12-22-2-54 PM'. Please report this to https://github.com/crisp-im/crisp-sdk-ios/issues/new and quote this message there.
I talked to the live support and ask them how to use the API like : CrispSDK.user.email and CrispSDK.user.nickname
thy told me the following:
I will ask our developers
User email and user nickname, Second line and third line
and It doesn't matter where you add it.
What did I tried so far:
1- I did try to add userName email etc in the AppDelegate after I set the websiteID, but still same error
2- I did try to add userName email etc before calling present(ChatViewController(), animated: true), and still same error
Hi,
I'm trying to compile my project on Xcode 12 Beta 3 with Crisp version 1.0.3 installed using Cocoapods. But it is giving me this error:
Failed to build module 'Crisp' from its module interface; the compiler that produced it, 'Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang-1200.0.22.4 clang-1200.0.25.1)'
I'm not sure if this is an issue with my settings in Xcode. Do you have any suggestions on how to work around this?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.