cordova-plugin-cocoapods-support icon indicating copy to clipboard operation
cordova-plugin-cocoapods-support copied to clipboard

Loading pod via git link loads wrong pod

Open SchmidtKBS opened this issue 4 years ago • 0 comments

Hello, i'm developing a customized version of cordova-plugin-document-scanner and I want to use a customized version of the WeScan library. I forked both and tried to load WeScan via cocoapods-support from a github repository. But every time I add the ios platform to my project via 'ionic cap add ios' the original WeScan library is fetched and added to the iOS folder. My plugin.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="cordova-plugin-document-scanner" version="4.3.0">

  <name>Scan</name>
  <engines>
    <engine name="cordova-android" version=">=6.4.0" />
  </engines>
  <asset src="www/scan.js" target="js/scan.js"/>
  <js-module src="www/scan.js" name="scan">
    <clobbers target="scan" />
  </js-module>

  <platform name="android">
    <config-file target="res/xml/config.xml" parent="/*">
      <feature name="Scan">
        <param name="android-package" value="com.neutrinos.plugin.Scan"/>
      </feature>
    </config-file>

    <source-file src="src/android/Scan.java" target-dir="src/com/neutrinos/plugin/" />
    <source-file src="src/android/FileHelper.java" target-dir="src/com/neutrinos/plugin/" />
    <framework src="src/android/build.gradle" custom="true" type="gradleReference"/>
  </platform>


  <platform name="ios">
    <config-file target="config.xml" parent="/*">
      <feature name="Scan">
        <param name="ios-package" value="Scan" />
      </feature>
    </config-file>

    <source-file src="src/ios/Scan.swift" />

    <dependency id="cordova-plugin-add-swift-support" version="^2.0.2"/>
    <dependency id="cordova-plugin-cocoapod-support"/>
    <pods-config ios-min-version="11.0" use-frameworks="true">

    </pods-config>
    <pod name="WeScan" git="https://github.com/kbs-fabfel/WeScan" commit="b289866"/>

    <preference name="CAMERA_USAGE_DESCRIPTION" default="This app needs camera access"/>
    <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
      <string>$CAMERA_USAGE_DESCRIPTION</string>
    </config-file>

    <preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default="This app needs read/write-access photo library access"/>
    <config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
      <string>$PHOTOLIBRARY_USAGE_DESCRIPTION</string>
    </config-file>
    
  </platform>

</plugin>

Any ideas, why the original library is fetched instead of the forked one?

SchmidtKBS avatar Mar 15 '21 09:03 SchmidtKBS