title: Compute Custom Swift Class and Supply Results with App
body: <p>My app needs a complicated set of UIBezierPaths (stored in a custom class with other properties) which it computes at app startup. This takes over 60 seconds to compute which is too long for regular app load. My solution was to compute it only once and then save in UserDefaults for future app startup loads.</p>
  <pre><code>class LinePath : UIBezierPath {
      var lineType = LineType.undefined
      var startPoint = CGPoint()
      var endPoint = CGPoint()
      var arcCenter = CGPoint()
      var arcRadius = CGFloat()
      var arcStartAngle = CGFloat()
      var arcEndAngle = CGFloat()
      var arcClockwise = Bool()
      var connects = [LinePath]()
      var lineLayer = LineLayer()
      var group = Int()
      var gradient = CALayer()
  }
  </code></pre>
  <p>But I want to go one step further and simply compute it in my development and save/supply resultant custom class data with my app. That way every user will not have to compute it but simply read the actual data from the disk which is instantaneous.</p>
  <p>I cannot get my head around on how to accomplish this. Simply computing once and spitting it in log and then copy/paste into code seems wrong and I can't figure out the proper way to accomplish this.</p>