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 2018/08/28 16:09:49 UTC

[GitHub] erisu opened a new pull request #398: WIP - Removal of xcconfig build flag

erisu opened a new pull request #398: WIP - Removal of xcconfig build flag
URL: https://github.com/apache/cordova-ios/pull/398
 
 
   ### Platforms affected
   ios
   
   ### What does this PR do?
   - Remove xcconfig build flag for device and emulator.
   - Remove custom argument override for xcconfig.
   - Updated build test spec with removal of xcconfig with cleanup.
   
   Since Cordova projects are using `xcworkspace` and the `content.xcworkspacedata` file declares our projects `xcodeproj`, the `xcconfig` file paths are declared in the `pbxproj`.
   
   *contents.xcworkspacedata*
   ```
   <FileRef location = "group:HelloCordova.xcodeproj"></FileRef>
   ```
   
   Once a Pod project is added to the application, for example `cordova-plugin-firebase-messaging`,  the `contents.xcworkspacedata` file is updated to reflect the Pod project.
   
   ```
   <FileRef location = "group:HelloCordova.xcodeproj"></FileRef>
   <FileRef location = "group:Pods/Pods.xcodeproj"></FileRef>
   ```
   
   If the xcconfig flag was set, in this scenario, pathing issues are introduced. For example header files will not be found and can not load. The xcconfig flag is applied to the entire workspace and will affect also the pod project’s xcconfig files.
   
   *Example*
   * In our application, the `SRCROOT` varaible is declared as `platforms/ios`.
   * With the current implmetation (xcconfig flag deifned) the `SRCROOT` variable will be declared as `platforms/ios/Pods` for pod project.
   
   In this case, in regards to the last item, the `PODS_ROOT = ${SRCROOT}/Pods` in `Pods-HelloCordova.debug.xcconfig` will be defined as `platforms/ios/Pods/Pods` which is incorrect.
   
   ```
   $ cordova create podtest com.foobar.podtest
   $ cd podtest
   $ cordova platform add ios@4.5.4
   $ cordova plugin add cordova-plugin-firebase-messaging
   $ cordova prepare ios
   $ cordova compile ios
   ```
   
   You will noticed incorrect paths for example: `/cordova/podtest/platforms/ios/Pods/Pods/Headers/FirebaseCore -`
   
   By removing the flag, the `SRCROOT` will not be affected for the pods project so that when `Pods-HelloCordova.debug.xcconfig` declares `PODS_ROOT`, the path will then be correct `platforms/ios/Pods`.
   
   ### What testing has been done on this change?
   WIP
   - [] `npm test` locally
   - [] `cordova build ios`
   - [] `cordova run ios`
   - [] `cordova prepare ios`
   - [] `cordova compile ios`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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