forcedotcom / SalesforceMobileSDK-CordovaPlugin

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

SDK 9.2 Ionic Cordova iOS build fails. Missing sampleApp/platforms/ios/CordovaLib/Cordova/Info.plist #562

Closed va1bhav closed 1 year ago

va1bhav commented 2 years ago

I am building an ionic application for a client using SDK 9.2. With New Build system in Xcode.

Scenario 1: Before adding Salesforce mobile SDK. Build works as expected with "New Build system" which is default Xcode setting. Scenario 2: After adding Salesforce mobile SDK. Build fails with "New Build system" with error received in Xcode: Build input file cannot be found: '/Users/vaibhav/Downloads/sampleApp/platforms/ios/CordovaLib/Cordova/Info.plist'

Scenario 3: After adding Salesforce mobile SDK. Build succeeds with "Legacy build system" which is deprecated.

Error

Screen Shot 2021-12-07 at 7 06 33 PM Screen Shot 2021-12-07 at 7 06 52 PM
wmathurin commented 2 years ago

The error happens in the cordova library. Cordova iOS does not seem to support the "new build system". For now, you have to use the "legacy build system".

va1bhav commented 2 years ago

@wmathurin I have verified that if I create a Ionic cordova application, I am able to build with new build system. But as soon as I add Salesforce hybird SDK, build does not work without "legacy build system". Could you please verify?

wmathurin commented 2 years ago

That's correct. NB: We don't officially support Ionic.

va1bhav commented 2 years ago

@wmathurin Thank you for your response, I built a vanilla cordova project to verify the same and the issue still persists with Salesforce SDK only. Could you please look into this if this can be fixed in next version? Thank you!

rahulom commented 1 year ago

Hi any update about this? I'm facing the same issue. Cordova Packages:

cli: 11.0.0
    common: 4.0.2
    create: 4.0.0
    lib: 11.0.0
        common: 4.0.2
        fetch: 3.0.1
        serve: 4.0.0

Project Installed Platforms:

ios: 6.2.0

Project Installed Plugins:

com.salesforce: 10.2.0
cordova-plugin-device: 2.0.2
cordova-plugin-file: 7.0.0
cordova-plugin-ionic-keyboard: 2.2.0
cordova-plugin-statusbar: 2.4.3

Environment:

OS: macOS Monterey 12.6 (21G115) (darwin 21.6.0) x64
Node: v16.17.0
npm: 8.15.0

ios Environment:

xcodebuild:

Xcode 14.0 Build version 14A309

wmathurin commented 1 year ago

Please try Mobile SDK 10.2 (released this morning) on Xcode 14. Legacy build system has been removed from Xcode 14, and we have tweaked our generation script to create an application that builds without it.

JeroenSchu commented 1 year ago

@va1bhav did it work for you? We are still facing this issue, despite Mobile SDK 10.2.

rahulom commented 1 year ago

@JeroenSchu I'm still facing this issue, After i added this plugin the xcode is throwing so many errors. If i use the default location for pre-user workspace settings it's throw me the error 'After adding Salesforce mobile SDK. Build fails with "New Build system" with error received in Xcode: Build input file cannot be found: '/Users/vaibhav/Downloads/sampleApp/platforms/ios/CordovaLib/Cordova/Info.plist' ', and if i choose the workspace relative location getting another error, CDVWebViewEngine too many errors emmited, stopping now.

wmathurin commented 1 year ago

What version of Xcode are you using ?

rahulom commented 1 year ago

Xcode 14.0 Build version 14A309 I tried to add the plugin using cordova command, after that i run the pod command -- This is failed , getting the same error again. After that i tried forcehybrid,

  1. Created the app using forcehybrid app
  2. Copy all the www folder
  3. Installed all required plugin , expect the cordova-plugin-firbasex( After installing the plugin getting an build error).
  4. I'm able to run the project and build success.
  5. But when i'm trying to archive the project getting some other issues.
wmathurin commented 1 year ago

Do you mind opening a new issue with the details of what goes wrong when you archive?

rahulom commented 1 year ago

@wmathurin any updates ., i have created a new issue already-- https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin/issues/608