issues with TeamCity, xcrun and single quotes
Asked Answered
M

2

1

I'm using TeamCity with xcrun for CI on an IOS project. I'm currently seeing an issues while trying to execute the following command from a TC build step:

-sdk iphoneos PackageApplication "Build/Release-iphoneos/%Product Name%.app" -o "%system.teamcity.build.checkoutDir%/Build/archive.ipa" --sign "iPhone Distribution: AMERICA'S XXXX" --embed "%Provision File%"

The error I get is:

error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign "iPhone Distribution: AMERICA'S --resource-rules=/Library/TeamCity/buildAgent/temp/buildTmp/PotQjg91Ef/Payload/ACCU Deposit.app/ResourceRules.plist /Library/TeamCity/buildAgent/temp/buildTmp/PotQjg91Ef/Payload/ACCU Deposit.app failed with error 1. Output: "iPhone Distribution: AMERICA'S: no identity found [2013-05-16 14:58:46,533] err - [2013-05-16 14:58:46,533] out - [2013-05-16 14:58:46,540] out - Process exited with code 1

I think is pretty clear that the issue is the way xcrun handles single quotes. I tried doubling the single quote to "AMERICA''S" but that didn't work. Can someone help me out? Is there a way to escape single quotes in xcrun?

Marybelle answered 16/5, 2013 at 20:13 Comment(0)
F
0

You need to quote the sign entity iPhone Distribution: AMERICA'S XXXX to make it as only one argument for --sign, otherwise it would be divided by whitespaces and be recognized only the first part. That's what PackageApplication do to recognize command arguments.

I do not know the grammar of your command, but it seems that you should put iPhone Distribution: AMERICA'S XXXX in a variable like %Sign Entity%. Then the whole command should be like this:

-sdk iphoneos PackageApplication "Build/Release-iphoneos/%Product Name%.app" -o "%system.teamcity.build.checkoutDir%/Build/archive.ipa" --sign "%Sign Entity%" --embed "%Provision File%"

Fatback answered 5/12, 2013 at 10:31 Comment(0)
H
-1

Try "iPhone Distribution: AMERICA\'S XXXX".

Heartsick answered 16/5, 2013 at 20:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.