donaldp24 / CanvasCameraPlugin

Phonegap CanvasCameraPlugin
107 stars 119 forks source link

Can't compile on Cordova 6.1.1 #32

Open DBZFYAM opened 8 years ago

DBZFYAM commented 8 years ago

As soon as I add this plugin and try to run the project on iOS I get the error below (error 65):

The following build commands failed: CompileC build/Ricoh\ Open.build/Debug-iphoneos/Ricoh\ Open.build/Objects-normal/armv7/CanvasCamera.o Ricoh\ Open/Plugins/com.keith.cordova.plugin.canvascamera/CanvasCamera.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/sdegraaf/Sites/engagement-factory/apps/RicohOpen/platforms/ios/cordova/build-debug.xcconfig,-project,Ricoh Open.xcodeproj,ARCHS=armv7 arm64,-target,Ricoh Open,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 arm64,CONFIGURATION_BUILD_DIR=/Users/sdegraaf/Sites/engagement-factory/apps/RicohOpen/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/sdegraaf/Sites/engagement-factory/apps/RicohOpen/platforms/ios/build/sharedpch

Also tried removing and readding the platform but this doesn't work. After removing the plugin and readding the platform, all is well again. Does anyone know what causes this and how to fix it?

Thanks in advance, Regards, Stefan

JackConnor commented 8 years ago

Us Too!

AceLondon commented 8 years ago

@DBZFYAM and @JackConnor - This build failure has to due with the plugin using the once-depreciated now-removed resultJS = [pluginResult toSuccessCallbackString:command.callbackId]; or resultJS = [pluginResult toErrorCallbackString:command.callbackId]; and [self writeJavascript:resultJS];! They both need to be updated to the newer [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];

Also, on cordova-ios@4+ you will need to cast the Webview class as it also supports WKWebView:

if ([self.webView isKindOfClass:[UIWebView class]]) { [(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:jsString]; }

srnrepo commented 8 years ago

Please help me

Android platform build error!

D:\WorkSpace\Mobile Development\Ionic Projects\Ample App\ample\platforms\android \src\com\keith\canvascameraplugin\CanvasCameraView.java:134: error: package R do es not exist m_imgFlash = (ImageView) findViewById(R.id.imgFlash);

Is it a problem of resource package? How can I fix this? Looking forward to your reply asap Thanks

shrijan commented 8 years ago

Did you fix it? I am stuck with same thing

tranlong021988 commented 8 years ago

same issue with @srnrepo , anyone how to fix it ?

jasonvroom commented 8 years ago

The same issue

happybird100 commented 8 years ago

@srnrepo you need add a line in CanvasCameraView.java {PackageName}.R; example: com.xxxx.xxx.R;

Francuchin commented 8 years ago

The same issue

clarzou commented 7 years ago

@AceLondon hello, i am new to ionic and cordova, could you detail how to cast the Webview class as it also supports WKWebView ? Thank you in advance !

S0c5 commented 7 years ago

@clarzou did you solve your issue?