I would like to share my experience in creating a Cordova plug-in for web application and using the Estimote iOS SDK in it.
What is Apache Cordova?
An app' based on a such framework is called a web app'.
What is a Cordova plug-in?
At Lekooa team, we use this Cordova plug-in for ranging in our web application using the methods that Estimote provides.
At the beginning, we were copy/pasting the
EstimoteSDK.framework file into our Cordova plug-in, but we faced problems with the integration during the
cordova platform add ios command.
That's why we searched for an easier way to use the Estimote SDK, as easy as it was done for Android.
And then we found the Estimote iOS SDK in the CocoaPods library.
What is CocoaPods?
CocoaPods is a dependency manager for iOS used to add third-party libraries into your code (like the Estimote SDK).
So we added that to our plug-in's
plugin.xml file following the Cordova documentation:
<!-- To add a CocoaPod pod in a Cordova plug-in: -->
<framework src="EstimoteSDK" type="podspec" spec="~> 4.17">
Unfortunately, it didn't work. We lost lot of time but in the end, we managed to get it work just by writing the true version number:
4.17.0 (very frustrating ).
So if you want to add a third-party library to your Cordova plug-in, write the correct number