Xcode Version 6.1 (6A1030) - Apple Mach O-Linker Error - Building
As usual when upgrading Xcode:
- Clean your build folder (Product -> (Alt key) -> Clean Build Folder)
- Clean project (Product -> Clean)
- Delete derived data
- Xcode < 6.3: Window -> Organizer -> Delete derived data
- Xcode >= 6.3: Window -> Projects (select project) -> Delete derived data
Then try to build your project again.
Xcode 6.1 Compile error
You have mainly 3 problems,
Failable Initializers.
As mentioned in this article. Swift 1.1 introduces Failable Initializers. It means, initializer can fail and returnnil
. You have to check it is notnil
and unwrap it. This applies to:error: value of optional type 'UIImage?' not unwrapped; did you mean to use '!' or '?'?
error: 'NSURL?' does not have a member named 'lastPathComponent'CFString
handling bug
See this question:Type 'CFStringRef' does not conform to protocol 'Hashable' in Xcode 6.1. This applies to:error: type 'CFString!' does not conform to protocol 'NSCopying'
error: type 'CFString!' does not conform to protocol 'Hashable'The workaround would be like:
curFrameGIFProperties[kCGImagePropertyGIFUnclampedDelayTime as NSString]
^^^^^^^^^^^enum
raw value interface change
This applies to:error: method 'fromRaw' has been replaced with a property 'rawValue'
Instead of
toRaw()
method, userawValue
property:dictParams += ["category":self.category.rawValue]
Cocoapods with Xcode 6 and 10.10 Yosemite
- Open Xcode 6
- Open Preferences
- Click the Locations tab
- Change the
Command Line Tools
version toXcode 6.0
- Uninstall cocoapods
$ sudo gem uninstall cocoapods
- Uninstall xcodeproj
$ sudo gem uninstall xcodeproj
- Install xcodeproj
$ sudo gem install xcodeproj
- Install cocoapods
$ sudo gem install cocoapods
- Run
pod --version
to verify that it worked
Related Topics
Embed a Uiviewcontroller in a Navigationcontroller Using Segues
Are View Controllers with Nib Files Broken in iOS 8 Beta 5
Error: Uicollectionview Must Be Initialized with a Non-Nil Layout Parameter
iPhone Uitableview. How Do Turn on the Single Letter Alphabetical List Like the Music App
Email & Phone Validation in Swift
How to Remove the Authorization Prompt from Command-Line Instances of Instruments (Xcode)
Ios: Add Imageview in a Scrollview to Have Zoom
How to Get Managedobjectcontext for Viewcontroller Other Than Getting It from Appdelegate
Xcode 8 Custom Font Doesn't Show Up in Interface Builder
How to Logout User Using Facebook Authentication Using Swift and iOS
Xcode 4.2: How to Import .H File from Subproject
Swift Override Function in Extension
How to Remove Border of the Navigationbar in Swift
Locking a Uisearchbar to the Top of a Uitableview Like Game Center
Atos and Dwarfdump Won't Symbolicate My Address
How to Mimic Keyboard Animation on iOS 7 to Add "Done" Button to Numeric Keyboard
How to Programmatically Use iOS Voice Synthesizers? (Text to Speech)