0

After the fix i found for my previous issue: phonegap-cordova-3-4-clean-build-gets-apple-mach-linker-error

So now, if I make a blank project

$ cordova create hello com.example.hello HelloWorld
$ cordova platform add ios
$ cordova build ios

Now I need to do follow these instructions previous question After that everything works fine.

BUT now I'm gonna install an plugin (doesn't matter what plugin). For now i choose the logger (org.apache.cordova.console)

$ cordova plugin add org.apache.cordova.console

Now if i build and run the app. It crashes on startup. see: screenshot

I enabled on Zombie Objects in xcode.

Even if I install previous versions of phonegap(cordova). I still need to do all these steps. Before I just create, add platform, build and run and it was done.

Nothing is working anymore, please helpe me out here. It's really annoying.

EDIT: If i comment the line console.log('Received Event: ' + id); in js/index.js the app will start, but if I call console.log it crashes.

Community
  • 1
  • 1
peterdoesco.de
  • 529
  • 3
  • 19

2 Answers2

2

objc_msgSend causes EXC_BAD_ACCESS with plugins on arm64

So i found why this happened:

I needed to replace in the fie ios/CordovaLib/Classes/CDVCommandQueue.m

objc_msgSend(obj, normalSelector, command);

in

((void (*)(id, SEL, id))objc_msgSend)(obj, normalSelector, command);

now everything works fine again.

source

peterdoesco.de
  • 529
  • 3
  • 19
0

I found something. If I build for ios. the js (console-via-logger.js) is doing the id wrong screenshot

If I change

cordova.define("org.apache.cordova.console.console", function(require, exports, module) { /*

to

cordova.define("org.apache.cordova.console", function(require, exports, module) { /*

it works.

Has this something todo with me or cordova?

cordova -v: 3.4.0-0.1.3 npm -v: 1.4.5

peterdoesco.de
  • 529
  • 3
  • 19