3

I am having trouble importing frameworks to my Cordova plugin. When I try to access them in my source files, it fails with 'undeclared' errors. My plugin folder structure is as follows:

plugin.xml
ios/ERS.swift
ios/ERS-Bridging-Header.h
ios/libs/AEXML.framework
ios/libs/KissXML.framework
ios/libs/SwiftyRSA.framework
ios/libs/XUCore.framework
ios/libs/XUEETCommunicator.swift

Content of bridging header is:

#ifndef ERS_Bridging_Header_h
#define ERS_Bridging_Header_h

#import <AEXML/AEXML.h>
#import <KissXML/KissXML.h>
#import <SwiftyRSA/SwiftyRSA.h>
#import <XUCore/XUCore.h>

#endif

And of my plugin.xml:

<platform name="ios">
  <config-file parent="/*" target="config.xml">
    <feature name="eet"><param name="ios-package" value="eet" />
    </feature>
  </config-file>
  <source-file src="src/ios/ERS.swift" />
  <source-file src="src/ios/ERS-Bridging-Header.h" />
  <!-- Library for EET -->
  <source-file src="src/ios/libs/XUCzechLocaleSpecificData.swift"  />
  <source-file src="src/ios/libs/XUEETCommunicator.swift" />   

  <framework src="src/ios/libs/AEXML.framework"  custom="true" embed="true"/>
  <framework src="src/ios/libs/KissXML.framework"  custom="true" embed="true"  />
  <framework src="src/ios/libs/SwiftyRSA.framework"  custom="true" embed="true" />  
  <framework src="src/ios/libs/XUCore.framework"  custom="true" embed="true" /> 
</platform>

After this configuration, i am getting following error (along with others of the same type):

XUEETCommunicator.swift:99:18: error: use of unresolved identifier 'AEXMLOptions'

I am also using Cordova Swift Support plugin, but I still cant get it to work. Also tried this solution: https://stackoverflow.com/a/36723619/7141625

But after that, the project file is corrupted and can not be parsed.

I am reviewing the code in XCode 9 and also trying to build it in Ionic3 project via

ionic cordova build ios

with the same result.

Filip Matys
  • 185
  • 3
  • 12

0 Answers0