title: Undocumented NSURLErrorDomain error codes (-1001, -1003 and -1004) using StoreKit
body: <p>I'm writing StoreKit-related code, and I'm getting some rather troubling error codes when I try to add a purchase to the queue.</p>
  
  <p>So far, I've experienced error codes -1003 and -1004 and I can't find anything about those codes on the internet.</p>
  
  <p>Running a product request returns valid product numbers, so I don't know why calls to <code>[[SKPaymentQueue defaultQueue] addPayment:aPayment];</code> would fail with this undocumented problem.</p>
  
  <p>The same code also works without the errors on one device but not on another.</p>
  
  <p>The questions I have are, as of yet, unanswered:</p>
  
  <p>What do these codes mean?
  How can I mitigate this problem?
  Why are they happening for purchase attempts and not for product requests?</p>
  
  <p>Troubleshooting I've done includes regenerating a signing certificate and provisioning profile, changing WiFi networks, cleaning and building and reinstalling all related software and components, and none of these things individually or together have helped fix the problem.</p>
  
  <p>EDIT:</p>
  
  <p>Found a discussion about this on the Apple dev forums, but no one from Apple has responded: <a href="https://devforums.apple.com/thread/107121?tstart=75" rel="noreferrer">https://devforums.apple.com/thread/107121?tstart=75</a> (iOS developer account required to view)</p>
  
  <p>EDIT:</p>
  
  <p>I was hit with error code -1001 today, to add to this list of inexplicable and intermittent problems.  Still no accountability from Apple, that I can find.</p>
  
  <p>EDIT:</p>
  
  <p>I have a suspicion that these error codes are randomly generated and really only indicate that the Sandbox is down.  Anyone else experience this problem?</p>