'new' is unavailable: You cannot directly instantiate an PSTCKTransaction. You should only use one that has been returned from an PSTCKAPIClient callback. #59
Getting this error at build time in Xcode 12.5
'new' is unavailable: You cannot directly instantiate a PSTCKTransaction. You should only use one that has been returned from a PSTCKAPIClient callback.
Code to reproduce
Error directly coming in PSTCKAPIClient.m
in function - (void) makeChargeRequest:(NSData *)data atStage:(PSTCKChargeStage) stage { // body }
Getting this error at build time in Xcode 12.5 'new' is unavailable: You cannot directly instantiate a PSTCKTransaction. You should only use one that has been returned from a PSTCKAPIClient callback.
Code to reproduce Error directly coming in PSTCKAPIClient.m in function - (void) makeChargeRequest:(NSData *)data atStage:(PSTCKChargeStage) stage { // body }
line: [PSTCKAPIPostRequest<PSTCKTransaction > startWithAPIClient:self endpoint:endpoint method:httpMethod postData:data serializer:[PSTCKTransaction new] completion:^(PSTCKTransaction _Nullable responseObject, NSError * _Nullable error) { // body }
SDK version of paystack - Latest