Questions tagged [xcconfig]

101 questions
4
votes
3 answers

Provide configuration file to Swift Package Manager

I'm trying to marry swiftpm and .xcconfig files. I've created Config.xcconfig file right next to my Package.swift file with two lines: LIBRARY_SEARCH_PATHS = $(inherited) $(SRCROOT)/../3rdparty/mylib/.build/ OTHER_LDFLAGS = $(inherited)…
s1ddok
  • 4,615
  • 1
  • 18
  • 31
4
votes
2 answers

Conditional user defined variables in `xcconfig` file

Using Xcode 8, running on macOS Sierra I am trying to declare a conditional variable in an xcconfig file. My project is using fastlane match, so primarily I want to use fastlane gym to archive me app, but I want to be able to perform archiving…
Sajjon
  • 8,938
  • 5
  • 60
  • 94
4
votes
2 answers

Recommended way to set up xcconfig files

Is there any best recommended way for setting up xcconfig files? Where does the projects related fields go and where do target related go? What about multiple targets?
LK.
  • 4,499
  • 8
  • 38
  • 48
4
votes
0 answers

How to use a "private" .xcconfig in a "Shared" (git-managed) Xcode project?

Often, I'll use an existing .xcconfig in some submodule, to ease the integration of some git submodule (or one of my own Xcode "sub projects") within an Xcode workspace (or project). This works great, and reduces the need to make lots of local…
Alex Gray
  • 16,007
  • 9
  • 96
  • 118
3
votes
0 answers

xcconfig multiline possible?

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…
CyberMew
  • 1,159
  • 1
  • 16
  • 33
3
votes
1 answer

How to access xcconfig variables from XCUITest code

I need to access an environment variable named ENV that is set in the xcconfig file for my main app target, but from inside my UI test target. After doing a ton of googling this is what I've tried: set the main xcconfig as the configuration for the…
rmp251
  • 5,018
  • 4
  • 34
  • 46
3
votes
1 answer

Use .xcconfg values in .plist file

We use a library that requires config values to be set in an Okta.plist file. As our app has 3 environments, we have config per environment within .xcconfig files. This allows us to set things like app icon, app name etc etc depending on the build…
Harry Blue
  • 4,202
  • 10
  • 39
  • 78
3
votes
0 answers

Modify framework build settings from containing iOS app

We develop an open source framework that can be built with various preprocessor flags to enable/disable certain features. It is crucial that these features are only compiled when they are actually needed (by the framework user) as they may have App…
hagi
  • 11,503
  • 3
  • 35
  • 48
3
votes
1 answer

Cocoapods 1.0: same pods for multiple targets

My Xcode project uses custom .xcconfig files for build settings. I have a debug.xcconfig, beta.xcconfig and release.xcconfig. They're added to each target for the same 3 build configurations: I need all my pods integrated for all targets. However,…
Telstar
  • 143
  • 8
3
votes
1 answer

Debug configuration file (.xcconfig)

Is there a way of checking whether your xcode project is using the .xcconfig configuration file with which you have supplied it? What I mean is, if there is some way of 'printing' a statement eg debugging, like #warning, #error, printf, etc...? The…
G.Rassovsky
  • 774
  • 1
  • 10
  • 23
3
votes
1 answer

xcconfig file -- set a variable value with a leading space?

Suppose I want to define the value of an environment variable BAR to be " foo", without the quotes. If my .xcconfig file has the line BAR = foo that will set it to "foo". Same goes if it has the line BAR = foo Is there a way to do what I want?
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
3
votes
1 answer

Howto define distinct xcconfig parameters in Cocoapod subspecs?

I've developed an iOS project that is a class library dealing with different servers. Only one server is needed per application in which the library is used. The server type is configurable through a preprocessor definition at compile time. In the…
DEAD10CC
  • 910
  • 1
  • 6
  • 20
3
votes
0 answers

Xcode xcconfig: Configuring a dependency based on the target

In the quest to resolve the Objective-C namespace issue I'd like to experiment with prefixing a dependency's Objective-C classes based on the target being built. As an example, suppose I have in my shared library (ObjCStaticLib) a class (CWindow). I…
fbrereto
  • 35,429
  • 19
  • 126
  • 178
3
votes
1 answer

How to distinguish between "Ad Hoc" and "App Store" Code Signing Identities in xcconfig files?

I'm trying to set up a Unity iOS project to run automated builds through Jenkins. So far, I've got Jenkins triggering a Unity build, which generates an XCode project. Then, using xcodebuild with XCode 4.5.2, I'm trying to generate an Ad-Hoc IPA…
kromenak
  • 479
  • 5
  • 13
2
votes
0 answers

Is it possible to combine two flags defined in SWIFT_ACTIVE_COMPILATION_CONDITIONS?

In our project we have two compilation conditions defined in our project's xcconfig files which we're using like so: #if FOO_VERY_LONG_NAME && BAR_VERY_LONG_NAME ... #endif For convenience, I'd like to reduce these into a single compilation…