UNICORN - iOS
VerifyStoreReceipt.h
1 //
2 // VerifyStoreReceipt.h
3 //
4 // Based on validatereceipt.h
5 // Created by Ruotger Skupin on 23.10.10.
6 // Copyright 2010-2011 Matthew Stevens, Ruotger Skupin, Apple, Alessandro Segala. All rights reserved.
7 //
8 // Modified for iOS, converted to ARC, and added additional fields by Rick Maddy 2013-08-20
9 // Copyright 2013 Rick Maddy. All rights reserved.
10 //
11 
12 /*
13  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
14 
15  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
16 
17  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in
18  the documentation and/or other materials provided with the distribution.
19 
20  Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived
21  from this software without specific prior written permission.
22 
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
24  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #import <Foundation/Foundation.h>
32 
33 extern NSString *kReceiptBundleIdentifer;
34 extern NSString *kReceiptBundleIdentiferData;
35 extern NSString *kReceiptVersion;
36 extern NSString *kReceiptOpaqueValue;
37 extern NSString *kReceiptHash;
38 extern NSString *kReceiptInApp;
39 extern NSString *kReceiptOriginalVersion;
40 extern NSString *kReceiptExpirationDate;
41 
42 extern NSString *kReceiptInAppQuantity;
43 extern NSString *kReceiptInAppProductIdentifier;
44 extern NSString *kReceiptInAppTransactionIdentifier;
45 extern NSString *kReceiptInAppPurchaseDate;
46 extern NSString *kReceiptInAppOriginalTransactionIdentifier;
47 extern NSString *kReceiptInAppOriginalPurchaseDate;
48 extern NSString *kReceiptInAppSubscriptionExpirationDate;
49 extern NSString *kReceiptInAppCancellationDate;
50 extern NSString *kReceiptInAppWebOrderLineItemID;
51 
52 NSDictionary *dictionaryWithAppStoreReceipt(NSString *receiptPath);
53 NSArray *obtainInAppPurchases(NSString *receiptPath);
54 BOOL verifyReceiptAtPath(NSString *receiptPath);