PaystackHQ / paystack-ios

Paystack SDK for iOS. Accept Payments on iOS
http://paystack.com
MIT License
26 stars 31 forks source link

'new' is unavailable: You cannot directly instantiate an PSTCKTransaction. You should only use one that has been returned from an PSTCKAPIClient callback. #59

Closed satyams407 closed 3 years ago

satyams407 commented 3 years ago

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