ADJSubscription class
You can use the ADJSubscription class to pass subscription information to the Adjust backend. Once you have formed the object, you can pass it to the trackSubscription
method.
Instance methods
Initialize the subscription object
To initialize the ADJSubscription object, you need to call the initWithPrice
method. You can pass details of your subscription to this method.
- (nullable id) initWithPrice: (nonnull NSDecimalNumber *) price
currency: (nonnull NSString *) currency
transactionId: (nonnull NSString *) transactionId
andReceipt: (nonnull NSData *) receipt
Set the date of the transaction
You can record the date on which a transaction occurred. To do this, pass the date to the setTransactionDate
method.
- (void) setTransactionDate: (nonnull NSDate *) transactionDate
Set the sales region of the transaction
You can record the region in which a purchase took place. To do this, pass the country code to the setSalesRegion
method.
- (void) setSalesRegion: (nonnull NSString *) salesRegion
Add callback parameters to the subscription object
You can attach custom parameters to your subscription object. The Adjust SDK will send these when it calls on your callback URL. To add these parameters, call the addCallbackParameter
method.
- (void) addCallbackParameter: (nonnull NSString *) key
value: (nonnull NSString *) value
Add partner callback parameters to the subscription object
You can attach partner parameters to your subscription object. The Adjust SDK will send these parameters to the Adjust backend when a user triggers a subscription event. The Adjust backend will then forward these to the network partner. To add these parameters, call the addPartnerParameter
method.
- (void) addPartnerParameter: (nonnull NSString *) key
- value: (nonnull NSString *) value