fastlane-old / gym

Building your iOS apps has never been easier
https://fastlane.tools
645 stars 54 forks source link

Gym cannot handle code signing identity with single quote in string. #200

Closed jeremybarr closed 8 years ago

jeremybarr commented 8 years ago

I have a code signing identity with a single quote in the name (example "Candy Apple's Signing Identity") If I try to declare this in my Gymfile, I get the following output in Terminal. It doesn't create a log file or anything because it doesn't get that far. I've tried escaping the single quote with \" to no avail.

[12:24:10]: ▸ sh: -c: line 0: unexpected EOF while looking for matching '' [12:24:10]: ▸ sh: -c: line 1: syntax error: unexpected end of file sh: -c: line 0: unexpected EOF while looking for matching'' sh: -c: line 1: syntax error: unexpected end of file

KrauseFx commented 8 years ago

Can you share the commend and configuration files you use to trigger gym?

jeremybarr commented 8 years ago

I think as long as you don't mind me replacing a few confidential company words, sure! I'm simply calling gym from the command line. I've copied the Gymfile below. Currently the gym file has the single quote escaped with a \. If I remove the code signing line, the build will start to run until it tries to sign and then fails.

workspace "Confidential.xcworkspace"
scheme "Confidential"
configuration "Release_Enterprise"
codesigning_identity "iPhone Distribution: Confidential\'s Sandwiches LLC"
xcargs "ONLY_ACTIVE_ARCH=NO GCC_PREPROCESSOR_DEFINITIONS=\"\$(inherited) ALLOW_SERVER_OVERRIDE\" OTHER_CODE_SIGN_FLAGS=\"--keychain confidential-qa.keychain\" ALLOW_SERVER_OVERRIDE=NO"

output_directory "./"
KrauseFx commented 8 years ago

Setting the code signing identity via the command line doesn't really work, instead you need to do so using the Xcode project, more information here: https://github.com/fastlane/match#setup-xcode-project

jeremybarr commented 8 years ago

@KrauseFx just to make sure i understand what you're saying: I'll need to use match to sign the app from the command line. otherwise there really isn't any other way to build/sign an app for an enterprise distribution (i.e. for testing in house)

KrauseFx commented 8 years ago

There is, just setting the code signing identity in your project settings works :+1: It's just not possible to select the identity via the command line

i2amsam commented 8 years ago

@jeremybarr I'm closing this per @KrauseFx's answer ^, feel free to reopen if that didn't solve the issue.

fastlanebot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/3142. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: