I am attempting to extract the user's receipt to ascertain what their original purchase version was by using the following code:
if attr_type == 19 {
// Bundle version
var str_ptr = ptr
var str_type: Int32 = 0
var str_length = 0
var str_xclass: Int32 = 0
ASN1_get_object(&str_ptr, &str_length, &str_type, &str_xclass, seq_end - str_ptr)
if str_type == V_ASN1_UTF8STRING {
originalPurchaseVersion = NSString(bytes: str_ptr, length: str_length, encoding: NSUTF8StringEncoding)
securityInfo.originalPurchaseDate = originalPurchaseVersion as! String
}
However, I set up a testflight beta programme and the user that is testing has previously purchased version 1.32, however, the returned value is always version 1.0.