Questions tagged [xcode-build-settings]

38 questions
160
votes
2 answers

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? Thanks!
Reed Olsen
  • 9,099
  • 4
  • 37
  • 47
128
votes
4 answers

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, Flurry or Crashlytics): #if DEBUG static NSString…
cleverbit
  • 5,514
  • 5
  • 28
  • 38
28
votes
2 answers

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 architecture in the build setting and changing build…
NickCoder
  • 1,504
  • 2
  • 23
  • 35
25
votes
3 answers

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 installed side by side, similar to this technique. Now…
djibouti33
  • 12,102
  • 9
  • 83
  • 116
15
votes
3 answers

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 Script build phase). Back in the CocoaPods days, I…
14
votes
5 answers

'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 static library containing the AppDelegate and…
NightFuryLxD
  • 847
  • 5
  • 15
8
votes
1 answer

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 I need to do in the building to achieve this?
Boon
  • 40,656
  • 60
  • 209
  • 315
6
votes
3 answers

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 or more.
dziobaczy
  • 891
  • 9
  • 17
5
votes
0 answers

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 Copy Bundle Resources phase (which means 2 copies…
5
votes
2 answers

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 with these errors: ld: warning: Could not find…
3
votes
2 answers

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 list (display a list of fruits) app 2: Veggie…
Slamit
  • 465
  • 1
  • 6
  • 21
3
votes
1 answer

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 (in target 'B7_MOCHA' from project…
dv.gon
  • 159
  • 2
  • 11
3
votes
2 answers

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 IntentHandler of the Intent Extension only has the…
Milander
  • 1,021
  • 11
  • 18
2
votes
0 answers

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 "platform=iOS Simulator,name=iPhone 8 Plus"…
user2924482
  • 8,380
  • 23
  • 89
  • 173
2
votes
0 answers

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 symbol '_main' in: …
ez4nick
  • 9,756
  • 12
  • 37
  • 69
1
2 3