zoho / SalesIQ-Mobilisten-Cordova

SalesIQ Mobilisten plugin for Apache Cordova/PhoneGap/Ionic.
https://mobilisten.io
6 stars 4 forks source link

No known class method for selector 'registerVisitor:' No known class method for selector 'unregisterVisitor:' in ionic capacitor ios project #5

Closed kulkarniyudhi closed 2 years ago

kulkarniyudhi commented 2 years ago

getting above error when trying to build for ios No known class method for selector 'registerVisitor:' No known class method for selector 'unregisterVisitor:'

I m using capacitor with ionic and installed plugin with npm install https://github.com/zoho/SalesIQ-Mobilisten-Cordova.git npx cap sync

Rishabh-Raghunath commented 2 years ago

Hi @kulkarniyudhi, this issue should not occur when installing the plugin solely using NPM. Do you happen to be including the "Mobilisten" pod for iOS manually in your project?

A screenshot or the complete error would be helpful.

kulkarniyudhi commented 2 years ago

i have installed using npm command: npm install https://github.com/zoho/SalesIQ-Mobilisten-Cordova.git screenshot: IMG-20210721-WA0005

Rishabh-Raghunath commented 2 years ago

Looking at the screenshot, it appears that the iOS Mobilisten framework version dependency has been resolved incorrectly after running the npx cap sync command. We shall push an update to the plugin that would address the dependency resolution issue.

Thanks for bringing this to our notice.

kulkarniyudhi commented 2 years ago

Thank you , will wait for update. still if there any other way to solve it temporary ? I need it.

Rishabh-Raghunath commented 2 years ago

As a temporary workaround, you may navigate to the cordova_zohosalesiq_mobilisten folder within the node_modules directory and make the following changes to the snippet in the plugin.xml file as shown below:

<pods use-frameworks="true">
-   <pod name="Mobilisten" options="podspec: 'https://raw.githubusercontent.com/zoho/SalesIQ-Mobilisten-iOS/v4.0.0/Mobilisten.podspec'" />
+   <pod name="Mobilisten" spec="4.0.0" />
</pods>

Once the above line is replaced, running the npx cap sync command again should install the correct dependency.

kulkarniyudhi commented 2 years ago

Thank you ! its working .

Rishabh-Raghunath commented 2 years ago

Glad to hear that the solution works for you. We have now released a new update, version 2.1.1 where this issue has been fixed.

Updating to the latest version of the plugin should get you up and running without issues. We look forward to your confirmation.

Rishabh-Raghunath commented 2 years ago

We are closing this issue now. Please feel free to reach us or leave a comment if you have any further queries. Thanks.