techaffinity / freshchat-phonegap

Freshchat sdk for phonegap
7 stars 36 forks source link

Unable to build capacitor 3 app with freshchat-phonegap plugin #56

Open rroukens opened 2 years ago

rroukens commented 2 years ago

We're migrating our app to capacitor 3. Until now (capacitor 1 and 2) freshchat worked fine, but when updating our app to capacitor 3, it no longer builds. Freshworks also knows this issue, but sais it doesn't support the plugin, and should have asked techAffinity. However, we don't hear from anyone anymore. Is someone still maintaining this project? Freshworks ticket on this: https://support.freshdesk.com/support/tickets/9781107. Thanks

techaffinity commented 2 years ago

@rroukens We have upgraded the code and it is currently under internal testing process, till then, can you kindly refer to the below branch which is compatible with Capacitor 3, and follow the steps provided in ReadMe https://github.com/techaffinity/freshchat-phonegap/tree/SDK_Update

dneprogall commented 2 years ago

Good day! We would like to share our experience of using Capacitor 3 version of Freshchat plugin. That is not so easy as it described in documentation, at least in our project. 

First of all console returns an error zsh: no matches found when we tried to run:

npm install https://github.com/techaffinity/freshchat-phonegap.git#SDK_Update

 So solution was to run:

npm install "git+https://github.com/techaffinity/freshchat-phonegap.git#SDK_Update"

After pod 'FreshchatSDK' installed we drag and drop files from Freshchat folder to App/App folder. But in that case we have duplication of files that in future will lead to more errors during build (we checked). So we manually removed Freshchat folder from CordovaPlugins folder. 
App-Bridging-header.h file added to build setting, so according to documentation - build should work fine, but not in our case:

 First error:
 'App-Bridging-header.h' file not found in App/Pods/Target Support Files/CordovaPlugins/CordovaPlugins-umbrella.h

 Solution - removing both strings:

        #import "App-Bridging-header.h"
    #import "FreshchatPlugin.h



Second error:
 ’FreshchatSDK/FreshSDK.h' file not found error in App-Bridging-header.h file.

 Solution - Replacing #import "FreshchatSDK/FreshSDK.h" to #import "../Pods/FreshchatSDK/FreshchatSDK/FreshchatSDK.h”

 And now build is succeeded. But each time if we need to do rebuild of our ionic project we have to repeat manipulations with CordovaPlugins-umbrella.h file.

Let us know if you have any questions

rroukens commented 2 years ago

Hi there, @dneprogall is a member of my team. He added the above comment on February 7. Until now, we don't see any response or change in the SDK_Update branch. What can we expect from you guys? maybe you are under the impression everything works fine, but that is not the case. We cannot proceed with upgrading our app to capacitor 2+ at the moment and it's beginning to be a big drag on our project. Can someone please make improvements so it becomes the official new release of this project? Thanks a lot!

rroukens commented 2 years ago

Hello, anyone any news???

sneko commented 2 years ago

@rroukens did you find a solution at the end? Thank you,

rroukens commented 2 years ago

Hi @sneko, actually we ended up developing our own capacitor plugin. It's still in development and we only implemented the methods of the SDK we need ourselves. But you are welcome to join the development. It can be found here: https://github.com/viveapp/capacitor-plugin-freshchat

sneko commented 2 years ago

To all, I can confirm https://github.com/viveapp/capacitor-plugin-freshchat worths the try!

It misses some useful methods as of today but this is a really good initiative! Thank you @rroukens and your team :)