forcedotcom / SalesforceMobileSDK-CordovaPlugin

Cordova plugin for the Salesforce Mobile SDK
Other
47 stars 111 forks source link

SDK v 9.2 - 10.0 is not compatible with important Cordova plugins #582

Closed dLiubchenko closed 2 years ago

dLiubchenko commented 2 years ago

Hello! We are faced with a problem, when trying to update/install some Cordova plugins, after SDK update since the 9.2 version, such as: cordova-plugin-device cordova-plugin-file cordova-plugin-statusbar cordova-plugin-badge cordova-plugin-network-information Since version 9.2 - there are not compatible with SF SDK, even if you will create a clear version try to add SF SDK and one of these plugins - it will display an error in Xcode: ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

In config.xml we have such plugins in a list, so there is no problem in config.xml. Plugins files exist in the Xcode.

Steps to reproduce:

  1. create a new Cordova project
  2. add iOS platform
  3. add SalesforceMobileSDK-CordovaPlugin v10.0
  4. add cordova-plugin-device (for example)
  5. build project
  6. after the simulator launched, sign in on one of the instances

The result is:

image
dLiubchenko commented 2 years ago

I found a solution when removing libCordova.a from a target > Frameworks, Libraries, and Embedded Content in Xcode. Maybe it will help someone.

wmathurin commented 2 years ago

We recommend you use forcehybrid to create your project hybrid project with Mobile SDK. We test it with every release to make sure that app generation works. forcehybrid internally uses cordova cli to create the project and add the SalesforceMobileSDK-CordovaPlugin to it. It also removes the libCordova.a as you discovered was necessary, see here.