title: In-App Purchase: how to handle receipt validation without uniqueIdentifier for iOS5?
body: <p>To enable In-App Purchase in my application I did a <a href="http://www.raywenderlich.com/23266/in-app-purchases-in-ios-6-tutorial-consumables-and-receipt-validation" rel="nofollow noreferrer">tutorial</a> which referenced a not up to date VerificationController for the receipt validation.</p>
  <p>As a result my app got rejected because of using an unique identifier for iOS5. As I basically like the idea to support iOS5 as well as iOS6 I figured that there might be a solution to get the &quot;Pre iOS 6&quot; code underneath running but I only found <a href="http://developer.apple.com/library/ios/#releasenotes/StoreKit/IAP_ReceiptValidation/" rel="nofollow noreferrer">this</a> solution, which suggest (in the companion file) just to delete all the &quot;Pre iOS 6&quot; code.</p>
  <pre><code>- (BOOL)doesTransactionInfoMatchReceipt:(NSString*) receiptString
  {
      // some code above
     
      if ([[UIDevice currentDevice] respondsToSelector:NSSelectorFromString(@&quot;identifierForVendor&quot;)]) // iOS 6?
      {
  #if IS_IOS6_AWARE
          // iOS 6 (or later)
          NSString *localIdentifier                   = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
          NSString *purchaseInfoUniqueVendorId        = [purchaseInfoFromTransaction objectForKey:@&quot;unique-vendor-identifier&quot;];
          NSString *verifiedReceiptVendorIdentifier   = [verifiedReceiptReceiptDictionary objectForKey:@&quot;unique_vendor_identifier&quot;];
          
          
          if(verifiedReceiptVendorIdentifier)
          {
              if (![purchaseInfoUniqueVendorId isEqualToString:verifiedReceiptVendorIdentifier]
                  || ![purchaseInfoUniqueVendorId isEqualToString:localIdentifier])
              {
                  // Comment this line out to test in the Simulator.
                  failCount++;
              }
          }
  #endif
      } else {
          // Pre iOS 6 - this part is missing now
          NSString *localIdentifier           = [UIDevice currentDevice].uniqueIdentifier;
          NSString *purchaseInfoUniqueId      = [purchaseInfoFromTransaction objectForKey:@&quot;unique-identifier&quot;];
  
          
          if (![purchaseInfoUniqueId isEqualToString:verifiedReceiptUniqueIdentifier]
              || ![purchaseInfoUniqueId isEqualToString:localIdentifier])
          {
              // Comment this line out to test in the Simulator.
              failCount++;
          }        
      }
      
  // more code
  }
  </code></pre>
  <p>My question would be: how do you match transaction info and receipt for iOS5?
  Why isn't it in the VerificationController anymore, isn't it important?</p>
  <p>Any ideas appreciated,
  Chris</p>