Error with XCTestExpectation: API violation – multiple calls made to -[XCTestExpectation fulfill]

XCTestExpectation Error API violation – multiple calls made to -[XCTestExpectation fulfill] I got the same error when set expectation.expectedFulfillmentCount. Solution: expectation.assertForOverFulfill = false If expectation.assertForOverFulfill = true and fulfill() is called when it is already fulfilled then it throws an exception

Xcode 6: Build hangs and Interface Builder Cocoa Touch Tool starts allocating all RAM

I had the exact same problem: opening the storyboard in xcode results in beach ball with the Interface Builder task consuming all the memory. I got it back working by editing the xml of the storyboard file and setting useAutolayout=”NO” in the document node. Of cause this is not a solution to the problem (which … Read more

Is it possible to install iOS 7 SDK on Xcode 6?

Seems like if you symlink the relevant SDK from a previous installation of Xcode to the Xcode 6 Beta directory, Xcode 6 will be able to use it. Assuming you still have Xcode 5.1.1 on your machine, try the following in terminal: ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk This should link the iOS 7 SDK for iPhone … Read more

where are device screenshots visible in Xcode6?

Six minutes after asking my question I figured out the answer. There’s a tooltip that pops up when hovering over the “Take Screenshot” button. The screenshots get saved directly to the desktop and you’ll see them saved there with the filename format “Screen Shot YYYY-MM-DD at HH.mm.ss AM/PM.png“.

IBInspectable Creating a Dropdown and better Organization

There is no support of any lists or arrays yet. Currently the following types support @IBInspectable Int CGFloat Double String Bool CGPoint CGSize CGRect UIColor UIImage Here is a code with all available IBInspectable’s: @IBInspectable var integer: NSInteger = 10 @IBInspectable var float: CGFloat = 10 @IBInspectable var double: Double = 10 @IBInspectable var string: … Read more

How do I use Cocoapods in an embedded framework?

Assuming in your Podfile you are using the link_with ‘MyCustomFramework’, where ‘MyCustomFramework’ is your embedded framework name, and have run pod install. Select your Project file (Blue on the top right) and go into “Build Settings“. Then, find ‘Allow non-modular includes in Framework Modules‘ and set it to YES, for both the Project file (blue) … Read more

Ordering unit test using XCTest in Xcode 6

It’s all sorted alphabetically (classes and methods). So when You need some tests running last, just change the name of Class or Method (for (nasty) example by prefixing ‘z_’). So…You have Class names: MyAppTest1 -testMethodA -testMethodB MyAppTest2 -testMethodC -testMethodD and they run in this order. If you need to run MyAppTest1 as second, just rename … Read more