Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decreasing Storyboard compiling time in Xcode 6

I converted my storyboard from old project with about 30 scenes to Size Classes-enabled mode in Xcode 6. After setting constraints for at least one scene I am trying to compile project and Storyboard compile time is reaaly long. I separated storyboard to two storyboards to recompile only edited one, but looks like they are recompiled both every time (again, even though only one of them was edited): enter image description here

Is there a way to set option to compile only edited Storyboard, or only pointed Storyboard? Also maybe another options are available, will glad to read in answers!

like image 764
Alex Avatar asked Dec 11 '14 20:12

Alex


2 Answers

Possible solution would be to remove reference of the storyboard and add it when required. This should reduce the compilation time as it's not part of the build phase.

Other option is to remove the storyboard from "Copy Bundle Resources" found in the Build Phases tab

like image 55
Vig Avatar answered Oct 10 '22 21:10

Vig


Seperating story boards solved compile time problem for me. I seperated my storyboard (which contains more than 40 ViewControllers) module by module so now i have 8 storyboards instead of 1 and my compile time got like 10 times faster :)

You can call your views from seperate storyboards like this in Swift :

let sb = UIStoryboard(name: "MyOtherModuleStoryBoardFileName", bundle: nil)
let targetVC = sb.instantiateViewControllerWithIdentifier("MyTargetVC") as! MyTargetViewController
self.presentViewController(targetVC, animated: true, completion: nil)

Hope it helps ;)

like image 41
ergunkocak Avatar answered Oct 10 '22 23:10

ergunkocak