You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/06/30 18:10:23 UTC

[GitHub] [cordova-ios] filipemvpereira opened a new issue #1125: Variables specified in pod options of podspec are not being replaced

filipemvpereira opened a new issue #1125:
URL: https://github.com/apache/cordova-ios/issues/1125


   # Bug Report
   
   ## Problem
   Variables defined in plugin.xml which are being used podspec -> pods -> pod are not being replaced after installation. Running a command like:
   ```
   cordova plugin add ../cordova-plugin-custom 
       --variable IOS_POD_URL="https://github.com/private_pod"  
       --variable IOS_POD_TAG="X.X.X"
   ```
   
   ### What is expected to happen?
   The variables passed should be replaced at the time of platform/plugin installation.
   
   ```
   source 'https://cdn.cocoapods.org/'
   platform :ios, '11.0'
   use_frameworks!
   target 'Test' do
   	project 'Test.xcodeproj'
   	pod 'PrivatePod', :tag => 'X.X.X', :git => 'https://github.com/private_pod'
   end
   ```
   
   ### What does actually happen?
   The variables are not getting replaced for some options of Cocoapods.
   ```
   source 'https://cdn.cocoapods.org/'
   platform :ios, '11.0'
   use_frameworks!
   target 'Test' do
   	project 'Test.xcodeproj'
   	pod 'PrivatePod', :tag => '$IOS_POD_TAG', :git => '$IOS_POD_URL'
   end
   ```
   
   ###Information
   I found a similar [issue](https://github.com/apache/cordova-ios/issues/721), but the fix was made only for the "spec" option. "tag" and "git" pod options are not being replaced
   
   ### Command or Code
   In `plugin.xml`, inside `platform name="ios"`
   ```xml
   <preference name="IOS_POD_URL" default="" />
   <preference name="IOS_POD_TAG" default="1.0.0" />
   
   <podspec>
         <config>
           <source url="https://cdn.cocoapods.org/"/>  
         </config>
         <pods use-frameworks="true">
           <pod name="PRIVATE_POD" git='$IOS_POD_URL' tag="4.3.1"/>
         </pods>
       </podspec>
   ```
   
   ### Environment, Platform
   - Environment: MacOS BigSur
   - Platform: iOS
   
   
   ### Version information
   - Cordova: 10.0.0
   - cordoav-ios: 6.2.0
   
   
   ## Checklist
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org