kommunicate-io / kommunicate-react-native-sdk Goto Github PK
View Code? Open in Web Editor NEWReact native SDK for Kommunicate customer support chat.
React native SDK for Kommunicate customer support chat.
We are using the sdk with Expo.
On ios seems to works well.
On android we can't build.
running expo run:android
FAILURE: Build failed with an exception.
we have installed the last version -> "react-native-kommunicate-chat": "^2.3.0",
I recently installed the latest version but after installation i am getting following error
Cannot find type 'ListTemplate' in scope
this line is mentioned in RNKommunicateChat
func richMessageClicked(conversationId: String, action: Any, type: String) {
let jsonEncoder = JSONEncoder()
var actionString: String = ""
if action is ListTemplate.Element, let actionElement = action as? ListTemplate.Element,
let jsonData = try? jsonEncoder.encode(actionElement)
{
actionString = String(data: jsonData, encoding: String.Encoding.utf8) ?? ""
} else if let actionDict = action as? [String: Any] {
actionString = convertDictToString(dict: actionDict as NSDictionary)
} else {
print("Could not parse Rich Message action object")
}
let richMessageDict: [String:Any] = ["conversationId": conversationId,"action": actionString, "actionType": type]
KMEventEmitter.emitter.sendEvent(withName: "onRichMessageButtonClick", body: ["data": convertDictToString(dict: richMessageDict as NSDictionary)])
}
React native version 0.74.1
react-native-kommunicate-chat 2.3.2
I installed Kommunicate recently & it's working fine in case of android but for IOS build starts failing. I'm attaching some screenshots & snippet of versions I'm using.
package.json
"dependencies": {
"axios": "^1.6.0",
"react": "18.1.0",
"react-native": "0.70.10",
"react-native-kommunicate-chat": "^2.3.0",
"react-native-safe-area-context": "^4.7.4",
"react-native-webview": "^13.6.2"
}
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
use_frameworks!
install! 'cocoapods', :deterministic_uuids => false
target 'practical' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.disabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'practicalTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Let me know if you need anything else from my end.
Thanks
Getting Unsafe Cipher Mode Error for the code used in one of the Jar Files in Kommunicate SDK
The file name is : com.applozic.mobicommons.encryption.EncryptionUtils.java
According to the Google Security Policy , the Cipher instance made using "AES/ECB/NoPadding" should be replaced with “AES/GCM/NoPadding”
Reference Link: [https://support.google.com/faqs/answer/10046138]
I tried to login with following method
var KommunicateChat = NativeModules.RNKommunicateChat;
var kmUser = {
userId: "Uzef1234",
displayName: "Uzef1234",
password: "",
applicationId: "",
authenticationTypeId: 1,
deviceApnsType: 0
};
KommunicateChat.loginUser(kmUser, (response, message) => {
if (response == 'Success') {
console.log(message);
} else if (response == 'Error') {
console.log(message);
}
});
loginUser method returns null everytime,
Here this user is available in my kommunicate account
FYI this user was created automatically when i called the coversation api from postman, hence it does not has password that's why passing blank in password
https://services.kommunicate.io/rest/ws/group/conversation
{
"groupName": "testGrp",
"groupMemberList":["Uzef1234"]
}
Version Info
"react": "18.2.0", "react-native": "0.74.1", "react-native-kommunicate-chat": "^2.3.4"
is there anyway to way to get this working without use_framework! in podfile?
i have already added applozic-settings.json in asset folder in android how to change the navigation bar text to black color and hide bot name in received message
React-native-Kommunicate-chat integration for react-native 0.63.2 fails with a Swift compiler error
No Such Module React
Suggestions are needed on a updated path to integration for the latest react-native-version
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.