Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Cordova plugin's podspec entries not added to iOS project's Podfile #4867

Closed
jake-moritz-trifecta opened this issue Jul 27, 2021 · 1 comment · Fixed by #4940
Closed

Comments

@jake-moritz-trifecta
Copy link

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.1.2
  @capacitor/core: 3.1.2
  @capacitor/android: 3.1.2
  @capacitor/ios: 3.1.2

Installed Dependencies:

  @capacitor/cli: 3.0.2
  @capacitor/core: 3.1.2
  @capacitor/android: 3.1.2
  @capacitor/ios: 3.1.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

ios

Current Behavior

Trying to run ionic capacitor update and all other commands that use update fail with the following error:

[capacitor] ✖ Updating iOS native dependencies with pod install - failed!
[capacitor] ✖ update ios - failed!
[capacitor] [error] Analyzing dependencies
[capacitor]         [!] Unable to find a specification for `SalesforceHybridSDK` depended upon by `CordovaPluginsStatic`
[capacitor]         
[capacitor]         You have either:
[capacitor]         * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[capacitor]         * mistyped the name or version.
[capacitor]         * not added the source repo that hosts the Podspec to your Podfile.

This SalesforceMobileSDK Cordova plugin defines its podspec in plugin.xml like so:

   <podspec>
         <config>
             <source url="https://cdn.cocoapods.org"/>
         </config>
         <pods use-frameworks="true">
           <pod name="SalesforceHybridSDK" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Hybrid" tag="v9.1.1" />
           <pod name="MobileSync" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS" tag="v9.1.1" />
           <pod name="SmartStore" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS" tag="v9.1.1" />
           <pod name="FMDB/SQLCipher" git="https://github.com/ccgus/fmdb" tag="2.7.5" />
           <pod name="SQLCipher/fts" git="https://github.com/sqlcipher/sqlcipher" tag="v4.4.2" />
           <pod name="SalesforceSDKCore" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS" tag="v9.1.1" />
           <pod name="SalesforceAnalytics" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS" tag="v9.1.1" />
           <pod name="SalesforceSDKCommon" git="https://github.com/forcedotcom/SalesforceMobileSDK-iOS" tag="v9.1.1" />
         </pods>
    </podspec>

I can manually add these specs to the Podfile located at /ios/App/ like so:

  pod 'SalesforceHybridSDK', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Hybrid', :tag => 'v9.1.1'
  pod 'MobileSync', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS', :tag => 'v9.1.1'
  pod 'SmartStore', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS', :tag => 'v9.1.1'
  pod 'FMDB/SQLCipher', :git => 'https://github.com/ccgus/fmdb', :tag => '2.7.5'
  pod 'SQLCipher/fts', :git => 'https://github.com/sqlcipher/sqlcipher', :tag => 'v4.4.2'. 
  pod 'SalesforceSDKCore', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS', :tag => 'v9.1.1'
  pod 'SalesforceAnalytics', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS', :tag => 'v9.1.1'
  pod 'SalesforceSDKCommon', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS', :tag => 'v9.1.1'

And if I run pod install from within the /ios/App/ after making those changes,
it completes succesfully.

Expected Behavior

I expect that the source repos defined by this plugins plugin.xml file would be added where needed so that the dependency can be resolved.

Other Technical Details

npm --version output: 6.14.13

node --version output: v14.17.1

pod --version output (iOS issues only): 1.10.1

Additional Context

I have run pod repo update and that doesn't seen to help. Is this a limitation of the Cordova plugin support with Capacitor? If so, is there a workaround? If I need to manually add to the Podfile that's fine, but the Podfile is always overwritten with the update command.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants