You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/21 14:31:35 UTC

[GitHub] [cordova-ios] sagrawal31 opened a new issue #721: Variable specified in podspec pods are not getting replaced

sagrawal31 opened a new issue #721: Variable specified in podspec pods are not getting replaced
URL: https://github.com/apache/cordova-ios/issues/721
 
 
   # Bug Report
   
   (Apologies if I had created this issue here instead of `cordova-cli` or `cordova-ios`)
   
   ## Problem
   
   Variables defined in `plugin.xml` which are being used `podspec` -> `pods` -> `pod` are not being replaced after installation. Running a command like:
   
   ```bash
   cordova plugin add ../cordova-plugin-firebase-dynamiclinks \
       --variable IOS_FIREBASE_CORE_VERSION="5.20.2" \
       --variable IOS_FIREBASE_DYNAMIC_LINKS_VERSION="5.20.2" \
       --variable APP_DOMAIN="example.com" \
       --variable PAGE_LINK_DOMAIN="example.page.link"
   ```
   
   ### What is expected to happen?
   
   The variables passed should be replaced at the time of platform/plugin installation.
   
   ```
   source 'https://github.com/CocoaPods/Specs.git'
   platform :ios, '9.0'
   
   target 'HelloCordova' do
   	project 'HelloCordova.xcodeproj'
   	pod 'Firebase/Core', '5.20.2'
   	pod 'Firebase/DynamicLinks', '5.20.2'
   end
   ```
   
   ### What does actually happen?
   
   The variables are not getting replaced for Cocoapods.
   
   ```
   source 'https://github.com/CocoaPods/Specs.git'
   platform :ios, '9.0'
   
   target 'HelloCordova' do
   	project 'HelloCordova.xcodeproj'
   	pod 'Firebase/Core', '$IOS_FIREBASE_CORE_VERSION'
   	pod 'Firebase/DynamicLinks', '$IOS_FIREBASE_DYNAMIC_LINKS_VERSION'
   end
   ```
   
   ## Information
   
   A pull request reproducing this problem: https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks/pull/42/files#diff-53f390d375398624afe1cfe1125f42bfR106
   
   ### Command or Code
   
   In `plugin.xml`, inside `<platform name="ios">`:
   
   ```xml
   <preference name="IOS_FIREBASE_CORE_VERSION" default="~> 6.3.0"/>
   <preference name="IOS_FIREBASE_DYNAMIC_LINKS_VERSION" default="~> 6.3.0"/>
   
   <podspec>
       <config>
           <source url="https://github.com/CocoaPods/Specs.git"/>
       </config>
       <pods>
           <pod name="Firebase/Core" spec="$IOS_FIREBASE_CORE_VERSION"/>
           <pod name="Firebase/DynamicLinks" spec="$IOS_FIREBASE_DYNAMIC_LINKS_VERSION"/>
       </pods>
   </podspec>
   ```
   
   ### Environment, Platform, Device
   
   - **Environment:** MacOS Mojave
   - **Platform:** iOS
   - **Deivce:** Does not matter
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   - **Cordova**: 9.0.0 (cordova-lib@9.0.1)
   - **cordoav-ios**: 5.0.1
   
   ## Checklist
   
   - [x] I searched for existing GitHub issues in (`cordoav-cli`, `cordova-lib`, `cordova-ios` & `cordova-common`
    - [x] Tried to look up the existing code where this replacement is working for Android
   - [x] I updated all Cordova tooling to most recent version
   - [x] 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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