<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Topology Engineering</title>
  
  
  <link href="/engineering-blog/atom.xml" rel="self"/>
  
  <link href="https://topologyeyewear.github.io/engineering-blog/"/>
  <updated>2018-07-04T00:28:10.710Z</updated>
  <id>https://topologyeyewear.github.io/engineering-blog/</id>
  
  <author>
    <name>Topology Eyewear</name>
    
  </author>
  
  <generator uri="http://hexo.io/">Hexo</generator>
  
  <entry>
    <title>The Future of Eyewear Delivery Is Here</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2018/07/03/drone/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2018/07/03/drone/</id>
    <published>2018-07-03T07:00:00.000Z</published>
    <updated>2018-07-04T00:28:10.710Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;At Topology, we make every pair of glasses from scratch, sculpting the frame to fit the customer based on a detailed 3D model of their face.&lt;/p&gt;
&lt;p&gt;One of the delights of working here is all the technology this requires – Swift, JavaScript, computer graphics, machine learning, and even steel-cutting lasers and robots to build the product itself.&lt;/p&gt;
&lt;p&gt;But we wanted to go further. We’re all proud to share what we think is a little piece of the future:&lt;/p&gt;
&lt;div style=&quot;position:relative; height: 0; padding-bottom: 56.25%; padding-top:30px; overflow:hidden&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;iframe style=&quot;position:absolute; top:0; left:0; width:100%;  height:100%&quot; src=&quot;https://www.youtube-nocookie.com/embed/thfQ8kJEKSI?rel=0&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot;
        
      
    
    </summary>
    
    
      <category term="aeronautics" scheme="https://topologyeyewear.github.io/engineering-blog/tags/aeronautics/"/>
    
  </entry>
  
  <entry>
    <title>Developing UIViews in Xcode Playgrounds</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2018/05/21/playgrounds/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2018/05/21/playgrounds/</id>
    <published>2018-05-21T07:00:00.000Z</published>
    <updated>2018-05-24T22:37:34.507Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;Last week, &lt;a href=&quot;https://twitter.com/vasarhelyia&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Agnes&lt;/a&gt; gave a talk on how we use–and love!–Auto Layout here at Topology.&lt;/p&gt;
&lt;p&gt;The talk was at &lt;a href=&quot;https://www.meetup.com/nsmeetup/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;NSMeetup&lt;/a&gt;, the local San Francisco meetup for iOS development, and someone in the audience asked if you can use Auto Layout in Xcode playgrounds.&lt;/p&gt;
&lt;p&gt;Answer: yes, you can! And playgrounds are great for UI development – flawed, but great.&lt;/p&gt;
&lt;p&gt;There are &lt;a href=&quot;https://developer.apple.com/videos/play/wwdc2017/408/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;WWDC sessions&lt;/a&gt; that go through the ins and outs of playgrounds. But since it seems like it’s not a common practice, I thought it might be interesting to share a few notes and
        
      
    
    </summary>
    
    
      <category term="Swift" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Swift/"/>
    
      <category term="playgrounds" scheme="https://topologyeyewear.github.io/engineering-blog/tags/playgrounds/"/>
    
      <category term="UIKit" scheme="https://topologyeyewear.github.io/engineering-blog/tags/UIKit/"/>
    
  </entry>
  
  <entry>
    <title>Heap Corruption Follow-up: Size, Alignment, and Crashing Collections</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2018/03/19/heap_corruption_followup/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2018/03/19/heap_corruption_followup/</id>
    <published>2018-03-19T07:00:00.000Z</published>
    <updated>2018-05-17T21:23:29.702Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;After a massive multi-day effort, our team found one of those rare bugs that turned out to be an issue deep in the compiler. My colleague &lt;a href=&quot;https://twitter.com/vasarhelyia&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Agnes&lt;/a&gt; took the lead to track down the issue and &lt;a href=&quot;https://topologyeyewear.github.io/engineering-blog/2018/03/07/heap_corruption/&quot;&gt;wrote up her findings about her adventures&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now that the issue is fixed and the hard work is done, I can step in and do a little post-mortem. 🔎 What was the problem? What was the fix? What did we learn?&lt;/p&gt;
&lt;h2 id=&quot;Smashing-the-Stack&quot;&gt;&lt;a href=&quot;#Smashing-the-Stack&quot; class=&quot;headerlink&quot; title=&quot;Smashing the Stack&quot;&gt;&lt;/a&gt;Smashing the Stack&lt;/h2&gt;&lt;p&gt;The classic article &lt;a href=&quot;http://phrack.org/issues/49/14.html#article&quot; target=&quot;_blank&quot;
        
      
    
    </summary>
    
    
      <category term="Swift" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Swift/"/>
    
      <category term="memory" scheme="https://topologyeyewear.github.io/engineering-blog/tags/memory/"/>
    
      <category term="alignment" scheme="https://topologyeyewear.github.io/engineering-blog/tags/alignment/"/>
    
      <category term="heap corruption" scheme="https://topologyeyewear.github.io/engineering-blog/tags/heap-corruption/"/>
    
      <category term="buffer overflow" scheme="https://topologyeyewear.github.io/engineering-blog/tags/buffer-overflow/"/>
    
  </entry>
  
  <entry>
    <title>Solving a Mysterious Heap Corruption Crash</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2018/03/07/heap_corruption/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2018/03/07/heap_corruption/</id>
    <published>2018-03-07T08:00:00.000Z</published>
    <updated>2018-05-17T21:23:29.702Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;A while back, we noticed an increase in crashes in &lt;a href=&quot;https://itunes.apple.com/us/app/topology-eyewear/id1110119242?mt=8&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;our app&lt;/a&gt;. The crashes were marked as &lt;em&gt;heap corruption&lt;/em&gt;, which makes them hard to debug — the location given in the stack trace (if any) can be far away in both code and time to where the problem actually lies.&lt;/p&gt;
&lt;p&gt;After a long investigation down many paths, it turned out to be an issue in Swift itself. After sharing a few tweets about it on Twitter, I had a lot of people asking me for more details, so here I am, sharing the story of &lt;em&gt;the mighty heap corruption issue&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Are you ready for a tale of woe, frustration, and ultimately, redemption? Are you curious about how other iOS teams — ours, in this case
        
      
    
    </summary>
    
    
      <category term="Swift" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Swift/"/>
    
      <category term="Heap corruption" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Heap-corruption/"/>
    
      <category term="memory" scheme="https://topologyeyewear.github.io/engineering-blog/tags/memory/"/>
    
      <category term="alignment" scheme="https://topologyeyewear.github.io/engineering-blog/tags/alignment/"/>
    
      <category term="iOS 11" scheme="https://topologyeyewear.github.io/engineering-blog/tags/iOS-11/"/>
    
  </entry>
  
  <entry>
    <title>Five Steps to Auto Layout Heaven</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2018/01/30/autolayout/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2018/01/30/autolayout/</id>
    <published>2018-01-30T08:00:00.000Z</published>
    <updated>2018-05-17T21:23:29.701Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;Ever since I put the effort into &lt;a href=&quot;https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/index.html#//apple_ref/doc/uid/TP40010853-CH7-SW1&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;understanding Auto Layout&lt;/a&gt;, I’m significantly faster at writing correct UI code, sometimes even on the first try. Auto layout also saves me from potential errors from dealing with multiple size classes and frequent churn in our app’s design (&lt;a href=&quot;https://itunes.apple.com/us/app/id1110119242?mt=8&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;we’re a startup&lt;/a&gt;, after all).&lt;/p&gt;
&lt;p&gt;One alternative is traditional frame-based layouts, but they require manual updates for every single external change.&lt;/p&gt;
&lt;p&gt;Another option is autoresizing masks, but they only support a limited
        
      
    
    </summary>
    
    
      <category term="Swift" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Swift/"/>
    
      <category term="Auto Layout" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Auto-Layout/"/>
    
      <category term="safe area" scheme="https://topologyeyewear.github.io/engineering-blog/tags/safe-area/"/>
    
      <category term="iPhone X" scheme="https://topologyeyewear.github.io/engineering-blog/tags/iPhone-X/"/>
    
      <category term="UILayoutGuide" scheme="https://topologyeyewear.github.io/engineering-blog/tags/UILayoutGuide/"/>
    
  </entry>
  
  <entry>
    <title>iOS Background Transfer</title>
    <link href="https://topologyeyewear.github.io/engineering-blog/2017/11/20/background_transfer/"/>
    <id>https://topologyeyewear.github.io/engineering-blog/2017/11/20/background_transfer/</id>
    <published>2017-11-20T08:00:00.000Z</published>
    <updated>2018-05-17T21:23:29.702Z</updated>
    
    <summary type="html">
    
      
      
        
        
          &lt;p&gt;I first heard about background transfer when I was giving a ⚡️ talk at Realm back in 2015. &lt;a href=&quot;https://twitter.com/purpleyay&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Gwendolyn Weston&lt;/a&gt; gave &lt;a href=&quot;https://academy.realm.io/posts/gwendolyn-weston-ios-background-networking/&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;an excellent presentation&lt;/a&gt; on background transfer services later that day. Her talk was the first resource that I looked up a few weeks ago when we decided to implement background transfer support into our most precious &lt;a href=&quot;https://itunes.apple.com/us/app/id1110119242?mt=8&quot; target=&quot;_blank&quot; rel=&quot;external&quot;&gt;Topology Eyewear app&lt;/a&gt;. 📱 👉 👓&lt;/p&gt;
&lt;p&gt;It’s been a journey full of surprises and learnings, and felt like something worth sharing.&lt;/p&gt;
&lt;h2 id=&quot;The-idea&quot;&gt;&lt;a href=&quot;#The-idea&quot;
        
      
    
    </summary>
    
    
      <category term="Swift" scheme="https://topologyeyewear.github.io/engineering-blog/tags/Swift/"/>
    
      <category term="URLSession" scheme="https://topologyeyewear.github.io/engineering-blog/tags/URLSession/"/>
    
      <category term="background" scheme="https://topologyeyewear.github.io/engineering-blog/tags/background/"/>
    
      <category term="authentication" scheme="https://topologyeyewear.github.io/engineering-blog/tags/authentication/"/>
    
  </entry>
  
</feed>
