Xcode 9 fails to build Swift 4 project with pod
I found out what's wrong! Xcode continued using the .xcodeproj
file to open my project when selecting it on the welcome screen, but Cocoapods
requires the .xcworkspace
file to be used! There's a visual distinction between both entries on Xcode's Welcome screen afterwards: difference between Xcode workspace and project on Welcome screen.
Opening the workspace shows two projects in Xcode's Project Navigator
: one for my app and a second one named Pods
, which embodies all installed pods. Building the app no longer shows weird build errors.
How to build a xcode 9 project with Swift 4.0 using Pods in Swift 3?
Finally I got it to work: All I had to do was to put this script in the end of Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
Build time error swift 4 xCode 9 with Alamofire added in pod
After spending good amount of time on the surfing, I come to know that the issue is related to the configurations, mostly hardware configurations of a MAC I was using.
Once I have tried running the same code on another mac it works perfectly.
This could not be the solution for all which I know but I have shared my scenario because if someone stuck in such an issue and even after spending a good amount of time like me, don't get any solution I suggest please check running the code in another MAC.
I have to spend a really good amount of time on the issue, which I wish other must not.
I hope you don't have the issue but might got help from this So please don't lead the answer in any negative direction if this will not be your answer.
Getting error No such module using Xcode, but the framework is there
I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT)
and set it to recursive.
Module MapboxGeocoder not found Xcode 9 Swift 4
I guess your framework header search path is missing this path. Try adding $(inherited) $(PROJECT_DIR) $(PROJECT_DIR)/YourProjectFramework
folder in Framework search path
Hope this helps you!
Related Topics
Global Var VS Shared Instance Swift
Accessing Global Variable in Swift
Referencing Self in Super.Init
How to Compare Range<String.Index> and Defaultbidirectionalindices<String.Characterview>
Swift Firebase Check If User Exists
Swift Firebase Storage How to Retrieve Image with Unknow Name(Nsuuid)
How to Convert Unmanaged<Cfdata> to Nsdata
Enum Not Working in Custom Initializer
Trouble with Non-Escaping Closures in Swift 3
Swift Programmatically Create Function for Button with a Closure
How to Stop a Dispatchqueue in Swift
Images Inaccessible from Asset Catalog in a Swiftui Framework
Arkit - Collision with Real World Objects
How to Move Platform with Velocity
Swift Firestore Search for Users