bthurlow / nativescript-imagecropper

A nativescript image cropping plugin.
Other
49 stars 35 forks source link

"NativeClass is not defined" error on iOS 14 and NS 7 #73

Closed mreall closed 3 years ago

mreall commented 3 years ago

If the demo apps cannot help and there is no issue for your problem, tell us about it

On iOS 14, my app compiles and loads on the emulator, but immediately crashes with the following message:

NativeScript encountered a fatal error: Uncaught ReferenceError: NativeClass is not defined
at
../node_modules/nativescript-imagecropper/imagecropper.js(file: node_modules/nativescript-imagecropper/imagecropper.ios.js:79:0)

Which platform(s) does your issue occur on?

iOS 14 emulator (iPhone 8)

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

I ran ns clean, npm i, then tns debug ios --no-hmr --env.development. When the app deploys to the iPhone emulator it loads the launch screen, then immediately crashes.

johandrott commented 3 years ago

Got the same error using ns 7 + angular 10

shiv19 commented 3 years ago

@mreall and @johandrott thanks for reporting this issue! This was due to a missing compiler step in the plugin publishing process. The new version of this plugin nativescript-imagecropper@4.0.1 will have no reference to NativeClass and you shouldn't see that error anymore.