Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9505] iOS: New feature to add ability to choose keychain at codesign

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-03T13:48:50.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-14 Core, Release 2.1.1, Release 3.0.0
ComponentsiOS
LabelsSupportTeam, core
ReporterVarun Joshi
AssigneeNeeraj Gupta
Created2012-06-12T14:29:05.000+0000
Updated2012-08-03T13:48:50.000+0000

Description

Currently, even when we set the default keychain to the separate keychain in OS X, codesign will still look at not only the separate keychain but also the default login keychain. The codesign man pages say that we are allowed to pass an argument with the keychain that we would like to use and codesign will only look at that keychain. It has been requested to add a new feature to have the ability to select the desired keychain from command line through builder.py.

Comments

  1. Stephen Tramer 2012-07-09

    TESTING

    ----

    Create a new Keychain in "Keychain Access" and name it "test". Any password is OK.

    Copy your existing 'iPhone Developer' and 'iPhone Distribution' certificates and then Paste (DO NOT DRAG) them into the new keychain. Dragging moves them to the new keychain - pasting puts a reference in it.

    *Make sure* that the keychain is "locked" by clicking the lock button in the upper-left if necessary.

    Create a new app in TiStudio which you have both developer and distribution/packaging credentials for.

    In order to get the correct command-line invokes for your created app, you will want to do the following in Studio:

    Go to Preferences -> Titanium Studio -> Troubleshooting

    Select debug level "All"

    Click "Debug specific components"

    Uncheck all components EXCEPT for com.aptana.core/debug/shell

    Apply changes

    WITHOUT SPECIFIED KEYCHAIN:

    Build for device in TiStudio

    Build for distribution in TiStudio

    PASS: App builds WITH SPECIFIED KEYCHAIN: To do this, for now you will need to run the builder.py manually from the command line. Studio does not support keychain selection yet; this is a separate feature request that will be filed with them and then linked from this ticket. In order to get the correct invoke line, you will need to have enabled Studio's shell logging, but the ticket includes templates. You can get you invoke line by:

    In Studio, go to Help -> Titanium Studio -> View Log File

    Find a builder.py invoke for the project (either "install" or "distribute" command). If you performed the last test just before this one, they should be at the bottom of the file.

    Now you will want to get your keychain file. In the terminal, run
       security list-keychains
       
    And copy the path to your keychain file that you just created. From the console, you will want to run an invoke similar to the following:
       "/usr/bin/python" "/Users/stiv/Library/Application Support/Titanium/mobilesdk/osx/2.1.0/iphone/builder.py" "install" "5.1" "/Users/stiv/Documents/Titanium Studio Workspace/temp" "com.appcelerator.temp" "temp" "C4D93DB0-3102-4CB1-972A-3DBAC291D341" "Stephen Tramer (E434A5798Q)" "universal" "/Users/stiv/temp.keychain"
       
    If the correct keychain is being used, you should be presented with a dialog box to unlock the "temp" keychain which you created. You will also want to run the "distribute" command in addition to "install", which *does* take different arguments. Check the studio logs again to get the correct invoke.
  2. Sabil Rahim 2012-07-16

    [PR 2575](https://github.com/appcelerator/titanium_mobile/pull/2575) merged in for 2_1_X branch
  3. Thomas Huelbert 2012-07-31

    Varun to close - email sent
  4. Varun Joshi 2012-07-31

    Closing this issue
  5. Nam Le 2012-08-01

    Should this work with the "adhoc" command as well?
  6. Sabil Rahim 2012-08-02

    Yes it should work for adhoc command as well.
  7. Nam Le 2012-08-03

    Yes you're correct Sabil
  8. Nam Le 2012-08-03

    Reopen to edit spelling error

JSON Source