Report Custom Issues
Single line API to report issues that can be anticipated.
You can report custom issues that can occur in the app using the ReportIssueAt API.
In cases where the fail situations can be anticipated, they may be reported using this API.
Any where in the project:
- Objective C
- Swift
//Payment gateway delegate methods.
-(void) paymentCompleted:(NSString *) userIdentifier forType:(NSInteger) type{
}
-(void) paymentFailed:(NSString *) userIdentifier forReason:(NSString *) reason{
[Fn setActivityMarkerAt:self marker:[NSString stringWithFormat:@"User id %@", userIdentifier]];
[Fn reportIssueAt:self withShortDescription:@"Payment failed" withDescription:reason];
}
//Payment gateway delegate methods.
func paymentCompleted(_ userIdentifier:String, _ type:String){
}
func paymentFailed(_ reason:String, _ userId:String){
Fn.setActivityMarkerAt(self, marker: String(format: "User Id %@",userId))
Fn.reportIssue(at: self, withShortDescription: "Payment failed", withDescription: reason)
}
API takes a string as parameter to the anticipated issue.
Make use of activity markers to aid reproducing the issue when reported.