3

I need to store a public key in a variable in my xcconfig file. As public keys are multiline, the project can't build if I just dump it in a variable in xcconfig.

I believe I can add it right in the Xcode's Build Settings tab but not sure how to do it via xcconfig.

How can I achieve this without creating multiple .plist or editing the Building Settings just for this purpose, and make it more dynamic? Feels like I am missing something.

CyberMew
  • 1,159
  • 1
  • 16
  • 33
  • I did it in the Build Settings manually, pasting the public key, and saw that it become a single line while committing the file, which means that we can copy that string and paste it right into the .xcconfig as a single line. I have not tried this yet, if someone did and verified that it worked, please post it as an answer. – CyberMew Aug 15 '20 at 22:04
  • Update: looks like it didn't work, `\n` in xconfig is escaped to `\\n`. Apparently we can do some kind of manual workaround via https://stackoverflow.com/questions/21317844/how-do-i-configure-full-urls-in-xcconfig-files – CyberMew Nov 10 '20 at 18:33

0 Answers0