You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/08/10 01:05:18 UTC

[jira] [Created] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Shazron Abdullah created CB-1223:
------------------------------------

             Summary: CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
                 Key: CB-1223
                 URL: https://issues.apache.org/jira/browse/CB-1223
             Project: Apache Cordova
          Issue Type: Task
          Components: iOS
    Affects Versions: Master
            Reporter: Shazron Abdullah
            Assignee: Shazron Abdullah
             Fix For: 2.1.0


Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig

This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433464#comment-13433464 ] 

Shazron Abdullah edited comment on CB-1223 at 8/14/12 7:00 AM:
---------------------------------------------------------------

Update to workaround - turns out that setting is the key to getting xcodebuild to recognize the CORDOVALIB environment variable, for "Source Trees":
{code}
defaults write com.apple.dt.Xcode IDESourceTreeDisplayNames -dict-add CORDOVALIB ""
{code}

then you would do in your shell:
{code}
CORDOVALIB=/path/to/your/cordovalib xcodebuild [PROJECTNAME].xcodeproj
{code}
                
      was (Author: shazron):
    Update to workaround - turns out this setting is the key to getting xcodebuild's -xcconfig parameter to work, for "Source Trees":
{code}
defaults write com.apple.dt.Xcode IDESourceTreeDisplayNames -dict-add CORDOVALIB ""
{code}
                  
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433443#comment-13433443 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

This below does not work, but adding here as part of the research.

You can pass in an -xcconfig parameter to xcodebuild. So you would think you can set the CORDOVALIB variable in a temp file that has this, but no.

You can test this out by running:
{code}
xcodebuild -xcconfig [TEMP_CONFIG_FILE] -list [PROJECT_NAME].xcodeproj
{code}

It will not list the CordovaLib target, which is needed. It seems that xcodebuild loads up the Source Trees settings from ~/Library/Preferences/com.apple.dt.Xcode.plist and linked project .xcconfigs ONLY and ignores any command line settings after (Xcode bug? I wouldn't be surprised). The previous comment above is the only known workaround for now.
                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Jacob Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461258#comment-13461258 ] 

Jacob Weber commented on CB-1223:
---------------------------------

What is the fix here? The update_cordova_subproject command sets the path to CordovaLib to a relative path, so it's still not reading from a CORDOVALIB variable.
                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432330#comment-13432330 ] 

Shazron Abdullah edited comment on CB-1223 at 8/10/12 12:09 AM:
----------------------------------------------------------------

The only workaround is to set the CORDOVALIB variable in CordovaBuildSettings.xcconfig:
{code}
    CORDOVALIB = $(CORDOVALIB)
{code}

                
      was (Author: shazron):
    The only workaround is to set the CORDOVALIB variable in CordovaBuildSettings.xcconfig:
    CORDOVALIB = $(CORDOVALIB)


                  
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432339#comment-13432339 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

For the workaround - as part of the build process, you should:

1. Open the [PROJECT_NAME]/[PROJECT_NAME]/CordovaBuildSettings.xcconfig file
2. Append the new CORDOVALIB value, eg
   {code}
   CORDOVALIB = /path/to/my/cordovalib_folder
   {code}

The last value in the file overrides previous definitions.
                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472791#comment-13472791 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

The fix was in my comment for <= 2.0, but with 2.1 this is obsolete.
                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433460#comment-13433460 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

Another gotcha for the workaround: this setting MUST be set in the ~/Library/Preferences/com.apple.dt.Xcode.plist even though it is empty, or else the .xcconfig override will NOT work:

{code}
defaults write com.apple.dt.Xcode IDESourceTreeDisplayNames -dict-add CORDOVALIB ""
{code}

                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah resolved CB-1223.
----------------------------------

    Resolution: Fixed
    
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432328#comment-13432328 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

My experiments show that it is not possible since if you look in the .pbxproj file, the CordovaLib.xcodeproj is explicitly linked to a sourceTree location:
{code}
01BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib.xcodeproj; sourceTree = CORDOVALIB; };
{code}

.. thus it will always look in the sourceTree for the location. 

You would think you can set an absolute path, with the $(CORDOVALIB) env variable set:
{code}
303A516315D485BD00720ACB /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "$(CORDOVALIB)/CordovaLib.xcodeproj"; sourceTree = "<absolute>"; };
{code}

... but Xcode's project parser does not expand the definition, so the build does not work.


                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433464#comment-13433464 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

Update to workaround - turns out this setting is the key to getting xcodebuild's -xcconfig parameter to work, for "Source Trees":
{code}
defaults write com.apple.dt.Xcode IDESourceTreeDisplayNames -dict-add CORDOVALIB ""
{code}
                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1223) CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432330#comment-13432330 ] 

Shazron Abdullah commented on CB-1223:
--------------------------------------

The only workaround is to set the CORDOVALIB variable in CordovaBuildSettings.xcconfig:
    CORDOVALIB = $(CORDOVALIB)


                
> CORDOVALIB Xcode variable - allow this to be read in from xcodebuild cli
> ------------------------------------------------------------------------
>
>                 Key: CB-1223
>                 URL: https://issues.apache.org/jira/browse/CB-1223
>             Project: Apache Cordova
>          Issue Type: Task
>          Components: iOS
>    Affects Versions: Master
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>
>
> Currently if you pass in a CORDOVALIB variable to xcodebuild it is ignored, it still tries to read from the Xcode preferences plist com.apple.dt.Xcode and/or the .xcconfig
> This is important for environments (CI) that have multiple versions of Cordova installed and switch between them through the command-line

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira