Command CompileSwift failed with a nonzero exit code in Xcode 10
Currently my build is working.
Here you are the steps I tried until it finally worked:
- Search in the whole project the word CommonCrypto.
- If you have a Pod containing that header import, remove this Pod from the Podfile and perform a pod install.
- Clean and build the project.
- Add again the Pod to the Podfile and perform a pod install.
- Clean and build the project again using a real device if possible.
And If you don't have that Pod, maybe you can try by making the same steps with some old Pod that you may encounter in your project.
Added information: also If you have some code error inside a Pod, first you need to solve that code problem and then try to compile again the project.
I'm going to copy the changes made in my project.pbxproj. I know it's not very helpful but it's the only thing that have changed in the git difference commit:
Removed: BDC9821B1E9BD1B600ADE0EF /* (null) in Sources */ = {isa = PBXBuildFile; };
Added: BDC9821B1E9BD1B600ADE0EF /* BuildFile in Sources */ = {isa = PBXBuildFile; };
I hope this can help,
Regards.
Font extension causes Swift live preview to crash (Xcode 12.3)
The problem is that Font
already has a static property called caption
. See its documentation. You should not be able to add a property with the same name and type, that piece of code should not compile at all.
You need to rename your property to resolve the ambiguity.
The same applies to title
and largeTitle
, you shouldn't recreate properties that already exist on Font
, you should rename all of them.
Unrelated to your question, but no need to add those properties as computed properties, they can be immutable stored properties.
extension Font {
// H1
static let robotoLargeTitle = Font.custom("Roboto-Bold", size: 34)
// H2
static let robotoTitle = Font.custom("Roboto-Bold", size: 24)
// Body 2 (input title)
static let robotoCaption = Font.custom("Roboto-Regular", size: 14)
}
Use of undeclared type in Swift, even though type is internal, and exists in same module
Phew, finally diagnosed this. Somehow, the offending Swift file EditTaskPopoverController.swift
was in two different build phases.
It was in Compile Sources
properly, with all the other Swift files, but it was also, for some very strange reason, in the Copy Bundle Resources
phase as well, along with all my XIB and image resources.
I have no idea how it got there, but removing it from the extra build phase resolved the issue.
image not found Error while using Custom FrameWork
Set framework installation directory to @executable_path/../Frameworks
Now add copy files in your build phase, set destination to Frameworks
. click on your target, then on Editor (menu bar) --> Add build phase --> Add Copy Files Build Phase
Framework not found' in Xcode
Try deleting Bolts.framework
from linked framework and re-add it. Also, in your Framework Search Path
keep path until Bolts.framework
like $(PROJECT_DIR)/Bolts
if it is inside Bolts folder at your project directory path.
Related Topics
Applying Impulses in Spritekit
Update Widget When Appearance Changes
Swift Casting Generic to Optional with a Nil Value Causes Fatalerror
Apple Mach-O Linker Error (Static, Not Ld)
Comma Automatically Being Added to Textfield in Swift
Macos App Sandboxing - Read Access to Referenced Files from Parsed Xml
How to Synchronize Access to a Property That Has Didset
Editable Nstextview from Interface Builder
Why Is My App Returning Hundreds of Errors That Say "Undefinedsymbol"
How to Resize an Image That Is Being Printed
Could Not Find Member <Method Name> for Struct Type in Swift
Cast While Looping Over Dictionary in Swift
Swift Combine: Turn a Publisher into a Read-Only Currentvaluesubject
Retrieving Common Values in Firebase
What Is This Syntax: Func Funcname(Stuff1)(Stuff2)->Returntype {}
Swift: How to Catch Exception When Parsing a Numeric String
Swift Optionals Best Practices
Is There a Difference Between Global Initialization Vs Viewdidload Initialization in Swift