pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.12k stars 448 forks source link

Add script step to choose a specific code signing identity for iOS #31

Closed rspeyer closed 9 years ago

rspeyer commented 9 years ago

This step allows a workaround when the following error arises while building WebRTC for iOS: AssertionError: Multiple codesigning fingerprints for identity: iPhone Developer

The method allows a user running the script to dynamically select from the list of valid identities and the result is inserted into common.gypi

thebehera commented 9 years ago

will this prompt the user if they only have 1 codesigning fingerprints on the system?

rspeyer commented 9 years ago

@thebehera at present it will always prompt the user, but only the first time they run in a given terminal session - after that we store the value of $IDENTITY in the environment

thebehera commented 9 years ago

Thank you for your contribution. Can we modify it so that it will only prompt the user if they have multiple codesigning fingerprints? That way the scripts can stay headless

rspeyer commented 9 years ago

Sure - I will be a little busy over the next few days but will post back here when the change is complete.

thebehera commented 9 years ago

ok thanks a bunch! -- much appreciated

rspeyer commented 9 years ago

@thebehera updated with requested changes

thebehera commented 9 years ago

thank you again for your continuous contributions!

thebehera commented 9 years ago

I'm having a bit of trouble with the function.

OSX 10.9.5 - Once I get to the point "Please select your code signing identity index from the above list:" and select any index, it will spit out the error : awk: illegal primary in regular expression ) |" at |" input record number 1, file source line number 1 Using code signing identity

and on OSX10.10 I simply hit an error when running choose_code_signing awk: illegal primary in regular expression ) |" at |" input record number 1, file source line number 1 Using code signing identity

@rspeyer Any idea if im missing anything?

rspeyer commented 9 years ago

Hmmm @thebehera I am running OSX Mavericks and everything seems to be working. Could you tell me what version of awk you have by running awk --version? I have 4.4.1, API: 1.1?

Also, if you are willing could you paste the terminal output as well as input so I can see if there is anything odd?

thebehera commented 9 years ago

Mac OSX 10.9.5

Rahuls-MacBook-Pro:ios rbehera$ awk --version
awk version 20070501
Rahuls-MacBook-Pro:ios rbehera$ choose_code_signing 
  1) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Developer: Rahul Behera (XXXXXXXXXX)"
  2) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Pristine, Inc" (CSSMERR_TP_CERT_REVOKED)
  3) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Pristine, Inc"
  4) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Developer: Rahul Behera (XXXXXXXXXX)"
  5) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Pristine, Inc"
  6) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Pristine, Inc (XXXXXXXXXX)"
  7) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Developer: Rahul Behera (XXXXXXXXXX)"
     7 valid identities found
Please select your code signing identity index from the above list:
1
awk: illegal primary in regular expression ) |" at  |"
 input record number 1, file 
 source line number 1
Using code signing identity

Mac OSX 10.10

macmini:ios botthebuilder$ awk --version
awk version 20070501
macmini:ios botthebuilder$ echo $IDENTITY

macmini:ios botthebuilder$ choose_code_signing 
awk: illegal primary in regular expression ) |" at  |"
 input record number 1, file 
 source line number 1
Using code signing identity
macmini:ios botthebuilder$ 

@rspeyer It seems that our default mac machines do not have the latest awk

rspeyer commented 9 years ago

@thebehera yes that seems old - you can use Homebew to install a newer version in all likelihood, but if you want a better workaround I would be happy to discuss it.