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
.podspec
file adds.dependency 'FreshchatSDK'
Run
pod install
inexample/ios
folder.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!
frompodfile
following this comment .I ran
pod install
again and the pods were successfully installed andPods
folder was created which hadFreshchatSDK
folder 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 = true
in.podspec
anduse_frameworks!
inpodfile
. Nowpod install
ran successfully,After I added the import
#import "FreshchatSDK.h"
in myPlugin.h
file 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.