I am facing an error while making a flutter plugin on the iOS side while using pods. The pods are installed successfully then also I am able to import them in the file.
The pod in my case which I am trying to use is Freshchat iOS SDK
Steps I have followed to install the pod
Start a new Flutter plugin project.
In
.podspecfile adds.dependency 'FreshchatSDK'Run
pod installinexample/iosfolder.I got an error
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/nimish/FlutterProjects/freshchat_flutter/freshchat_flutter/example/ios/Pods/FreshchatSDK/FreshchatSDK/libFDFreshchatSDK.a)I removed
use_frameworks!frompodfilefollowing this comment .I ran
pod installagain and the pods were successfully installed andPodsfolder was created which hadFreshchatSDKfolder in it.
Now I need to have use_frameworks! in my project because other plugins are not compiling because of this.
I added
s.static_framework = truein.podspecanduse_frameworks!inpodfile. Nowpod installran successfully,After I added the import
#import "FreshchatSDK.h"in myPlugin.hfile I got the errorerror: include of non-modular header inside framework module
I tried this answer but was not able to resolve it.
Please help me resolve this. I'll be respectful of your time.
There is another flutter plugin available here but it has many issues and one unhandled case is making my iOS app crash so I want to make it my own.