cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11952) Should be able to pass flags to xcodebuild
Date Sat, 08 Oct 2016 00:54:20 GMT

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

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

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

    https://github.com/apache/cordova-ios/pull/265#discussion_r82490970
  
    --- Diff: bin/templates/scripts/cordova/lib/build.js ---
    @@ -199,33 +219,52 @@ module.exports.findXCodeProjectIn = findXCodeProjectIn;
      * @param  {Boolean} isDevice      Flag that specify target for package (device/emulator)
      * @return {Array}                 Array of arguments that could be passed directly to
spawn method
      */
    -function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice) {
    +function getXcodeBuildArgs(projectName, projectPath, configuration, isDevice, buildFlags)
{
         var xcodebuildArgs;
    +    var options;
    +    var buildActions = [ 'build' ];
    +    var settings;
    +    var customArgs = {};
    +    customArgs.otherFlags = [];
    +
    +    if (buildFlags) {
    +        if (typeof buildFlags === 'string' || buildFlags instanceof String) {
    +            parseBuildFlag(buildFlags, customArgs);
    +        } else { // buildFlags is an Array of strings
    +            buildFlags.forEach( function(flag) {
    +                parseBuildFlag(flag, customArgs);
    +            });
    +        }
    +    }
    +    
         if (isDevice) {
    -        xcodebuildArgs = [
    -            '-xcconfig', path.join(__dirname, '..', 'build-' + configuration.toLowerCase()
+ '.xcconfig'),
    -            '-workspace', projectName + '.xcworkspace',
    -            '-scheme', projectName,
    -            '-configuration', configuration,
    -            '-destination', 'generic/platform=iOS',
    -            '-archivePath', projectName + '.xcarchive',
    -            'archive',
    --- End diff --
    
    I think these are missing `-archivePath` and `archive`. See this PR: https://github.com/apache/cordova-ios/pull/257


> Should be able to pass flags to xcodebuild
> ------------------------------------------
>
>                 Key: CB-11952
>                 URL: https://issues.apache.org/jira/browse/CB-11952
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>            Reporter: Andrew Zellman
>            Assignee: Shazron Abdullah
>              Labels: features
>             Fix For: cordova-ios@4.4.0
>
>
> Cordova developers should be able to pass additional flags to xcodebuild when compiling
their projects. This can be done by adding a --buildFlag option in cordova-ios that allows
multiples declarations. There will need to be additional attention to conflicts that may happen
with xcodebuild arguments injected by Cordova.



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

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


Mime
View raw message