收入验证 如果您已启用购买验证,则必须随购买事件一同发送额外信息用于验证。Adjust 服务器收到ADJEvent对象中的信息后,会将此信息转发至 Apple 验证购买。 要验证购买,请使用您的事件识别码实例化一个ADJEvent对象并设置以下属性: transactionId (NSString):已成功完成交易的 transactionIdentifier 值。 productId (NSString):已被成功售出货品的产品识别码 receipt (NSData): 包含成功交易信息的签名收据。 Swift Objective-C 1let receiptURL = Bundle.main.appStoreReceiptURL;2let receipt = try Data(contentsOf: receiptURL, options: .alwaysMapped)3 4let event = ADJEvent(eventToken: "abc123")5event?.setRevenue(6.0, currency: "EUR");6event?.setTransactionId("transaction-id");7event?.setProductId("product-id");8event?.setReceipt(receipt);9Adjust.trackEvent(event) 1NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];2NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];3ADJEvent *event = [ADJEvent eventWithEventToken::@"your-event-token"];4[event setRevenue:6.0 currency:@"EUR"];5[event setTransactionId:@"transaction-id"];6[event setProductId:@"product-id"];7[event setReceipt:receipt];8[Adjust trackEvent:event];