title: What are the Dangers of Method Swizzling in Objective-C?
body: <p>I have heard people state that method swizzling is a dangerous practice. Even the name swizzling suggests that it is a bit of a cheat.</p>
  
  <p><a href="https://web.archive.org/web/20130308110627/http://cocoadev.com/wiki/MethodSwizzling" rel="noreferrer">Method Swizzling</a> is modifying the mapping so that calling selector A will actually invoke implementation B. One use of this is to extend behavior of closed source classes. </p>
  
  <p>Can we formalise the risks so that anyone who is deciding whether to use swizzling can make an informed decision whether it is worth it for what they are trying to do.</p>
  
  <p>E.g.</p>
  
  <ul>
  <li><strong>Naming Collisions</strong>: If the class later extends its functionality to include the method name that you have added, it will cause a huge manner of problems. Reduce the risk by sensibly naming swizzled methods.</li>
  </ul>