Skip to main content

Questions tagged [xcode-build-settings]

The tag has no usage guidance.

xcode-build-settings
Filter by
Sorted by
Tagged with
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? ...
Reed Olsen's user avatar
  • 9,129
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, ...
Richard Das's user avatar
  • 5,592
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 ...
NickCoder's user avatar
  • 1,530
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 ...
djibouti33's user avatar
  • 12.1k
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 ...
NightFuryLxD's user avatar
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 ...
Yakov Manshin's user avatar
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 ...
Boon's user avatar
  • 41.2k
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 ...
Michael Falck Wedelgård's user avatar
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 ...
dziobaczy's user avatar
  • 931
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 ...
z2k's user avatar
  • 10.3k
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 ...
Adil Hussain's user avatar
  • 31.5k
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/...
Mike Walker's user avatar
  • 3,056
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 ...
Slamit's user avatar
  • 515
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 ...
Milander's user avatar
  • 1,051
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 ...
Viktor Vostrikov's user avatar
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 (...
dv.gon's user avatar
  • 159
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 &...
user2924482's user avatar
  • 8,970
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 ...
Piotr Tobolski's user avatar
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 ...
user-44651's user avatar
  • 4,104
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
Won's user avatar
  • 1,176
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 ...
tbodt's user avatar
  • 16.9k
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....
Naveen Nahata's user avatar
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 ...
zzheads's user avatar
  • 1,418
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 ...
Iiro Alhonen's user avatar
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 ...
fdcpp's user avatar
  • 1,770
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 ...
Martin's user avatar
  • 301
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/...
brandon aho's user avatar
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 ...
tarun_sharma's user avatar
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 ...
Eng's user avatar
  • 1,704
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/.....
Rob N's user avatar
  • 15.9k
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 ...
Crulex's user avatar
  • 1,049
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 ...
etinum's user avatar
  • 55
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 ...
Anil's user avatar
  • 318
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 ...
Shashank Gupta's user avatar
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 ...
anonymousSwift's user avatar
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 ...
Vlad's user avatar
  • 113
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' ...
An Trịnh's user avatar
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, ...
Halit's user avatar
  • 1
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 ...
Hilal's user avatar
  • 1
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 ...
Vipul Gupta's user avatar
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 ...
ez4nick's user avatar
  • 9,937
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/...
Tim Standing's user avatar
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 ...
Jorge Lizaso's user avatar
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 ...
Siddhesh Mahadeshwar's user avatar