I want to integrate venmo library for payment into an iOS app.
I created a demo of it by following venmo github project.
As per the description on github project below is the code to display venmo app/open venmo in browser:
- (IBAction)payButtonPressed:(UIButton *)sender
{
// App crashes here. Does not crash if I comment this line.
venmoClient = [VenmoClient clientWithAppId:AppId secret:AppSecret];
VenmoTransaction *venmoTransaction = [[VenmoTransaction alloc] init];
venmoTransaction.type = VenmoTransactionTypePay;
venmoTransaction.amount = [NSDecimalNumber decimalNumberWithString:@"5"];
venmoTransaction.note = @"Payment for something";
venmoTransaction.toUserHandle = @"Name";
VenmoViewController *venmoViewController = [venmoClient viewControllerWithTransaction:
venmoTransaction];
if (venmoViewController) {
[self presentViewController:venmoViewController animated:YES completion:nil];
}
}
When I run the project it crashes on first line of the method. If I comment it out then its not crashing.
Below is the error message it throws :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSBundle name]: unrecognized selector sent to instance 0x17556e00'
Has anyone used venmo?
Update : I downloaded project from venmo-ios-sdk. Opened sample project and tried to run. But it does not even compile.
Also then I tried to create a new demo by adding venmo ios sdk. As per the gihub readme file, I have to add
pod 'venmo-ios-sdk', :git => 'https://github.com/venmo/venmo-ios-sdk'
to Podfile. But it throws error :
[!] The name of the given podspec
Venmo-iOS-SDK
doesn't match the expected onevenmo-ios-sdk
Then I tried adding
pod 'Venmo-iOS-SDK', :git => 'https://github.com/venmo/venmo-ios-sdk'
and it allowed to install.
Now, as per the tutorial there are 2 ways to send payment.
- Switching to the Venmo app : Trying this throws error
Transaction failed with error: The current session is not open.
- Using the Venmo API : This throws
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Venmo handleOpenURL:]: unrecognized selector sent to instance 0x8e8a410'
. This is clear because there is no such method implemented in Venmo.m file. But it is declared in Venmo.h file.
iOS engineer at Venmo here – we're actually in the process of releasing the new Venmo iOS SDK, which you can start using now!
My apologies for the confusion. We'll mark the framework you're using as deprecated right away and point people to the new SDK.
If you have any trouble integrating the new sdk, please submit an issue!
Update
Sorry for all the integration issues you've been having! We're still in the process of polishing our documentation before we officially release, and your feedback has been extremely helpful. You should charge me on Venmo!
I've updated the docs with the correct Podfile line, and
handleOpenURL:
is no longer missing fromVenmo.m
. I've also updated the README to clarify how to use different transaction methods. Hopefully going through the tutorial is a better experience now – sorry you ended up as our guinea pig!Let us know if you have any more issues with the SDK!