forcedotcom / SalesforceMobileSDK-CordovaPlugin

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

iOS: Link SalesforceHybridSDK Task is failing with undefined symbols for architecture x86_64 #615

Closed vivekweb closed 11 months ago

vivekweb commented 1 year ago

The xcode is throwing an error while archiving the build OR running in simulator. iOS platform was added successfully and using a custom script to remove libCordova.a & CordovaLib from project but build fails with "Undefined symbols for architecture x86_64" on SalesforceHybridSDK pod while trying run in simulator

image image

Environment Info

Mac 12.6 Xcode 14.2 Hybrid App (Ionic) - Cordova 11.0.0

Mobile SDK 10.20 Cordova iOS: 6.2.0

Reproducing Steps:

I have tried removing ios & plugin but no success, for reference given the pod file as well

# DO NOT MODIFY -- auto-generated by Apache Cordova source 'https://cdn.cocoapods.org' platform :ios, '14.0' use_frameworks! target 'rex' do project 'rex.xcodeproj' pod 'SalesforceHybridSDK', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Hybrid' pod 'MobileSync', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS' pod 'SmartStore', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS' pod 'FMDB/SQLCipher', :tag => '2.7.5', :git => 'https://github.com/ccgus/fmdb' pod 'SQLCipher', :tag => 'v4.5.2', :git => 'https://github.com/sqlcipher/sqlcipher' pod 'SalesforceSDKCore', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS' pod 'SalesforceAnalytics', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS' pod 'SalesforceSDKCommon', :tag => 'v10.2.0', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS' pod 'Cordova', :tag => '6.2.0', :git => 'https://github.com/apache/cordova-ios' end

PS: Agree that we are not supporting Ionic but seeking guidance on Mobile SDK pod issue

bbirman commented 1 year ago

forcehybrid has a step that patches the podfile on Xcode 14 as well, I'm wondering if you'd need the same thing: https://github.com/forcedotcom/SalesforceMobileSDK-Package/blob/63c6e15e6cbd346c7f943799d12220a7835a2022/shared/createHelper.js#L159-L176

vivekweb commented 1 year ago

@bbirman Thanks for sharing this. As I am using Cordova iOS not forcehybrid, I have tried applying the change directly in Podfile. App can be built and ran successfully in simulator.

I will look for options to make it as hook in the project OR apply as patch to Mobile SDK plugin / cordova module

wmathurin commented 11 months ago

Closing for lack of activity. Hopefully our last suggestion proved helpful.