I have a hybrid app and I need to implement a Zendesk Tool there. There is a plugin that I thought that I am trying to use: https://github.com/fleetio/cordova-plugin-zendesk
The problem is that I am able to make it work on Android but on IOS the build fails with an error:
❌ /Users/ionic/builds/casasoft/jobmate-frontend/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginZendesk/Zendesk.m:3:9: module 'ZendeskSDK' not found
I tried to provide the integrator using CocoaPods too according to what is written in the release notes and I am experimenting a lot trying to change some things but unfortunately without any success.
I am completely out of ideas right now and I started to shoot in the dark but really nothing helps.
Was anyone using it on IOS before? I am trying to build with XCode 11 but even with XCode 10, the error is always the same, even with Appflow Service (Ionic product to build ios files).
What am I missing? Do you have any idea what might be wrong? Maybe it rings a bell in someone's head... Thanks in advance.
That plugin uses cordova-plugin-cocoapods-support
as a dependency to configure CocoaPods dependencies instead of using the official Cordova tags.
Capacitor doesn't support those custom tags, there is an issue open for considering it, so add a +1 reaction if you are interested https://github.com/ionic-team/capacitor/issues/2773
But the ideal fix would be for the plugin authors to move to the official syntax
I tried to investigate a bit on my own. Eventually, I was able to build on IOS but I did this only as an out-of-curiosity check.
This is a sort of a workaround (with the 'official syntax' mentioned in the @jcesarmobile comment).
This is not a fully solved problem and I am not an IOS developer so I am not sure if this code makes 100% sense (but it worked). I am just giving a hint here to everyone who may encounter a similar problem.
In the plugin.xml
1) removed this line
<dependency id="cordova-plugin-cocoapod-support" />
2) inside 'platform name="ios" remove this line:
<pod name="ZendeskSDK" version="~> 3.0.1" />
3) instead of this deleted line (from point 2) paste this:
<podspec>
<config>
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods>
<pod name="ZendeskSDK" git="https://github.com/zendesk/zendesk_sdk_ios.git" branch="3.0.1-swift5.1-GM" />
</pods>
</podspec>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.