Questions tagged [xcode-build-settings]
The xcode-build-settings tag has no usage guidance.
xcode-build-settings
44
questions
163
votes
2
answers
43k
views
How can I limit a "Run Script" build phase to my release configuration?
I have a shell script that I would like to run at the end of my target's build phase. However, I would like this script to only run when I build with the release configuration. How can this be done? ...
129
votes
4
answers
88k
views
Swift: how to use PREPROCESSOR Flags (like `#if DEBUG`) to implement API keys?
In Objective-C it was sometimes useful to use static string constants to define alternate API keys (for example to differentiate between RELEASE and DEBUG keys for analytics packages, like MixPanel, ...
28
votes
2
answers
16k
views
Tl.xcodeproj The linked framework 'Pods_Tl.framework' is missing one or more architectures required by this target: armv7
I just updated to Xcode 12.0.1 from AppStore opened my old project and after build got an error.
Here is an image for error:
as I research on SO for a solution some answered mentioned changing ...
25
votes
3
answers
16k
views
Get Bundle ID from a different target
In my Xcode project, I have 4 different schemes (prod, dev, staging, staging2) which changes the bundle identifier of the app that gets installed to the phone. That way I can have all 4 versions ...
17
votes
7
answers
15k
views
'Executable path is a directory' Xcode popup error
I have an iOS Xcode project with 3 targets - AppTarget, Lib1 and Lib2.
Hierarchy:
AppTarget is dependent on Lib1 and Lib2. It has no code (SceneDelegate, AppDelegate etc. is moved to Lib1).
Lib1 is a ...
16
votes
3
answers
4k
views
How to access my app’s derived data folder itself?
I’m in the middle of moving my iOS app’s Firebase dependency from CocoaPods to Swift Package Manager.
Firebase’s Crashlytics requires a script to be executed while the app is building (using the Run ...
8
votes
1
answer
10k
views
Xcode - How to make it use different plist file for same code base, different targets
I have a code base that I need to build out to two different targets. The only difference is they read different config.plists, config-1.plist for target #1 and config-2.plist for target #2. What do ...
8
votes
2
answers
6k
views
Xcode build issue couldn't to find auto-linked framework
I've been struggling with this issue for days now :( When building my iOS app in the simulator it works fine (debug build), but as soon as I'm trying to build to my iPhone 11 (v 14.5.1) my build fails ...
6
votes
3
answers
6k
views
Xcode 14 slow incremental builds
After updating to Xcode 14.0 (happens still for 14.0.1, and 14.1) I felt massive slowdown in incremental build times even if changing just a single property. For my project it's 3x, but read about 10x ...
6
votes
0
answers
310
views
How can an app's xib/storyboard render images from an asset catalog (which is a swift package resource)?
About
Our Asset catalog was moved from the App target to swift package resource. Afterward the App's existing storyboard/xibs can no longer render those assets unless the asset catalog is copied via ...
4
votes
1
answer
774
views
Why does Apple discourage the use of '@import' in framework headers?
I have a framework target which contains a mixture of Objective-C and Swift source files.
I just upgraded my project's build settings to the settings recommended by Xcode 14.3.1.
One of the changes ...
3
votes
2
answers
3k
views
Xcode 15 Simulator Compile with x86_64
After updating to Xcode 15, I'm no long able to run my code on a simulator. Currently I'm getting the error
building for 'iOS-simulator', but linking in object file (/{project path}/libs/IceLink/...
3
votes
2
answers
5k
views
Xcode / IOS multiple apps with same code base / project
I'm trying to set-up xcode to allow me to build / publish 2 apps using the same code but with different app icons, assets and a different database.
if I have 2 apps using the same code:
app 1: fruit ...
3
votes
2
answers
6k
views
Unable to open dependencies file SwiftStdLibToolInputDependencies.dep
Im working on a iOS objc app with Siri Shortcuts. I got everything working properly but when I add an Intents Extension (to handle background support) and try to run the app I get an error.
The ...
3
votes
1
answer
2k
views
xcodebuild ACTIVE_COMPILATION_CONDITIONS does not override target's ACTIVE_COMPILATION_CONDITIONS
We are trying to use xcodebuild to build our frameworks, instead of using manual Xcode IDE running buttons. The issue is that in our framework we use ACTIVE_COMPILATION_CONDITIONS, which have several ...
3
votes
1
answer
6k
views
xcodebuild build command fails in Xcode 11.5
when build the app in xcode 11.5 generate this issue.
LOG: I hope can help me!! Regards!!
warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (...
3
votes
0
answers
1k
views
xcodebuild test on Xcode 14: Could not find test host for DoSomethingElseTests: TEST_HOST evaluates
I'm running the following command to build and test my project:
xcodebuild -sdk iphonesimulator -configuration DoSomethingElse -project DoSomethingElse.xcodeproj -scheme DoSomethingElse -destination &...
2
votes
1
answer
3k
views
Xcode SwiftUI Previews build settings
I am running a pre-build script using scheme. My script has enabled option to provide build settings from target that is being built. This script also gets executed when project is built for SwiftUI ...
2
votes
1
answer
6k
views
Cocoapods EXCLUDED_ARCHS flag not being set during build
I am trying to build my project but kept getting 'No Module Found' when deploying to the simulator but not to an actual device. After digging around, I found I should add the arm64 to the Excluded ...
2
votes
1
answer
1k
views
What is the COMPILER_INDEX_STORE_ENABLE xcode build settings default value?
There is Default, YES, NO, but what is the Default value? is YES or NO?
https://xcodebuildsettings.com/#compiler_index_store_enable
2
votes
1
answer
298
views
How does Xcode decide what preprocessor macros and other build settings to use for autocomplete?
My Xcode project has different build configurations, and they define different preprocessor macros. Autocomplete doesn't work in #ifdef blocks that are ignored by the current preprocessor flags, so I ...
2
votes
0
answers
299
views
React Native ios app is crashing with generic bu
iOS app is built on react native running successfully on emulator device or when i create build with connected device. However, getting crashed for generic build with test flight.
Here is crash report....
1
vote
1
answer
563
views
How to check type of device (device/simulator) on Run Script phase in Build Settings?
I have 2 versions of some library, one - for real device, other - for simulator.
Can I write sh script to detect on which device (device/sim) Xcode will run application and switch that libraries in ...
1
vote
1
answer
871
views
Reusing build phase for multiple targets in Xcode
Can I reuse the same build phase for multiple targets?
I have multiple targets on my project and I want to run SwiftLint for all the targets as a build phase.
Is there a way I can achieve this without ...
1
vote
1
answer
92
views
What does install option of xcodebuild do
When running xcodebuild from the command line. What does the install option do?
xcodebuild -configuration release install
For the release scheme in this example, what switches does install flip?
The ...
1
vote
0
answers
43
views
Crashlytics missing required dSYM with same UUID across app versions
I have a dSYM/crash problem in Crashlytics.
Every release i make it complains about a missing required dSYM with the same UUID.
My understanding is that every time i archive my application a new dSYM ...
1
vote
0
answers
43
views
SwiftUI/Xcode Build issue
I am not sure why this is happening. My project was building and now it is not. I am getting the following error.
Showing All Errors Only
'/Users/brandonaho/Library/Developer/Xcode/DerivedData/...
1
vote
0
answers
276
views
XCode - Adding Local swift packages in the application target using xcconfig file
I have a white-label project which has multiple app targets. All the target use the common code and their specific assets.
All the common code is divided into Core Modules and Feature Modules. All of ...
1
vote
0
answers
46
views
Xcode build settings - how to capitalize a variable
Inside xcode build settings we can define some custom value. I would define a custom LaunchScreen value based on my current scheme (flavor).
I'm looking for a way to capitalize the bundle identifier ...
1
vote
0
answers
125
views
In Xcode, how to include resources with folder structure? [duplicate]
In Xcode, I created some HTML help files and put them in a folder, like this:
But when Xcode builds the final app package, it flattens the folder structure.
ls ~/Library/Developer/Xcode/DerivedData/.....
1
vote
0
answers
268
views
How to ensure consistent xcodebuild results when the new build system is used?
We are using a homemade script that builds a couple of projects using xcodebuild and analyzes the returned number of build errors and warnings.
When the new build system was introduced in Xcode, I've ...
1
vote
0
answers
1k
views
The parent bundle has the same identifier (bundle.identifier) as sub-bundle
So I just recently added a POD to my project which then required me to use/load workspaces instead of the individual project. That's all fine and dandy but now the build script that we use to ...
1
vote
0
answers
67
views
Recursively apply -arch option to all dependencies of a Xcode project
I have a script that build a list of Xcode projects using xcodebuild command line tool. After introduction of universal builds we introduced standard arch's in our xcconfig files and build settings of ...
1
vote
1
answer
445
views
Duplicating debug configuration for multi Scheme is not working in React native-iOS
I've developed my project using react native, and now I am trying to implement multi-scheme for my dev, uat, and prod environments.
For the above, I've setup schemes and duplicated the release and ...
1
vote
0
answers
149
views
Xcode not adding newly generated plist after run script phase
I'm trying to follow this article https://peterfriese.dev/reading-api-keys-from-plist-files/ in an attempt to add a run script where a plist is generated from a sample plist that exists in the ...
1
vote
0
answers
189
views
Xcode legacy build system in the AppCode
I am working on xcode now, but I want switch to AppCode to test it's capabilities. Problem is, my project is quite old, and wont build without legacy build system turned on. I know how to switch ...
0
votes
0
answers
4
views
Module 'FirebaseRemoteConfigInterop' not found
Firebase SDK Version: Unity 12.1.0
Xcode Version: 15.4
Installation Method: CocoaPods
Firebase Product: Remote Config
Targeted Platform: iOS
Issue:
I got an error: Module 'FirebaseRemoteConfigInterop' ...
0
votes
0
answers
29
views
Do any Targets share their dependencies with their dependencies around them?
I have an Xcode project which built by using Tuist.
The main app target has following dependencies(Link binary with Libraries):
HomeModule, HomeModuleInterface, LoginModule, LoginModuleInterface, ...
0
votes
0
answers
24
views
Using the Same Argument File for Different Targets in Xcode C++
I am new to Xcode and C++.For my project, I have created two different targets that utilize the same argument files containing the data for my projects (https://i.sstatic.net/kva6G.png)
I have set the ...
0
votes
0
answers
216
views
Xcode ‘C++ and Objective-C Interoperability’ build setting not getting set
I m trying to create an xcode project with cpp-swift interoperability(introduced in xcode15) using cmake xcode generator. I m able to invoke cpp code in swift and vice-versa but when opening the ...
0
votes
0
answers
70
views
Xcode duplicate symbol '_main'
I have a bunch of .O files that I generated from a makefile.u which compiles some .C files. I put all of the .O files into my Xcode project and I receive the below error when it builds:
duplicate ...
0
votes
1
answer
805
views
xcodebuild clean deletes non-target files in BUILD_DIR - new in Xcode 12.5
I have our Xcode build system setup to place all build products in a pair of directories, one for Debug configuration and the other for Release using the build setting
BUILD_DIR = /Library/DevWork/...
0
votes
1
answer
798
views
Xcode Build build error: sh: bad interpreter: Permission denied
I've been trying to compile a Cordova project in Xcode with no success for the last 2 days.
First of all, this is a clone of another project, with just a few changes, that compiles with no issues. And ...
0
votes
0
answers
350
views
Anyone facing Xcode crash with building with Xcode 12?
Our app was building fine till Xcode 12 beta 2. But since beta 3 all the Xcode version just crashes whenever I try to build the project. Not able to build for simulator as well as devices. I saw ...