[ 
https://issues.apache.org/jira/browse/CB-9825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15373954#comment-15373954
 ] 

ASF GitHub Bot commented on CB-9825:
------------------------------------

Github user juliascript commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/234#discussion_r70541767
  
    --- Diff: bin/templates/scripts/cordova/lib/podMod.js ---
    @@ -0,0 +1,162 @@
    +var fs = require('fs');
    +var util = require('util');
    +var events = require('cordova-common').events;
    +var superspawn = require('cordova-common').superspawn;
    +var CordovaError = require('cordova-common').CordovaError;
    +var opts = {};
    +/*
    +-- After pods are installed in a .xcworkspace, all existing ios code needs 
to go into the WORKSPACE file -- will need to 
    +    create a workspace file and then embed the Xcode project  
    +
    +        - Holly might have done some work on this, see the docs: 
    +          https://github.com/phonegap/phonegap-webview-ios not sure how 
applicable it can be to our case
    +*/
    +function removeProjectFromPath (pathToProjectFile) {
    +    var array = [];
    +    //remove the project from the path
    +    array = pathToProjectFile.split('/');
    +    array.pop();
    +    var path = array.join('/');
    +    return path;
    +}
    +
    +function createPodfile (projectName, pathToProjectFile) {
    +    var path = removeProjectFromPath(pathToProjectFile);
    +    var pathToPodfile = path + '/Podfile';
    +    var podfileText = util.format('platform :ios, \'8.0\'\n\ntarget \'%s\' 
do\n\n  project \'%s\'\n\n  \n\nend' , projectName, pathToProjectFile);
    +    fs.writeFileSync(pathToPodfile, podfileText);
    +}
    +
    +function editPodfileSync (Podfile, pod, isRemoval) {
    +    var podfileContents = fs.readFileSync(Podfile, 'utf8');
    +    //split by \n, add in the pod after the project line, shift the rest 
down
    +    var podfileContentsArray = podfileContents.split('\n');
    +    var linesInPodfileToKeep = [];
    +
    +    if (isRemoval) {
    +        podfileContentsArray.forEach (function (lineInPodfile) {
    --- End diff --
    
    👍 


> Support third-party package managers like Cocoapods and Nuget
> -------------------------------------------------------------
>
>                 Key: CB-9825
>                 URL: https://issues.apache.org/jira/browse/CB-9825
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: CordovaLib
>            Reporter: Shazron Abdullah
>            Assignee: Julia Geist
>              Labels: cordova-ios-5.0.x
>
> ML discussion:
> http://markmail.org/message/5qvg6rwr4nz4q7mc
> cordova-discuss proposal (to be brought back to the list when finalized):
> https://github.com/cordova/cordova-discuss/blob/master/proposals/ThirdPartyPackageManagers.md
> From Steve Gill in the ML:
> At the Cordova F2F, everyone seemed to agree that we should bring CocoaPods
> support to plugins as dependencies for iOS.
> Cordova-android currently uses Gradle as a way to enable external
> dependency resolution for plugins using the framework tag.
> A suggestion about using the engine tag to fetch cocoapods-cli (mac) &
> NuGet (windows) followed by using the framework tag was discussed.
> The minutes[1] show Carlos, Shaz and Raghav as looking into the design.
> Someone should write up a proposal on cordova-discuss[2] and create the
> issues. Post them in this thread.
> This shouldn't take priority over cordova-ios 4 issues.
> [1]
> https://docs.google.com/document/d/1MArKRmnLS052LBbhPxJF57_4ZivghOj8znWo5sTCkbU/edit?usp=sharing
> [2] https://github.com/cordova/cordova-discuss



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to