paytabscom / paytabs-ios-library-sample

This repository contains latest static framework (.framework), resources bundle (.bundle), sample apps for both Objective-C and Swift, and documentation to get SDK integrated in the Xcode projects.
MIT License
12 stars 11 forks source link

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PTFWHTTPSessionManager POST:parameters:constructingBodyWithBlock:progress:success:failure:]: unrecognized selector sent to instance 0x600000b153b0' #17

Closed ghassanjaa closed 4 years ago

ghassanjaa commented 4 years ago

Hi, I don't know why this error happened i finish all configuration of Paytabs in projects with install all pods and load all objc library

Screen Shot 2020-04-15 at 9 01 37 AM
cogtea commented 4 years ago

@ghassanjaa Can you please to run our samples https://github.com/paytabscom/paytabs-ios-library-sample/tree/master/samples with your Xcode and IOS versions?

ghassanjaa commented 4 years ago

i run your sample code and work very well on my Xode 11.4 ! but when i implemented in my project its give me the same error ! i try to create a new project with implemented all the required file like podfile load -objc ..... and its give me the same error ? i cant detect where is problem ? if you want i will send you the testing project to detect where is problem

cogtea commented 4 years ago

@ghassanjaa If you can list your app dependencies, and also double check the following steps https://dev.paytabs.com/docs/ios/#importing-the-sdk-ios-project

ghassanjaa commented 4 years ago

Im about 48 hours testing and i dont found a different with my test project and sample project ! i add also my dependencies to your sample project and working very well but on my test project same error plz if you help me this my dependencies that im working on it pod 'Alamofire', '~> 5.0.0-rc.3' pod 'Disk' pod 'SDWebImage' pod 'IBAnimatable' pod "ASPVideoPlayer" pod "DIOCollectionView" pod 'BIObjCHelpers' pod 'IQKeyboardManager', '~> 4.0.2' pod 'AFNetworking' pod 'Mantle' pod 'Reachability' pod 'Lockbox' pod 'SBJson' pod 'PINCache' pod 'MBProgressHUD', '~> 1.1.0' pod 'ActionSheetPicker-3.0'

cogtea commented 4 years ago

Did you follow these steps:

  1. If your application programming language is Swift, you will need to have Bridging Header for importing #import <paytabs-iOS/paytabs_iOS.h>. Also, point your bridging header path against Objective-C Bridging Header in your app target’s build settings.
  2. Add two flags, -all_load and -ObjC in Build Settings/Other linker flags.
ghassanjaa commented 4 years ago

Yes my project is swift and i add a bridging header and i add this two flags also

Screen Shot 2020-04-17 at 12 28 24 PM Screen Shot 2020-04-17 at 12 29 12 PM
cogtea commented 4 years ago

Please share a sample reproducing the issue.

ghassanjaa commented 4 years ago

can you check the code here https://github.com/ghassanjaa/testPaymentfPaytabs

ghassanjaa commented 4 years ago

The Problem fixed ! The problem is about pod 'AFNetworking' it will not work on the newest version 4.0 its work on 3.2.1' !

cogtea commented 4 years ago

@ghassanjaa Thanks for your update.

yasheedv commented 4 years ago

Hi,

I faced the same issue and after changing the AFNetworking version to 3.2.1 it's working fine.

Now getting the below issue from the App Store Connect because of the AFNetworking,

ITMS-90809: Deprecated API Usage - App updates that use UIWebView will no longer be accepted as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

Please suggest.

raeesdoduae commented 4 years ago

I am still facing the same issue, please suggest a solution, I am stuck for long time

cogtea commented 4 years ago

Please use the latest version 4.0.8 https://github.com/paytabscom/paytabs-ios-library-sample/tree/master/sdk