xcconfig

Can you set architecture specific Build Settings in an .xcconfig file in Xcode 4.3?

▼魔方 西西 提交于 2020-01-31 12:32:20
问题 I want to set Build Settings that are specific to each architecture (armv6 vs armv7). This is easy enough to do in the Xcode GUI, but I try to put all project configuration in .xcconfig files. Is it possible to replicate the following configuration (Thumb enabled for armv7, but not armv6 architectures) using .xcconfig files? 回答1: Yes, you can do that. SETTING_NAME[arch=arch_name] = some_value It's hard to find documentation on this. Apparently it was in the Xcode 3.0 release notes, but good

XCode doesn't recognize environment variables

核能气质少年 提交于 2020-01-01 15:34:06
问题 I use the following script to run XCode (7.0.1 7A1001) on OSX Yosemite 10.10.5: export FOO=bar #this should not be necessary, but just in case launchctl setenv FOO bar #should make it visible to all GUI applications (=XCode) open -a xcode I then open a workspace with two projects: App1 and App2 . In both projects I put $(HOME)/$(FOO) in the Header Search Paths field. In App1 it is resolved to /Users/ohads/bar as expected. In App2 it is resolved to /Users/ohads/ - note how the HOME variable is

XCConfig not refreshing until Xcode is restarted

有些话、适合烂在心里 提交于 2019-12-21 09:13:32
问题 I want to have a single target and several compilation schemes, and have some compiler definitions declared by a pre-action script of the schemes. The pre-action script is generating a comp.xcconfig file which is #included by [Release|Debug]Config.xcconfig. My generated comp.xcconfig holds this line: GCC_PREPROCESSOR_DEFINITIONS = $(inherited) MY_TEST My app include these lines: #ifdef MY_TEST #error ye #else #error oy #endif Compiling with the above configuration is resulting with error 'ye'

iphone: get User Defined variable in Target's setting by code?

寵の児 提交于 2019-12-20 09:11:39
问题 My project have multi-targets. Each target has its own Class file for setting stuff. I want to store that Class name in a target setting ( Info.plist or Target's Building setting). So that I can define which class I need to use in each target based on this setting. According to this question, I put "a target-specific User Defined variable" in each Target's Building Setting. But don't know how to get it back in my code? 回答1: As the Info.plist file is preprocessed too, you can use this approach

Xcode xcconfig: Configuring a dependency based on the target

て烟熏妆下的殇ゞ 提交于 2019-12-08 02:18:17
问题 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 have two plugins ( A and B ) that will use this CWindow . To avoid A 's CWindow from colliding with B 's CWindow , I want to prefix the CWindow class name at compile time, so A 's CWindow becomes ACWindow and B 's becomes BCWindow . I'm

Xcode Build Configurations in Workspace With Multiple Projects

江枫思渺然 提交于 2019-12-07 09:33:52
问题 Using Xcode 7.2 (7C68), OS X 10.11.2 (15C50) tl;dr With multiple projects in same Xcode workspace, why do my user-defined build settings for a build configuration seem to not work? I set them correctly in the scheme, but when run on simulator the values are correct; when run on device, the values are wrong. Hello. I am trying to leverage Xcode build configurations (.xcconfig files) to customize the behavior of our app based upon the environment. This is so that we can switch between

xcconfig: Different preprocessor macros for Debug/Release

≯℡__Kan透↙ 提交于 2019-12-07 08:39:02
问题 I have created and applied a simple .xcconfig file containing GCC_PREPROCESSOR_DEFINITIONS[config=Debug] = FOODEBUG GCC_PREPROCESSOR_DEFINITIONS[config=Release] = FOORELEASE and main.cpp containing #include <iostream> // This warning IS shown #if DEBUG #warning DEBUG is set to 1 #endif // This warning IS NOT shown #ifdef FOODEBUG #warning FOODEBUG is set #endif // This warning IS NOT shown #ifdef FOORELEASE #warning FOORELEASE is set #endif int main(int argc, const char * argv[]) { // insert

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

不想你离开。 提交于 2019-12-06 06:23:04
问题 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 configuration changes to a project which might exist happily on it's own , or which I want to push contributions, upstream to (changes which are unrelated, and indeed wholly separate to settings introduced from the .xcconfig ). However, even without

Xcode Build Configurations in Workspace With Multiple Projects

让人想犯罪 __ 提交于 2019-12-05 15:40:01
Using Xcode 7.2 (7C68), OS X 10.11.2 (15C50) tl;dr With multiple projects in same Xcode workspace, why do my user-defined build settings for a build configuration seem to not work? I set them correctly in the scheme, but when run on simulator the values are correct; when run on device, the values are wrong. Hello. I am trying to leverage Xcode build configurations (.xcconfig files) to customize the behavior of our app based upon the environment. This is so that we can switch between integration and production URLs with automatically based upon the scheme's build configuration. However, I am

xcconfig: Different preprocessor macros for Debug/Release

霸气de小男生 提交于 2019-12-05 13:46:41
I have created and applied a simple .xcconfig file containing GCC_PREPROCESSOR_DEFINITIONS[config=Debug] = FOODEBUG GCC_PREPROCESSOR_DEFINITIONS[config=Release] = FOORELEASE and main.cpp containing #include <iostream> // This warning IS shown #if DEBUG #warning DEBUG is set to 1 #endif // This warning IS NOT shown #ifdef FOODEBUG #warning FOODEBUG is set #endif // This warning IS NOT shown #ifdef FOORELEASE #warning FOORELEASE is set #endif int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; return 0; } Now I'm wondering why in main.cpp, neither