ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push

MobileFirst 8.0 Cordova app crashes on iOS with 'cordova-plugin-mfp' and 'ibm-mfp-push'

Closed this issue · 1 comments

Hi.

I have a problem with my simple Cordova app. I did not add any code, just used CLI and Xcode for building and running this simple app. But app always crashes when starting on my iphone5.

How to recreate this issue: (tried multiple times)

  1. cordova create sampleapp
  2. cordova platform add ios
  3. cordova plugin add ibm-mfp-push
  4. cordova plugin add cordova-plugin-mfp
  5. cordova prepare

Then I open xcodeproj file to open it in Xcode and do exactly the same as described here (added deployment target in Xcode, added bridging header, added runpath and canceled option to transform to newer swift code): https://new-console.ng.bluemix.net/docs/mobile/gettingstarted/cordova.html#getting-started-cordova or here https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core

Next I selected my iPhone 5 for device and run this app. Building always succeeded, also installing on the device is fine, but when app starts it crashes always with this errors:

 objc[581]: Class PSecurityUtils is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLUtils is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLCertManager is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLAnalytics is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLDeviceAuthManager is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLConfig is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class OCLoggerWorklight is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLAFQueryStringPair is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLAFStreamingMultipartFormData is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLAFMultipartBodyStream is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class WLAFHTTPBodyPart is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class OCLogger is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class SendLogsDelegate is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class SendAnalyticsDelegate is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 objc[581]: Class UpdateConfigDelegate is implemented in both /private/var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/Frameworks/IBMMobileFirstPlatformFoundation.framework/IBMMobileFirstPlatformFoundation and /var/containers/Bundle/Application/0ECBA9C8-64EC-4AF7-920D-3F7CF3429EA3/HelloCordova.app/HelloCordova. One of the two will be used. Which one is undefined.
 2016-09-07 23:05:22.931 HelloCordova[581:662546] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/3FF7FB38-71A1-4043-B260-DF0D99E5923C/Library/Cookies/Cookies.binarycookies
 2016-09-07 23:05:23.074 HelloCordova[581:662602] +[WLConfig instance]: unrecognized selector sent to class 0x26004c
 2016-09-07 23:05:23.104 HelloCordova[581:662546] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x14687c50>.
 2016-09-07 23:05:23.104 HelloCordova[581:662602] [FATAL] [WL_INIT] -[WLImpl initWL] in WLImpl.m:174 :: Init failure: NSInvalidArgumentException, +[WLConfig instance]: unrecognized selector sent to class 0x26004c, (null). Reinstall the application and try again.
 2016-09-07 23:05:23.121 HelloCordova[581:662602] +[WLUtils getLocalizedString:]: unrecognized selector sent to class 0x25fea8
 2016-09-07 23:05:23.134 HelloCordova[581:662602] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[WLUtils getLocalizedString:]: unrecognized selector sent to class 0x25fea8'
 *** First throw call stack:
 (0x22665b0b 0x21e22dff 0x2266b371 0x226690ab 0x22593298 0x131763 0x22e9264d 0x22398c7f 0x22398bf3 0x22396a08)
 libc++abi.dylib: terminating with uncaught exception of type NSException
 (lldb) 

My environment:

  • Mac OS X El Capitan 10.11.5
  • Node: 4.4.7
  • Npm: 2.15.8
  • Cordova CLI: 6.3.1 (platform cordova-ios@4.2.1)
  • MFPdev cli: 8.0.0-2016080322

Is this a bug?? Does anyone have a solution to this problem? On Android everything works great and as expected.

Fixed..
Use the bms-push plugin instead of ibm-mfp-push