Starting with iOS 10, Apple requires developers to declare access to privacy-sensitive controls ahead of time.
<key>NSPhotoLibraryUsageDescription</key><string>To Enable access to Photo Library</string><key>NSCameraUsageDescription</key><string>To take Images from Camera</string>
If you encounter non-modular header error during project build
error: include of non-modular header inside framework module 'flutter_freshchat.FlutterFreshchatPlugin'
Manually in xcode update the FreshchatSDK.h to be in the flutter_freshchat target and public.
You may have to do this each time your switch or rebuild the xcode project from flutter.
Update the user info by setting by creating a FreshchatUser object
FreshchatUser user = FreshchatUser.initial();
user.email = "john@test.com";
user.firstName = "john";
user.lastName = "doe";
user.phoneCountryCode = "+91";
user.phone = "0123456789";
awaitFlutterFreshchat.updateUserInfo(user: user);
// Custom properties can be set by creating a Map<String, String>Map<String, String> customProperties = Map<String, String>();
customProperties["loggedIn"] = "true";
awaitFlutterFreshchat.updateUserInfo(user: user, customProperties: customProperties);
Identify the user user by usin email address or any way you uniquely identify the user.
externalID is required and returns a restoreID you can save it and use to restore the chats
Show conversation opens a conversation screen and also list all the other conversation if a list obejct is supplied to it. You can also pass a title for the chat screen.
ShowFAQs opens a FAQ screen in a grid like format as default you can change the default setting by changing this paramters. showFaqCategoriesAsGrid = true showContactUsOnAppBar = true showContactUsOnFaqScreens = false showContactUsOnFaqNotHelpful = false
awaitFlutterFreshchat.showFAQs();
Gets the unseen message count from freshchat you can use this to show a counter.
int count = awaitFlutterFreshchat.getUnreadMsgCount();
Reset user data at logout or when deemed appropriate based on user action in the app.