ios - How to add Cordova plugins to Xcode project with embedded Cordova WebView? -


i have xcode ios project have added cordova webview.

i stumbled through tutorial. https://cordova.apache.org/docs/en/latest/guide/platforms/ios/webview.html

how can add plugins it?


if try use plugman suggest, error:

plugman install --platform ios --project path/to/my/custom/xcode/project --plugin cordoba-plugin-console

failed install 'cordova-plugin-console':cordovaerror: provided path "path/to/my/custom/xcode/project" not cordova ios project.

of course true. instructions followed adding web view non cordova project.


i tried adding plugins cordova ios project before bringing on config.xml , such own project.

the result project launch these errors in xcode console:

cdvplugin class cdvfile (pluginname: file) not exist.

error: plugin 'file' not found, or not cdvplugin. check plugin mapping in config.xml.


i tried bringing on plugins folder reference project project. (the 1 has files cdvlogger.h/m , cdvfile.h/m

when this, build errors:

duplicate symbol _kcdvfilesystemurlprefix in: /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvcapture.o /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvlocalfilesystem.o duplicate symbol _kcdvfilesystemurlprefix in: /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvcapture.o /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvassetlibraryfilesystem.o duplicate symbol _kcdvfilesystemurlprefix in: /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvcapture.o /users/dustinbahr/library/developer/xcode/deriveddata/audiocapture-hbvwvtednsahtmgofuophnczsnmj/build/intermediates/audiocapture.build/debug-iphoneos/audiocapture.build/objects-normal/arm64/cdvfile.o ld: 6 duplicate symbols architecture arm64 clang: error: linker command failed exit code 1 (use -v see invocation)

you can add cordova plugins project using cocoapods. create podfile , specify in dependencies cocoapods registry, see example here: https://cocoapods.org/pods/phonegap-ios-template.

as duplicate symbol _kcdvfilesystemurlprefix get, solution on declaration of constant: kcdvfilesystemurlprefix. on file cdvfile.h find declaration of kcdvfilesystemurlprefix , declare extern:

extern nsstring* const kcdvfilesystemurlprefix; 

declaring extern tells compiler type , variable defined somewhere else.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -