What is $(inherited) in Xcode's search path settings?
I'm looking for a documentation, too. But I made the experience, that $(inherited)
can be used to inherit build settings from the project level to the target level. When you define library or header search paths at the project level you can use $(inherited)
in the target build settings to use these search paths in the search paths of the project targets.
Framework Search Paths - Mixing $(inherited) with $(PROJECT_DIR)
The problem was that the CocoaPods Frameworks that I was trying to add were built only for iOS 11+, but my very old project had a deployment target of iOS 8.4.
Looking at error details in the Report Navigator as @paul-beusterien suggested was critical. I found this:
Ld /Users/dyoung/Library/Developer/Xcode/DerivedData/MyApp-acdmyjbbrpbhlkfiyypetovwacrz/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/Binary/MyApp normal armv7 (in target 'MyApp' from project 'MyApp')
The key thing there is the armv7 architecture. This architecture is only part of the build process if you have a deployment target of 10.x or earlier but not if you have 11.x or later. And if the frameworks you are including don't have armv7 architecture (e.g. if they are built for 11.0+), XCode gives very misleading error messages about the frameworks not being found. What really isn't found is that specific architecture inside the framework.
Bottom line: My problem had nothing to do with framework search paths. Removing $(PROJECT_DIR) from the framework search path only appeared to solve the problem by triggering a different compile-time problem to happen before it got to the linker problem.
The solution in this case is that I must change my deployment target to 11.0, then everything builds properly.
CocoaPods update target overrides the `FRAMEWORK_SEARCH_PATHS`
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'xxx' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Crash'
pod 'Firebase/RemoteConfig'
# Pods for xxx
target 'xxxTests' do
inherit! :search_paths
# Pods for testing
end
end
How to fix The target [...] is declared multiple times after pod install?
The issue was that the "Target" was literally declared twice in the Podfile. so simple and right in front of your face potentially. I Just didn't think anything of it because it was a completely generated file except the one line I added.
Related Topics
How to Cast an Nsmutablearray to a Swift Array of a Specific Type
Ios: Determine If Device Language Is Right to Left (Rtl)
iOS Playground Doesn't Show UI Preview
Firebase Dynamic Link Not Opening the App iOS
How to Cache Videos? iOS - Swift
How to Set an Title of the Currently Playing Audio in iPhone Lock Screen
Nsstring Containsstring Crashes
Repeating Local Notifications for Specific Days of Week (Swift 3 iOS 10)
How to Cache Resources Loaded in an iPhone Uiwebview
Cannot Create Outlet Connections to Subviews in Interface Builder (Xcode 5)
Request Permissions Again After User Denies Location Services
How to Get Indexpath in Prepareforsegue
Black Screen After Presenting Modal View Controller in Current Context from Uitabbarcontroller
Why Does Uicollectionview Log an Error When the Cells Are Fullscreen