Latest 1.0.1
Homepage https://github.com/DarkHorseComics/DHAppleReceiptParser
License MIT
Platforms ios 7.0, requires ARC
Authors

A library to parse the apple receipt file in iOS 7 as defined in the [apple developer documentation]
(https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html#//apple_ref/doc/uid/TP40010573-CH1-SW3).

This library does not handle validation — by Apple’s design, it
is necessary to provide your own validation code for security reasons.

This library does make it easier to fetch in-app purchase data stored
on the device, which could be used for server side receipt validation.

To get the parsed system receipt:

#import "DHAppStoreReceipt.h"

// This function could be used to get the recipt payload for server side validation
//  of in app purchases
- (NSData *)receiptDataForProductIdentifier:(NSString *)productIdentifier {
    DHAppStoreReceipt *receipt = [DHAppStoreReceipt mainBundleReceipt];
    DHInAppReceipt *inAppReceipt = [receipt receiptForProductId:productIdentifier];
    return inAppReceipt.receiptData;
}

OpenSSL is included as built by https://github.com/st3fan/ios-openssl

Latest podspec

{
    "name": "DHAppleReceiptParser",
    "version": "1.0.1",
    "summary": "Parser for the receipt file available in iOS 7.",
    "description": "                   A library to parse the apple receipt file in iOS 7 as defined here:nhttps://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html#//apple_ref/doc/uid/TP40010573-CH1-SW3n                   This library does *not* handle validation -- by Apple's design, itn                   is necessary to provide your own validation code for security reasons.nn                   This library *does* make it easier to fetch in-app purchase data storedn                   on the device, which could be used for server side receipt validation.n",
    "homepage": "https://github.com/DarkHorseComics/DHAppleReceiptParser",
    "license": "MIT",
    "authors": {
        "Chase Caster": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source": {
        "git": "https://github.com/DarkHorseComics/DHAppleReceiptParser.git",
        "tag": "1.0.1"
    },
    "source_files": [
        "*.{h,m}",
        "asn1_parser/*.{h,c}",
        "include/openssl/*.h"
    ],
    "public_header_files": "DHAppStoreReceipt.h",
    "preserve_paths": "lib/libcrypto.a",
    "libraries": "crypto",
    "xcconfig": {
        "LIBRARY_SEARCH_PATHS": ""$(PODS_ROOT)/DHAppleReceiptParser/lib/"",
        "HEADER_SEARCH_PATHS": ""$(PODS_ROOT)/DHAppleReceiptParser/include/""
    }
}

Pin It on Pinterest

Share This